Skip to content

mm,drm/i915,powerpc/spufs: vm_ops->access related fixes

David Hildenbrand (Arm) dri-devel intel-gfx linux-mm linuxppc-dev lkml stable 2 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected] change-id 20261112-access_shite-d8a47559572e

Versions newest first

  1. v2 Latest4 patches 7 repliesApplied
  2. v15 patches 10 repliesSuperseded

Changes in v2 from the cover letter

- 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/[email protected]

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/4mm: do not call vm_ops->access with FOLL_ANONmm/memory.c+3 -00 replies
2/4drm/i915: consider vm_pgoff in vm_access()drivers/gpu/drm/i915/gem/i915_gem_mman.c+3 -11 reply
3/4powerpc/spufs: consider vm_pgoff in spufs_mem_mmap_access()arch/powerpc/platforms/cell/spufs/file.c+2 -13 replies
4/4mm: check permissions and bounds for vm_ops->accessmm/memory.c+24 -21 reply

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchLorenzo Stoakes (ARM)Felix KuehlingChristian KönigMadhavan Srinivasan
1/4R-b
2/4A-b
3/4A-b A-b
4/4R-b A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/4] mm,drm/i915,powerpc/spufs: vm_ops->access related fixes

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.

---
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/[email protected]

---
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,

Signature · 1 line
David Hildenbrand (Arm) <[email protected]>