From: "Liam R. Howlett" <Liam.Howlett@Oracle.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linux-next@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] mm/mprotect: Fix do_mprotect_pkey() return on error
Date: Thu, 6 Apr 2023 18:04:37 -0400 [thread overview]
Message-ID: <20230406220437.wiks6gm3k6tt662f@revolver> (raw)
In-Reply-To: <20230406145345.9c5e4c91461cbf42509a92a9@linux-foundation.org>
* Andrew Morton <akpm@linux-foundation.org> [230406 17:53]:
> On Thu, 6 Apr 2023 15:30:50 -0400 "Liam R. Howlett" <Liam.Howlett@oracle.com> wrote:
>
> > When the loop over the VMA is terminated early due to an error, the
> > return code could be overwritten with ENOMEM. Fix the return code by
> > only setting the error on early loop termination when the error is not
> > set.
> >
> > Fixes: 2286a6914c77 ("mm: change mprotect_fixup to vma iterator")
> > Cc: <stable@vger.kernel.org>
>
> I do think we should always describe the user-visible effects when
> proposing a backport.
>
> a) so the -stable maintainers understand why we're recommending the
> backport and
>
> b) to help some poor soul who is looking at the patch wondering if
> it will fix his customer's bug report.
Thanks, I'll keep this in mind.
>
> How's this?
>
> : User-visible effects include: attempts to run mprotect() against a special
> : mapping or with a poorly-aligned hugetlb address should return -EINVAL,
> : but they presently return -ENOMEM.
That sounds reasonable, although this isn't an exhaustive list. It could
be an -EACCESS for multiple reasons, or anything the vm_ops returns.
prev parent reply other threads:[~2023-04-06 22:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-06 19:30 Liam R. Howlett
2023-04-06 21:53 ` Andrew Morton
2023-04-06 22:04 ` 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=20230406220437.wiks6gm3k6tt662f@revolver \
--to=liam.howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-next@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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