[PATCH rdma-next 04/15] RDMA/core: Allow optional access flags in reg mr ioctl
From: Michael Gur
Date: Sun Jul 26 2026 - 05:32:03 EST
The uverbs ABI reserves the optional access flags range as best-effort:
drivers should accept any flag in this range and treat the actual support
as opportunistic, never failing registration when an optional flag is
requested.
Add the optional access flag to the allow-list of dmabuf registration
through the reg_mr ioctl. Uverbs users can now request any optional access
flag on dmabuf registrations and mlx5 will apply the flag's effect on a
best-effort basis when supported.
Fixes: 5b2e45049dc0 ("IB/core: Add UVERBS_METHOD_REG_MR on the MR object")
Cc: stable@xxxxxxxxxxxxxxx
Reviewed-by: Yishai Hadas <yishaih@xxxxxxxxxx>
Signed-off-by: Michael Gur <michaelgur@xxxxxxxxxx>
---
drivers/infiniband/core/uverbs_std_types_mr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/core/uverbs_std_types_mr.c b/drivers/infiniband/core/uverbs_std_types_mr.c
index b6d6cbe448a2..ce6c9aaea95d 100644
--- a/drivers/infiniband/core/uverbs_std_types_mr.c
+++ b/drivers/infiniband/core/uverbs_std_types_mr.c
@@ -332,7 +332,7 @@ static int UVERBS_HANDLER(UVERBS_METHOD_REG_MR)(
IB_ACCESS_REMOTE_READ |
IB_ACCESS_REMOTE_WRITE |
IB_ACCESS_REMOTE_ATOMIC |
- IB_ACCESS_RELAXED_ORDERING;
+ IB_ACCESS_OPTIONAL;
} else {
if (!has_addr || has_fd_offset)
return -EINVAL;
--
2.52.0