Re: [RFC PATCH 0/4] x86: Improve Minimum Alternate Stack Size
From: Dave Martin
Date: Tue Oct 06 2020 - 13:00:29 EST
On Tue, Oct 06, 2020 at 08:33:47AM -0700, Dave Hansen wrote:
> On 10/6/20 8:25 AM, Dave Martin wrote:
> > Or are people reporting real stack overruns on x86 today?
>
> We have real overruns. We have ~2800 bytes of XSAVE (regisiter) state
> mostly from AVX-512, and a 2048 byte MINSIGSTKSZ.
Right. Out of interest, do you believe that's a direct consequence of
the larger kernel-generated signal frame, or does the expansion of
userspace stack frames play a role too?
In practice software just assumes SIGSTKSZ and then ignores the problem
until / unless an actual stack overflow is seen.
There's probably a lot of software out there whose stack is
theoretically too small even without AVX-512 etc. in the mix, especially
when considering the possibility of nested signals...
Cheers
---Dave