linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] mseal cleanups
@ 2025-07-14 13:00 Lorenzo Stoakes
  2025-07-14 13:00 ` [PATCH 1/5] mm/mseal: always define VM_SEALED Lorenzo Stoakes
                   ` (4 more replies)
  0 siblings, 5 replies; 38+ messages in thread
From: Lorenzo Stoakes @ 2025-07-14 13:00 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Liam R . Howlett, David Hildenbrand, Vlastimil Babka, Jann Horn,
	Pedro Falcato, linux-mm, linux-kernel, Jeff Xu

Perform a number of cleanups to the mseal logic. Firstly, VM_SEALED is
treated differently from every other VMA flag, it really doesn't make sense
to do this and complicates logic, so we start by making this consistent
with everything else.

Next we place the madvise logic where it belongs - in mm/madvise.c. It
really makes no sense to abstract this elsewhere. In doing so, we go to
great lengths to explain very clearly the previously very confusing logic
as to what sealed mappings are impacted here.

We abstract out and explain the 'are there are any gaps in this range in
the mm?' check being performed as a prerequisite to mseal being performed,
and finally we simplify the actual mseal logic which is really quite
straightforward.

Lorenzo Stoakes (5):
  mm/mseal: always define VM_SEALED
  mm/mseal: move madvise() logic to mm/madvise.c
  mm/mseal: small cleanups
  mm/mseal: separate out and simplify VMA gap check
  mm/mseal: rework mseal apply logic

 include/linux/mm.h               |   6 +-
 mm/madvise.c                     |  62 +++++++++++-
 mm/mseal.c                       | 161 +++++--------------------------
 mm/vma.c                         |  18 ++++
 mm/vma.h                         |  26 +----
 tools/testing/vma/vma_internal.h |   6 +-
 6 files changed, 116 insertions(+), 163 deletions(-)

--
2.50.1


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

end of thread, other threads:[~2025-07-14 16:01 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-14 13:00 [PATCH 0/5] mseal cleanups Lorenzo Stoakes
2025-07-14 13:00 ` [PATCH 1/5] mm/mseal: always define VM_SEALED Lorenzo Stoakes
2025-07-14 14:31   ` David Hildenbrand
2025-07-14 15:20   ` Pedro Falcato
2025-07-14 15:32   ` Liam R. Howlett
2025-07-14 13:00 ` [PATCH 2/5] mm/mseal: move madvise() logic to mm/madvise.c Lorenzo Stoakes
2025-07-14 14:37   ` David Hildenbrand
2025-07-14 14:56     ` Lorenzo Stoakes
2025-07-14 15:03       ` David Hildenbrand
2025-07-14 15:18         ` Lorenzo Stoakes
2025-07-14 15:24           ` David Hildenbrand
2025-07-14 15:27             ` Lorenzo Stoakes
2025-07-14 15:37               ` David Hildenbrand
2025-07-14 15:31         ` Pedro Falcato
2025-07-14 15:37           ` Lorenzo Stoakes
2025-07-14 15:41           ` David Hildenbrand
2025-07-14 15:45             ` Lorenzo Stoakes
2025-07-14 15:52               ` David Hildenbrand
2025-07-14 16:01                 ` Lorenzo Stoakes
2025-07-14 15:18   ` Pedro Falcato
2025-07-14 15:33   ` Liam R. Howlett
2025-07-14 13:00 ` [PATCH 3/5] mm/mseal: small cleanups Lorenzo Stoakes
2025-07-14 14:39   ` David Hildenbrand
2025-07-14 15:23   ` Pedro Falcato
2025-07-14 15:33   ` Liam R. Howlett
2025-07-14 13:00 ` [PATCH 4/5] mm/mseal: separate out and simplify VMA gap check Lorenzo Stoakes
2025-07-14 14:41   ` David Hildenbrand
2025-07-14 15:17   ` Pedro Falcato
2025-07-14 15:23     ` Lorenzo Stoakes
2025-07-14 15:25       ` David Hildenbrand
2025-07-14 15:32         ` Lorenzo Stoakes
2025-07-14 15:40           ` Liam R. Howlett
2025-07-14 15:35   ` Liam R. Howlett
2025-07-14 15:40     ` Lorenzo Stoakes
2025-07-14 15:43       ` Liam R. Howlett
2025-07-14 15:47         ` Lorenzo Stoakes
2025-07-14 13:00 ` [PATCH 5/5] mm/mseal: rework mseal apply logic Lorenzo Stoakes
2025-07-14 15:26   ` Pedro Falcato

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).