lkml.org 
[lkml]   [2021]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH rdma-rc] RDMA/mlx4: Map core_clock page to user space only when allowed
On Thu, Jun 03, 2021 at 04:19:39PM +0300, Leon Romanovsky wrote:
> From: Shay Drory <shayd@nvidia.com>
>
> Currently when we map the hca_core_clock page to the user space,
> there are vulnerable registers, one of which is semaphore, on
> this page as well. If user read the wrong offset, it can modify the
> above semaphore and hang the device.
>
> Hence, mapping the hca_core_clock page to the user space only when
> user required it specifically.
>
> After this patch, mlx4 core_clock won't be mapped to user space by
> default. Oppose to current state, where mlx4 core_clock is always mapped
> to user space.
>
> Fixes: 52033cfb5aab ("IB/mlx4: Add mmap call to map the hardware clock")
> Signed-off-by: Shay Drory <shayd@nvidia.com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
> drivers/infiniband/hw/mlx4/main.c | 5 +----
> drivers/net/ethernet/mellanox/mlx4/fw.c | 3 +++
> drivers/net/ethernet/mellanox/mlx4/fw.h | 1 +
> drivers/net/ethernet/mellanox/mlx4/main.c | 6 ++++++
> include/linux/mlx4/device.h | 1 +
> 5 files changed, 12 insertions(+), 4 deletions(-)

Applied to for-rc, thanks

Jason

\
 
 \ /
  Last update: 2021-06-03 19:40    [W:0.035 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site