From: Mikulas Patocka <mpatocka@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Vegard Nossum <vegard.nossum@oracle.com>,
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
Frank Scheiner <frank.scheiner@web.de>,
"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
Helge Deller <deller@gmx.de>,
John David Anglin <dave@parisc-linux.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-parisc@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] parisc: fix inability to allocate stack pages on exec
Date: Mon, 3 Jul 2023 22:40:10 +0200 (CEST) [thread overview]
Message-ID: <a8a1cd41-1246-e2cd-10ea-9bc571148afe@redhat.com> (raw)
In-Reply-To: <CAHk-=wj=vEtN54KzMHDrguaS8zNg4ppoFP4mm7vVThotGo53nQ@mail.gmail.com>
On Mon, 3 Jul 2023, Linus Torvalds wrote:
> On Mon, 3 Jul 2023 at 12:59, Mikulas Patocka <mpatocka@redhat.com> wrote:
> >
> > The patch 8d7071af8907 ("mm: always expand the stack with the mmap write
> > lock held") breaks PA-RISC.
> >
> > The breakage happens if we attempt to pass more arguments to execve than
> > what fits into the initial stack page - we get -E2BIG in such a case.
> >
> > The reason for the breakage is that the commit 8d7071af8907 adds the test
> > "if (!(vma->vm_flags & VM_GROWSDOWN)) return -EFAULT;" to the function
> > expand_downwards.
>
> Heh. See
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f66066bc5136f25e36a2daff4896c768f18c211e
>
> which fixes this differently (and, I think, much better).
>
> Just removing the VM_GROWSDOWN test will actually break some of the other users.
>
> Notably the new and improved expand_stack() function that now handles
> all the complicated *cough*ia64*cough* cases automatically, which
> allowed unifying the page fault handling code around this area.
>
> Linus
Yes - I confirm that this fixes it.
(please, also send this patch to Greg, so that it will be included in
6.4.2)
Mikulas
next prev parent reply other threads:[~2023-07-03 20:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-03 19:58 Mikulas Patocka
2023-07-03 20:06 ` Linus Torvalds
2023-07-03 20:40 ` Mikulas Patocka [this message]
2023-07-03 20:42 ` Linus Torvalds
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=a8a1cd41-1246-e2cd-10ea-9bc571148afe@redhat.com \
--to=mpatocka@redhat.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=akpm@linux-foundation.org \
--cc=dave@parisc-linux.org \
--cc=deller@gmx.de \
--cc=frank.scheiner@web.de \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-mm@kvack.org \
--cc=linux-parisc@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=vegard.nossum@oracle.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