mirror_ubuntu-kernels/drivers/net/ethernet/mellanox/mlx4
Shay Drory 404e5a1269 RDMA/mlx4: Do not map the core_clock page to user space unless enabled
Currently when mlx4 maps the hca_core_clock page to the user space there
are read-modifiable registers, one of which is semaphore, on this page as
well as the clock counter. If user reads the wrong offset, it can modify
the semaphore and hang the device.

Do not map the hca_core_clock page to the user space unless the device has
been put in a backwards compatibility mode to support this feature.

After this patch, mlx4 core_clock won't be mapped to user space on the
majority of existing devices and the uverbs device time feature in
ibv_query_rt_values_ex() will be disabled.

Fixes: 52033cfb5a ("IB/mlx4: Add mmap call to map the hardware clock")
Link: https://lore.kernel.org/r/9632304e0d6790af84b3b706d8c18732bc0d5e27.1622726305.git.leonro@nvidia.com
Signed-off-by: Shay Drory <shayd@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2021-06-03 14:19:53 -03:00
..
alloc.c
catas.c
cmd.c net/mlx4: Treat VFs fair when handling comm_channel_events 2021-04-22 14:59:26 -07:00
cq.c net/mlx4: simplify the return expression of mlx4_init_cq_table() 2020-12-09 19:20:46 -08:00
crdump.c net/mlx4_core: Add missing iounmap() in error path 2020-04-25 20:43:56 -07:00
en_clock.c
en_cq.c net/mlx4: Use effective interrupt affinity 2020-12-15 16:19:33 +01:00
en_dcb_nl.c
en_ethtool.c net/mlx4: Fix EEPROM dump support 2021-05-10 14:34:39 -07:00
en_main.c
en_netdev.c net/mlx4_en: update moderation when config reset 2021-03-05 12:42:31 -08:00
en_port.c
en_port.h
en_resources.c
en_rx.c net, xdp: Introduce xdp_prepare_buff utility routine 2021-01-08 13:39:24 -08:00
en_selftest.c
en_tx.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-12-11 22:29:38 -08:00
eq.c net: mlx: convert tasklets to use new tasklet_setup() API 2020-09-14 13:02:37 -07:00
fw_qos.c
fw_qos.h net/mlx4: Cleanup kernel-doc warnings 2020-11-05 12:09:30 -08:00
fw.c RDMA/mlx4: Do not map the core_clock page to user space unless enabled 2021-06-03 14:19:53 -03:00
fw.h RDMA/mlx4: Do not map the core_clock page to user space unless enabled 2021-06-03 14:19:53 -03:00
icm.c
icm.h
intf.c
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
main.c RDMA/mlx4: Do not map the core_clock page to user space unless enabled 2021-06-03 14:19:53 -03:00
Makefile
mcg.c net/mlx4: Use fallthrough pseudo-keyword 2020-07-27 13:14:10 -07:00
mlx4_en.h net/mlx4_en: update moderation when config reset 2021-03-05 12:42:31 -08:00
mlx4_stats.h net/mlx4_en: Remove unused performance counters 2020-11-20 10:59:39 -08:00
mlx4.h net/mlx4: Treat VFs fair when handling comm_channel_events 2021-04-22 14:59:26 -07:00
mr.c net: ethernet: mlx4: Fix memory allocation in mlx4_buddy_init() 2020-09-01 13:13:15 -07:00
pd.c
port.c net/mlx4: Fix EEPROM dump support 2021-05-10 14:34:39 -07:00
profile.c
qp.c
reset.c
resource_tracker.c net/mlx4_core: Add missed mlx4_free_cmd_mailbox() 2021-02-22 19:08:33 -08:00
sense.c
srq.c net/mlx4: simplify the return expression of mlx4_init_srq_table() 2020-12-10 13:00:51 -08:00