netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH rdma-next 0/6] BAR mappings fixes in RDMA
@ 2019-04-16 11:07 Leon Romanovsky
  2019-04-16 11:07 ` [PATCH rdma-next 1/6] RDMA/mlx5: Do not allow the user to write to the clock page Leon Romanovsky
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Leon Romanovsky @ 2019-04-16 11:07 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Leon Romanovsky, RDMA mailing list, Andrea Arcangeli,
	Feras Daoud, Haggai Eran, Jason Gunthorpe, Saeed Mahameed,
	linux-netdev

From: Leon Romanovsky <leonro@mellanox.com>

From Jason,

Upon review it turns out there are some long standing problems in BAR
mapping area:
 * BAR pages are being allowed to be executable.
 * BAR pages intended for read-only can be switched to writable via mprotect.
 * Missing use of rdma_user_mmap_io for the mlx5 clock BAR page.
 * Disassociate causes SIGBUS when touching the pages.
 * CPU pages are being mapped through to the process via remap_pfn_range
   instead of the more appropriate vm_insert_page, causing weird behaviors
   during disassociation.

This series adds the missing VM_* flag manipulation, adds faulting a zero
page for disassociation and revises the CPU page mappings to use vm_insert_page.

Thanks

Jason Gunthorpe (6):
  RDMA/mlx5: Do not allow the user to write to the clock page
  RDMA/mlx5: Use rdma_user_map_io for mapping BAR pages
  RDMA/ucontext: Do not allow BAR mappings to be executable
  RDMA/ucontext: Fix regression with disassociate
  RDMA/mlx5: Use get_zeroed_page() for clock_info
  RDMA: Remove rdma_user_mmap_page

 drivers/infiniband/core/uverbs.h              |   1 +
 drivers/infiniband/core/uverbs_main.c         | 115 ++++++++++--------
 drivers/infiniband/hw/mlx5/main.c             |  21 ++--
 .../ethernet/mellanox/mlx5/core/lib/clock.c   |  30 ++---
 include/linux/mlx5/driver.h                   |   1 -
 include/rdma/ib_verbs.h                       |   9 --
 6 files changed, 85 insertions(+), 92 deletions(-)

--
2.20.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-04-24 19:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-16 11:07 [PATCH rdma-next 0/6] BAR mappings fixes in RDMA Leon Romanovsky
2019-04-16 11:07 ` [PATCH rdma-next 1/6] RDMA/mlx5: Do not allow the user to write to the clock page Leon Romanovsky
2019-04-16 11:07 ` [PATCH rdma-next 2/6] RDMA/mlx5: Use rdma_user_map_io for mapping BAR pages Leon Romanovsky
2019-04-16 11:07 ` [PATCH rdma-next 3/6] RDMA/ucontext: Do not allow BAR mappings to be executable Leon Romanovsky
2019-04-17 19:05   ` Ruhl, Michael J
2019-04-18  5:58     ` Jason Gunthorpe
2019-04-18  6:30       ` Kees Cook
2019-04-18  7:01         ` Jason Gunthorpe
2019-04-18  7:23           ` Kees Cook
2019-04-22 12:51             ` Jason Gunthorpe
2019-04-16 11:07 ` [PATCH rdma-next 4/6] RDMA/ucontext: Fix regression with disassociate Leon Romanovsky
2019-04-16 11:07 ` [PATCH mlx5-next 5/6] RDMA/mlx5: Use get_zeroed_page() for clock_info Leon Romanovsky
2019-04-16 11:07 ` [PATCH rdma-next 6/6] RDMA: Remove rdma_user_mmap_page Leon Romanovsky
2019-04-24 19:24 ` [PATCH rdma-next 0/6] BAR mappings fixes in RDMA Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).