RDMA/mlx5: Block delay drop to unprivileged users
Subsystems (2)
PATCH 1/1 RDMA/mlx5: Block delay drop to unprivileged users
From: Maor Gottlieb <[email protected]>
Since this feature can globally block the RX port, it should be allowed to privileged users only.
Fixes 03404e8ae652("IB/mlx5: Add support to dropless RQ")
Signed-off-by Maor Gottlieb <[email protected]>
Signed-off-by Leon Romanovsky <[email protected]>
---
Changelog:
v1: Changed permission from CAP_NET_RAW to be CAP_SYS_RAWIO like in
the devx code.
v0: https://lore.kernel.org/linux-rdma/[email protected]
--- drivers/infiniband/hw/mlx5/qp.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/infiniband/hw/mlx5/qp.c +4 -0
@@ -6247,6 +6247,10 @@ struct ib_wq *mlx5_ib_create_wq(struct ib_pd *pd,if (udata->outlen && udata->outlen < min_resp_len)return ERR_PTR (-EINVAL ); +if (!capable (CAP_SYS_RAWIO ) && + init_attr->create_flags &IB_WQ_FLAGS_DELAY_DROP ) +return ERR_PTR (-EPERM ); + dev =to_mdev (pd->device);switch (init_attr->wq_type) {case IB_WQT_RQ :
--
2.24.1
Quoted 8 lines · Leon Romanovsky
From: Maor Gottlieb <[email protected]>
Since this feature can globally block the RX port, it should be allowed to privileged users only.
Fixes 03404e8ae652("IB/mlx5: Add support to dropless RQ")Signed-off-by Maor Gottlieb <[email protected]>Signed-off-by Leon Romanovsky <[email protected]>
Quoted 8 lines
---
Changelog:
v1: Changed permission fromCAP_NET_RAWto beCAP_SYS_RAWIOlike in
the devx code.
v0: https://lore.kernel.org/linux-rdma/[email protected]--- drivers/infiniband/hw/mlx5/qp.c | 4 ++++ 1 file changed, 4 insertions(+)
Ah, this was merged into rc and is already in linus's tree
Thanks,
Jason