From: "Liam R. Howlett" <Liam.Howlett@Oracle.com>
To: Peter Xu <peterx@redhat.com>
Cc: Jeff Xu <jeffxu@chromium.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org, linux-hardening@vger.kernel.org,
Jorge Lucangeli Obes <jorgelo@chromium.org>,
lstoakes@gmail.com, zhangpeng.00@bytedance.com
Subject: Re: mprotect outbound check.
Date: Tue, 16 May 2023 12:57:54 -0400 [thread overview]
Message-ID: <20230516165754.pocx4kaagn3yyw3r@revolver> (raw)
In-Reply-To: <ZGOworXBstm+jmw3@x1n>
* Peter Xu <peterx@redhat.com> [230516 12:35]:
> On Mon, May 15, 2023 at 06:41:35PM -0700, Jeff Xu wrote:
> > + Peter, Lian, Lorenzo
> >
> > Is this related to this hotfix ?
> > mm/mprotect: fix do_mprotect_pkey() return on error
>
> Doesn't look like to me, that seems to only avoid replacing an error with
> another error, rather than stop returning error for any case.
>
> AFAIU this shouldn't be intentional, but Liam could correct. Maybe a
> bisection would show at least when it got changed?
I did not intentionally modify the return of mprotect for this case. As
Peter said, that change shouldn't cause the change in behaviour you are
seeing.
A bisection would help narrow it down, as it could be changes to mm/mmap
vma_merge() and friends.
Thanks,
Liam
>
> >
> >
> > Thanks!
> >
> > -Jeff
> >
> >
> >
> >
> >
> >
> > On Mon, May 15, 2023 at 11:00 AM Jeff Xu <jeffxu@chromium.org> wrote:
> > >
> > > Noticed there is a slight change for mprotect between 6.1 and 6.4 RC1
> > >
> > > For example:
> > > Consider the case below:
> > > 1 mmap(0x5000000, PAGE_SIZE, ...)
> > > 2 mprotect(0x5000000, PAGE_SIZE*4, ...)
> > >
> > > in 6.1 and before, 2 will fail, and in 6.4 RC1, it will pass.
> > >
> > > I know that munmap will accept out-of-bound cases like this (because
> > > memory is freed anyway).
> > >
> > > Is this change intentional ?
> > >
> > > Thanks!
> > > Best regards,
> > > -Jeff
> >
>
> --
> Peter Xu
>
>
prev parent reply other threads:[~2023-05-16 16:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-15 18:00 Jeff Xu
2023-05-16 1:41 ` Jeff Xu
2023-05-16 16:34 ` Peter Xu
2023-05-16 16:57 ` Liam R. Howlett [this message]
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=20230516165754.pocx4kaagn3yyw3r@revolver \
--to=liam.howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=jeffxu@chromium.org \
--cc=jorgelo@chromium.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lstoakes@gmail.com \
--cc=peterx@redhat.com \
--cc=zhangpeng.00@bytedance.com \
/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