Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] mm: reworked AI-generated VMA and mremap fixes
@ 2026-11-21 16:02 Lorenzo Stoakes (ARM)
  2026-11-21 16:02 ` [PATCH 1/7] mm/vma: error out on invalid bounds in unmapped_area_topdown() Lorenzo Stoakes (ARM)
                   ` (8 more replies)
  0 siblings, 9 replies; 31+ messages in thread
From: Lorenzo Stoakes (ARM) @ 2026-11-21 16:02 UTC (permalink / raw)
  To: Liam R. Howlett, Suren Baghdasaryan, Vlastimil Babka,
	Shakeel Butt, Pedro Falcato, David Hildenbrand, Jann Horn,
	Andrew Morton, Matthew Wilcox (Oracle), Kees Cook, Peter Zijlstra,
	Ollie Wild, Adrian Bunk, Xu Xin, Chengming Zhou, Mike Rapoport,
	Michal Hocko, Hugh Dickins, Joey Gouly, Catalin Marinas
  Cc: linux-mm, Chris Mason, Josef Bacik, Lorenzo Stoakes (ARM), stable

I have reordered the patches here by priority, David - the first 2 should
be prioritised as hotfixes, the rest can go in 7.5:

== Critical ==

1. unmapped_area_topdown() invalid bounds - possible memory corruption,
   triggerable by any local user.
2. Lock VMAs before mm_all_locks_mutex - system-wide unkillable hang,
   triggerable by a local user with FUSE.

== Need fixing ==

3. KSM unmerge only interrupted by fatal signal - silent data loss on
   mremap() of KSM memory.
4. Uncharge after failed stack relocation - strict overcommit limit
   defeated system-wide.
5. mmap() offset limits on mremap() expansion - invalid file offset
   reaches the DAX fault handler.

== Hardening (no need for Cc: stable) ==

6. Guard gaps on in-place mremap() expansion.
7. Non-executable brk mappings under MDWE.

As usual, please go through and check these carefully for correctness,
sanity.

Note that one of the original patches was punted over to the BPF
guys ([0]), as it doesn't feel that it'd make sense to change core mm to
address it.

[0]:https://lore.kernel.org/all/awGZWsCp6v63H_py@gremlin/

Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
---
Chris Mason (4):
      mm/vma: fix uncharge after failed stack relocation
      mm/mremap: apply the mmap() offset limits on expansion
      mm/mremap: respect guard gaps on in-place expansion
      mm/vma: make brk mappings non-executable under MDWE

Lorenzo Stoakes (ARM) (3):
      mm/vma: error out on invalid bounds in unmapped_area_topdown()
      mm/vma: lock VMAs before taking mm_all_locks_mutex
      mm/ksm: only interrupt unmerging on a fatal signal

 mm/internal.h |  2 ++
 mm/ksm.c      |  4 ++--
 mm/mmap.c     |  4 ++--
 mm/mremap.c   | 10 +++++++-
 mm/vma.c      | 75 ++++++++++++++++++++++++++++++-----------------------------
 mm/vma_exec.c | 22 +++++++++++++++---
 6 files changed, 72 insertions(+), 45 deletions(-)
---
base-commit: d12eccbcb79a4fa35c3aa588eb79056af62eb859
change-id: 20261120-some-more-ai-fixes-aed3c4b5ef5c

Cheers,
-- 
Lorenzo Stoakes (ARM) <ljs@kernel.org>



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

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

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-21 16:02 [PATCH 0/7] mm: reworked AI-generated VMA and mremap fixes Lorenzo Stoakes (ARM)
2026-11-21 16:02 ` [PATCH 1/7] mm/vma: error out on invalid bounds in unmapped_area_topdown() Lorenzo Stoakes (ARM)
2026-11-22  3:20   ` Suren Baghdasaryan
2026-11-22 15:55   ` Gregory Price (Meta)
2026-11-22 18:03   ` Jose A. Perez de Azpillaga
2026-11-21 16:02 ` [PATCH 2/7] mm/vma: lock VMAs before taking mm_all_locks_mutex Lorenzo Stoakes (ARM)
2026-11-22  3:23   ` Suren Baghdasaryan
2026-11-22 15:53   ` Gregory Price (Meta)
2026-11-22 18:03   ` Jose A. Perez de Azpillaga
2026-11-21 16:02 ` [PATCH 3/7] mm/ksm: only interrupt unmerging on a fatal signal Lorenzo Stoakes (ARM)
2026-11-22  3:27   ` Suren Baghdasaryan
2026-11-22 15:54   ` David Hildenbrand (Arm)
2026-11-22 15:56   ` Gregory Price (Meta)
2026-11-21 16:02 ` [PATCH 4/7] mm/vma: fix uncharge after failed stack relocation Lorenzo Stoakes (ARM)
2026-11-22  3:34   ` Suren Baghdasaryan
2026-11-22 15:50   ` Gregory Price (Meta)
2026-11-22 16:04   ` sashiko-bot
2026-11-21 16:02 ` [PATCH 5/7] mm/mremap: apply the mmap() offset limits on expansion Lorenzo Stoakes (ARM)
2026-11-22  3:37   ` Suren Baghdasaryan
2026-11-22 15:50   ` Gregory Price (Meta)
2026-11-22 18:03   ` Jose A. Perez de Azpillaga
2026-11-21 16:02 ` [PATCH 6/7] mm/mremap: respect guard gaps on in-place expansion Lorenzo Stoakes (ARM)
2026-11-22  3:41   ` Suren Baghdasaryan
2026-11-22 15:49   ` Gregory Price (Meta)
2026-11-22 18:03   ` Jose A. Perez de Azpillaga
2026-11-21 16:02 ` [PATCH 7/7] mm/vma: make brk mappings non-executable under MDWE Lorenzo Stoakes (ARM)
2026-11-22  3:46   ` Suren Baghdasaryan
2026-11-22 15:48   ` Gregory Price (Meta)
2026-11-22 18:03   ` Jose A. Perez de Azpillaga
2026-11-22 15:55 ` (subset) [PATCH 0/7] mm: reworked AI-generated VMA and mremap fixes David Hildenbrand
2026-11-22 15:57 ` Gregory Price (Meta)

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