Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] mm,drm/i915,powerpc/spufs: vm_ops->access related fixes
@ 2026-11-22 17:55 David Hildenbrand (Arm)
  2026-11-22 17:55 ` [PATCH v2 1/4] mm: do not call vm_ops->access with FOLL_ANON David Hildenbrand (Arm)
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: David Hildenbrand (Arm) @ 2026-11-22 17:55 UTC (permalink / raw)
  To: Lorenzo Stoakes, Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
	Suren Baghdasaryan, Michal Hocko, Andrew Morton, Willy Tarreau,
	Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
	David Airlie, Simona Vetter, Chris Wilson, Matthew Auld,
	Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy (CS GROUP), Ritesh Harjani (IBM),
	Shrikanth Hegde, Rik van Riel, Benjamin Herrenschmidt
  Cc: linux-mm, linux-kernel, intel-gfx, dri-devel, linuxppc-dev,
	David Hildenbrand (Arm), Chris Mason, stable, Felix Kuehling,
	Christian König, Felix Kuehling

While working on vm_ops->access related fixes in core code for FOLL_ANON
and VMA access permission + size handling, I stumbled over two driver
issues.

Fixing it all in this series, because it's all intertwined. Only allow
FOLL_FORCE to bypass VMA permissions, similar to what GUP does for other
VMAs.

In patch #4 we break a debugging use case for older ROCm versions, and
forced writes to mappings of read-only files (e.g., DMA-bufs). Current
ROCm no longer relies on it, but old setups (e.g., MI100 with old
userspace) might break when updating the kernel.

Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
---
Changes in v2:
- Drop "drm/i915/selftests: request read access for mmap access tests"
- "mm: check permissions and bounds for vm_ops->access"
 - Allow reads of write-only mappings, as we historically did
 - Combine the permission check comments into one
 - Mention breaking forced writes to read-only files
 - Extend patch description
- Pick up tags
- Link to v1: https://patch.msgid.link/20261112-access_shite-v1-0-988a5c470db2@kernel.org

---
Chris Mason (1):
      mm: do not call vm_ops->access with FOLL_ANON

David Hildenbrand (Arm) (3):
      drm/i915: consider vm_pgoff in vm_access()
      powerpc/spufs: consider vm_pgoff in spufs_mem_mmap_access()
      mm: check permissions and bounds for vm_ops->access

 arch/powerpc/platforms/cell/spufs/file.c |  3 ++-
 drivers/gpu/drm/i915/gem/i915_gem_mman.c |  4 +++-
 mm/memory.c                              | 29 +++++++++++++++++++++++++++--
 3 files changed, 32 insertions(+), 4 deletions(-)
---
base-commit: 76d96c9641d0c1c0d0e92013a30bd887f8d2dbfe
change-id: 20261112-access_shite-d8a47559572e

Best regards,
--  
David Hildenbrand (Arm) <david@kernel.org>


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

end of thread, other threads:[~2026-11-22 17:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-22 17:55 [PATCH v2 0/4] mm,drm/i915,powerpc/spufs: vm_ops->access related fixes David Hildenbrand (Arm)
2026-11-22 17:55 ` [PATCH v2 1/4] mm: do not call vm_ops->access with FOLL_ANON David Hildenbrand (Arm)
2026-11-22 17:55 ` [PATCH v2 2/4] drm/i915: consider vm_pgoff in vm_access() David Hildenbrand (Arm)
2026-11-22 17:55 ` [PATCH v2 3/4] powerpc/spufs: consider vm_pgoff in spufs_mem_mmap_access() David Hildenbrand (Arm)
2026-11-22 17:55 ` [PATCH v2 4/4] mm: check permissions and bounds for vm_ops->access David Hildenbrand (Arm)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox