Re: [PATCH] mm: larger stack guard gap, between vmas
From: Linus Torvalds
Date: Wed Jul 05 2017 - 12:18:05 EST
On Wed, Jul 5, 2017 at 5:19 AM, Ben Hutchings <ben@xxxxxxxxxxxxxxx> wrote:
> On Tue, 2017-07-04 at 16:31 -0700, Linus Torvalds wrote:
>> Can you find out where that is allocated? Perhaps a breakpoint on
>> mmap, with a condition to catch that particular one?
> Found it, and it's now clear why only i386 is affected:
Thanks, good work.
Well, good work on *your* part. I will try very hard to refrain from
commenting too much on the f*cking stinking pile of sh*t that was
But yes, I don't think we can sanely recognize this. The code clearly
very intentionally does that mapping under the stack, and it's very
intentionally not PROT_NONE, since it's meant to be both writable and
As I said earlier (and I see Michal Hocko suggested the same - sudden
email flurry going on here), I think we need to basically allow people
to set the stack gap per-process to something low.
The good news is that this is probably specialized enough that we can
just keep the defaults as "will break this one case, but we give
people the tools to work around it".
I hate doing that, but distros that still support 32-bit (which is
apparently a shrinking number) can maybe hack the libreoffice launch