linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 6.6.y 0/5] fix error handling in mmap_region() and refactor (hotfixes)
@ 2024-11-15 12:41 Lorenzo Stoakes
  2024-11-15 12:41 ` [PATCH 6.6.y 1/5] mm: avoid unsafe VMA hook invocation when error arises on mmap hook Lorenzo Stoakes
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Lorenzo Stoakes @ 2024-11-15 12:41 UTC (permalink / raw)
  To: stable
  Cc: Andrew Morton, Liam R . Howlett, Vlastimil Babka, Jann Horn,
	linux-kernel, linux-mm, Linus Torvalds, Peter Xu,
	Catalin Marinas, Will Deacon, Mark Brown, David S . Miller,
	Andreas Larsson, James E . J . Bottomley, Helge Deller

Critical fixes for mmap_region(), backported to 6.6.y.

Some notes on differences from upstream:

* In this kernel is_shared_maywrite() does not exist and the code uses
  VM_SHARED to determine whether mapping_map_writable() /
  mapping_unmap_writable() should be invoked. This backport therefore
  follows suit.

* Each version of these series is confronted by a slightly different
  mmap_region(), so we must adapt the change for each stable version. The
  approach remains the same throughout, however, and we correctly avoid
  closing the VMA part way through any __mmap_region() operation.

Lorenzo Stoakes (5):
  mm: avoid unsafe VMA hook invocation when error arises on mmap hook
  mm: unconditionally close VMAs on error
  mm: refactor map_deny_write_exec()
  mm: refactor arch_calc_vm_flag_bits() and arm64 MTE handling
  mm: resolve faulty mmap_region() error path behaviour

 arch/arm64/include/asm/mman.h  |  10 ++-
 arch/parisc/include/asm/mman.h |   5 +-
 include/linux/mman.h           |  28 ++++++--
 mm/internal.h                  |  45 ++++++++++++
 mm/mmap.c                      | 128 ++++++++++++++++++---------------
 mm/mprotect.c                  |   2 +-
 mm/nommu.c                     |   9 ++-
 mm/shmem.c                     |   3 -
 8 files changed, 153 insertions(+), 77 deletions(-)

--
2.47.0


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

end of thread, other threads:[~2024-11-19 14:26 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-15 12:41 [PATCH 6.6.y 0/5] fix error handling in mmap_region() and refactor (hotfixes) Lorenzo Stoakes
2024-11-15 12:41 ` [PATCH 6.6.y 1/5] mm: avoid unsafe VMA hook invocation when error arises on mmap hook Lorenzo Stoakes
2024-11-19 14:25   ` Patch "mm: avoid unsafe VMA hook invocation when error arises on mmap hook" has been added to the 6.6-stable tree gregkh
2024-11-15 12:41 ` [PATCH 6.6.y 2/5] mm: unconditionally close VMAs on error Lorenzo Stoakes
2024-11-19 14:25   ` Patch "mm: unconditionally close VMAs on error" has been added to the 6.6-stable tree gregkh
2024-11-15 12:41 ` [PATCH 6.6.y 3/5] mm: refactor map_deny_write_exec() Lorenzo Stoakes
2024-11-19 14:25   ` Patch "mm: refactor map_deny_write_exec()" has been added to the 6.6-stable tree gregkh
2024-11-15 12:41 ` [PATCH 6.6.y 4/5] mm: refactor arch_calc_vm_flag_bits() and arm64 MTE handling Lorenzo Stoakes
2024-11-19 14:25   ` Patch "mm: refactor arch_calc_vm_flag_bits() and arm64 MTE handling" has been added to the 6.6-stable tree gregkh
2024-11-15 12:41 ` [PATCH 6.6.y 5/5] mm: resolve faulty mmap_region() error path behaviour Lorenzo Stoakes
2024-11-19 14:25   ` Patch "mm: resolve faulty mmap_region() error path behaviour" has been added to the 6.6-stable tree gregkh
2024-11-15 17:17 ` [PATCH 6.6.y 0/5] fix error handling in mmap_region() and refactor (hotfixes) Vlastimil Babka
2024-11-15 20:09 ` Liam R. Howlett
2024-11-19 13:16 ` Greg KH
2024-11-19 13:24   ` Lorenzo Stoakes
2024-11-19 14:14     ` Greg KH

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