linux-stable/drivers/infiniband
Chuck Lever 6b32535988 rxe: IB_WR_REG_MR does not capture MR's iova field
[ Upstream commit b024dd0eba ]

FRWR memory registration is done with a series of calls and WRs.
1. ULP invokes ib_dma_map_sg()
2. ULP invokes ib_map_mr_sg()
3. ULP posts an IB_WR_REG_MR on the Send queue

Step 2 generates an iova. It is permissible for ULPs to change this
iova (with certain restrictions) between steps 2 and 3.

rxe_map_mr_sg captures the MR's iova but later when rxe processes the
REG_MR WR, it ignores the MR's iova field. If a ULP alters the MR's iova
after step 2 but before step 3, rxe never captures that change.

When the remote sends an RDMA Read targeting that MR, rxe looks up the
R_key, but the altered iova does not match the iova stored in the MR,
causing the RDMA Read request to fail.

Reported-by: Anna Schumaker <schumaker.anna@gmail.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-01-26 09:38:33 +01:00
..
core IB/core: Fix for core panic 2018-12-01 09:44:20 +01:00
hw IB/hfi1: Incorrect sizing of sge for PIO will OOPs 2019-01-13 10:03:51 +01:00
sw rxe: IB_WR_REG_MR does not capture MR's iova field 2019-01-26 09:38:33 +01:00
ulp ib_srpt: Fix a use-after-free in __srpt_close_all_ch() 2018-12-29 13:40:14 +01:00
Kconfig RDMA/ucm: Mark UCM interface as BROKEN 2018-07-17 11:37:54 +02:00
Makefile IB/rdmavt: Create module framework and handle driver registration 2016-03-10 20:37:04 -05:00