HomeFreeBSD

mlx4: Map core_clock page to user space only when allowed

Description

mlx4: Map core_clock page to user space only when allowed

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.

Reviewed by: kib
Sponsored by: Mellanox Technologies // NVIDIA Networking

(cherry picked from commit c8301cbb0fa25d03c1b6b2d056497d5a1580a8b4)

Details

Provenance
hselaskyAuthored on Jun 16 2021, 1:02 PM
Parents
rGfdab56d1f605: mlx5en: Allow binding channels to CPUs when RSS is not enabled.
Branches
Unknown
Tags
Unknown