qed: Correct doorbell configuration for !4Kb pages
authorRam Amrani <Ram.Amrani@cavium.com>
Tue, 9 May 2017 12:07:50 +0000 (15:07 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2018 17:47:53 +0000 (19:47 +0200)
commit408719afbc61e388b1dc311d96a85e5d5e6e8f39
treeeb26310c2c68803e0de484db3c8aedb904c077ce
parentae1b31453e6e59bc68f11ba6efb2effc3d3b6b1a
qed: Correct doorbell configuration for !4Kb pages

[ Upstream commit a82dadbce47395747824971db08a128130786fdc ]

When configuring the doorbell DPI address, driver aligns the start
address to 4KB [HW-pages] instead of host PAGE_SIZE.
As a result, RoCE applications might receive addresses which are
unaligned to pages [when PAGE_SIZE > 4KB], which is a security risk.

Fixes: 51ff17251c9c ("qed: Add support for RoCE hw init")
Signed-off-by: Ram Amrani <Ram.Amrani@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/qlogic/qed/qed_dev.c