Re: [PATCH] RDMA/mlx4: Do not allow the user to write to the clock page

From: Leon Romanovsky

Date: Tue Sep 29 2026 - 15:04:30 EST



On Sat, 26 Sep 2026 19:11:50 +0800, Jiale Yao wrote:
> 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 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.
>
> [...]

Applied, thanks!

[1/1] RDMA/mlx4: Do not allow the user to write to the clock page
https://git.kernel.org/rdma/rdma/c/33db1d9683b8fb

Best regards,
--
Leon Romanovsky <leon@xxxxxxxxxx>