diff options
| author | Jiale Yao <yaojiale02@163.com> | 2026-09-26 19:11:50 +0800 |
|---|---|---|
| committer | Leon Romanovsky <leon@kernel.org> | 2026-09-29 15:03:20 -0400 |
| commit | 33db1d9683b8fb00bc233d0bea093e694ed9afc5 (patch) | |
| tree | 1aa402c444231f9c338ce2f96ecc7a82e42098f5 /tools/lib/python | |
| parent | 2dc2126e690203d6adbddc7675927a242d810e43 (diff) | |
RDMA/mlx4: Do not allow the user to write to the clock page
mlx4_ib_mmap() maps the internal clock page to userspace through
rdma_user_mmap_io(), which does not restrict write access. Userspace can
request PROT_WRITE directly, or upgrade a read-only mapping later with
mprotect() because VM_MAYWRITE remains set.
Reject VM_WRITE, VM_EXEC and clear VM_MAYWRITE, applying the same read-only
policy as commit c660133c339f ("RDMA/mlx5: Do not allow the user to write to the
clock page"). The rdma-core mlx4 provider requests this mapping with
PROT_READ, so its existing behavior is unchanged.
Fixes: 52033cfb5aab ("IB/mlx4: Add mmap call to map the hardware clock")
Signed-off-by: Jiale Yao <yaojiale02@163.com>
Link: https://patch.msgid.link/20260926111150.3197004-1-yaojiale02@163.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
