Re: [PATCH] RDMA/rxe: Reject prefetch of a non-ODP MR
From: Norbert Szetei
Date: Sun Sep 13 2026 - 07:54:20 EST
On Sep 6, 2026, at 11:01, Leon Romanovsky <leon@xxxxxxxxxx> wrote:
>>>
>> Do you mean lookup_mr() should take IB_ACCESS_ON_DEMAND into account, so that
>> the existing (access & mr->access) != access test rejects the non-ODP MR?
>
> I expected lookup_mr(..., IB_ACCESS_ON_DEMAND) to be called and to
> perform all the necessary checks internally.
Done in v2.
>> rxe_rereg_user_mr() with IB_MR_REREG_ACCESS assigns mr->access directly, and
>> IB_ACCESS_ON_DEMAND is part of RXE_ACCESS_SUPPORTED_MR. So userspace can set
>> that flag on a plain MR after registration, without the umem changing. Am I
>> missing something there?
>
> I assume this is a bug that needs to be fixed.
OK, I just sent the series that includes that too. It depends on ae36a5b609ae
("RDMA/rxe: validate access flags before swapping the MR's PD"), which moved
the validation above the mr->ibmr.pd swap. v2 is based on for-rc.
N.
> Thanks
>
>>
>> Thanks.
>>
>>>
>>> Thanks.