The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
To: "David Hildenbrand (Arm)" <david@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	 "Liam R. Howlett" <liam@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	 Jann Horn <jannh@google.com>, Pedro Falcato <pfalcato@suse.de>,
	 Alexander Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
	 Kees Cook <kees@kernel.org>, Mike Rapoport <rppt@kernel.org>,
	 Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>,
	linux-mm@kvack.org,  linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/3] mm/mseal: limit scope of mseal address zero to address zero
Date: Fri, 17 Jul 2026 11:52:35 +0100	[thread overview]
Message-ID: <aloJYuQoMgg0Etz7@lucifer> (raw)
In-Reply-To: <fad6b639-1d55-4b25-b1bb-14ae56f04a6e@kernel.org>

On Fri, Jul 17, 2026 at 11:49:29AM +0100, David Hildenbrand (Arm) wrote:
>
> >> -static inline int do_mseal(unsigned long start, size_t len_in, unsigned long flags)
> >> -{
> >> -	/* noop on 32 bit */
> >> -	return 0;
> >> -}
> >> +static inline void mseal_mmap_page_zero(void) {}
> >>  #endif
> >>
> >>  /*
> >> diff --git a/mm/mseal.c b/mm/mseal.c
> >> index 207fea89c61e..5930551d84f2 100644
> >> --- a/mm/mseal.c
> >> +++ b/mm/mseal.c
> >> @@ -32,7 +32,7 @@ static bool range_contains_unmapped(unsigned long start, unsigned long end)
> >>  	return prev_end < end;
> >>  }
> >>
> >> -static int mseal_apply(unsigned long start, unsigned long end)
> >> +static int __mseal(unsigned long start, unsigned long end)
> >>  {
> >>  	struct vm_area_struct *vma, *prev;
> >>  	VMA_ITERATOR(vmi, current->mm, start);
> >> @@ -66,6 +66,38 @@ static int mseal_apply(unsigned long start, unsigned long end)
> >>  	return 0;
> >>  }
> >>
> >> +static int mseal(unsigned long start, unsigned long end)
> >
> > mseal_range() could be indeed nicer. But do_mseal() is now a pure helper for
> > "SYSCALL_DEFINE3(mseal" only ...could we simply inline do_mseal into
> > SYSCALL_DEFINE3(mseal)?
> >
> > We could do that separately, ofc.

Yeah I do this in 3/3 :P

> >
>
> Forgot
>
> Acked-by: David Hildenbrand (Arm) <david@kernel.org>

Thanks :)

>
> --
> Cheers,
>
> David

Cheers, Lorenzo

  reply	other threads:[~2026-07-17 10:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-16 13:43 [PATCH 0/3] mm/mseal: further cleanups Lorenzo Stoakes (ARM)
2026-07-16 13:43 ` [PATCH 1/3] mm/mseal: remove superfluous comments, fix confusion around mm Lorenzo Stoakes (ARM)
2026-07-16 15:00   ` Pedro Falcato
2026-07-17 10:33   ` David Hildenbrand (Arm)
2026-07-17 10:44     ` Lorenzo Stoakes (ARM)
2026-07-16 13:43 ` [PATCH 2/3] mm/mseal: limit scope of mseal address zero to address zero Lorenzo Stoakes (ARM)
2026-07-16 15:06   ` Pedro Falcato
2026-07-16 15:38     ` Lorenzo Stoakes (ARM)
2026-07-17 10:41       ` David Hildenbrand (Arm)
2026-07-17 10:51         ` Lorenzo Stoakes (ARM)
2026-07-17 10:46   ` David Hildenbrand (Arm)
2026-07-17 10:49     ` David Hildenbrand (Arm)
2026-07-17 10:52       ` Lorenzo Stoakes (ARM) [this message]
2026-07-16 13:43 ` [PATCH 3/3] mm/mseal: remove further superfluous comments, do_mseal() Lorenzo Stoakes (ARM)
2026-07-16 15:09   ` Pedro Falcato
2026-07-16 15:13     ` Lorenzo Stoakes (ARM)
2026-07-17  0:33   ` Andrew Morton
2026-07-17 11:06     ` Lorenzo Stoakes (ARM)
2026-07-17 10:50   ` David Hildenbrand (Arm)
2026-07-17 10:55     ` Lorenzo Stoakes (ARM)
2026-07-16 13:48 ` [PATCH 0/3] mm/mseal: further cleanups Lorenzo Stoakes (ARM)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aloJYuQoMgg0Etz7@lucifer \
    --to=ljs@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=david@kernel.org \
    --cc=jack@suse.cz \
    --cc=jannh@google.com \
    --cc=kees@kernel.org \
    --cc=liam@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=pfalcato@suse.de \
    --cc=rppt@kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox