mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
RDMA/rxe: Prevent faulty rkey generation
[ Upstream commit1aefe5c177] If you create MRs more than 0x10000 times after loading the module, responder starts to reply NAKs for RDMA/Atomic operations because of rkey violation detected in check_rkey(). The root cause is that rkeys are incremented each time a new MR is created and the value overflows into the range reserved for MWs. This commit also increases the value of RXE_MAX_MW that has been limited unlike other parameters. Fixes:0994a1bcd5("RDMA/rxe: Bump up default maximum values used via uverbs") Link: https://lore.kernel.org/r/20221220080848.253785-2-matsuda-daisuke@fujitsu.com Signed-off-by: Daisuke Matsuda <matsuda-daisuke@fujitsu.com> Tested-by: Li Zhijian <lizhijian@fujitsu.com> Reviewed-by: Li Zhijian <lizhijian@fujitsu.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7ca8aa8354
commit
d7c71f93cf
@@ -91,11 +91,11 @@ enum rxe_device_param {
|
|||||||
RXE_MAX_SRQ = DEFAULT_MAX_VALUE - RXE_MIN_SRQ_INDEX,
|
RXE_MAX_SRQ = DEFAULT_MAX_VALUE - RXE_MIN_SRQ_INDEX,
|
||||||
|
|
||||||
RXE_MIN_MR_INDEX = 0x00000001,
|
RXE_MIN_MR_INDEX = 0x00000001,
|
||||||
RXE_MAX_MR_INDEX = DEFAULT_MAX_VALUE,
|
RXE_MAX_MR_INDEX = DEFAULT_MAX_VALUE >> 1,
|
||||||
RXE_MAX_MR = DEFAULT_MAX_VALUE - RXE_MIN_MR_INDEX,
|
RXE_MAX_MR = RXE_MAX_MR_INDEX - RXE_MIN_MR_INDEX,
|
||||||
RXE_MIN_MW_INDEX = 0x00010001,
|
RXE_MIN_MW_INDEX = RXE_MAX_MR_INDEX + 1,
|
||||||
RXE_MAX_MW_INDEX = 0x00020000,
|
RXE_MAX_MW_INDEX = DEFAULT_MAX_VALUE,
|
||||||
RXE_MAX_MW = 0x00001000,
|
RXE_MAX_MW = RXE_MAX_MW_INDEX - RXE_MIN_MW_INDEX,
|
||||||
|
|
||||||
RXE_MAX_PKT_PER_ACK = 64,
|
RXE_MAX_PKT_PER_ACK = 64,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user