[PATCH v2 0/3] mm/mseal: further cleanups
From: Lorenzo Stoakes (ARM)
Date: Fri Jul 17 2026 - 13:27:41 EST
The mseal implementation is still rather confusing, so tighten things up a
little.
The only user of do_mseal() outside of the system call is the MMAP_PAGE_ZERO
process personality - retain better control over how mseal is utilised by
providing mseal_mmap_page_zero() for this instead.
The comments are overly long and confusion, so cut them down so they're a lot
clearer.
Remove confusing mm_struct params (mseal can not be used on remote mm's) and
wrap the actual system call logic into the system call declaration.
---
v2:
* Added tags (thanks everyone!)
* Abstracted mm as per David.
* Renamed [__]mseal() to [__]mseal_range() as per Pedro.
* Moved to reverse xmas tree declarations.
* Tweaked commit message for 2/3.
v1:
https://patch.msgid.link/20260716-mseal-fixups-v1-0-3a9609bf041b@xxxxxxxxxx
To: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
To: "Liam R. Howlett" <liam@xxxxxxxxxxxxx>
To: Vlastimil Babka <vbabka@xxxxxxxxxx>
To: Jann Horn <jannh@xxxxxxxxxx>
To: Pedro Falcato <pfalcato@xxxxxxx>
To: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>
To: Christian Brauner <brauner@xxxxxxxxxx>
To: Jan Kara <jack@xxxxxxx>
To: Kees Cook <kees@xxxxxxxxxx>
To: David Hildenbrand <david@xxxxxxxxxx>
To: Mike Rapoport <rppt@xxxxxxxxxx>
To: Suren Baghdasaryan <surenb@xxxxxxxxxx>
To: Michal Hocko <mhocko@xxxxxxxx>
Cc: ljs@xxxxxxxxxx
Cc: linux-mm@xxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Cc: linux-fsdevel@xxxxxxxxxxxxxxx
---
Lorenzo Stoakes (ARM) (3):
mm/mseal: remove superfluous comments, fix confusion around mm
mm/mseal: limit scope of mseal address zero to address zero
mm/mseal: remove further superfluous comments, do_mseal()
fs/binfmt_elf.c | 7 +--
include/linux/mm.h | 8 +--
mm/mseal.c | 160 ++++++++++++++++++-----------------------------------
3 files changed, 58 insertions(+), 117 deletions(-)
---
base-commit: 59c684a9908d2e6f7a791f7f033eae57ec2b3a61
change-id: 20260716-mseal-fixups-131ad0939de2
Cheers,
--
Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>