# Re: \[PATCH v9 0/6\] Improve Minimum Alternate Stack Size

- From: Thomas Gleixner \<hidden\>
- Date: 2021-05-19 09:25:12 
- List: linux-api
- Page: https://ratatoskr.run/linux-api/2021/05/1383162
- Thread: https://ratatoskr.run/linux-arch/2021/05/1382546/t.md

```text
On Tue, May 18 2021 at 13:03, Chang S. Bae wrote:
> During signal entry, the kernel pushes data onto the normal userspace
> stack. On x86, the data pushed onto the user stack includes XSAVE state,
> which has grown over time as new features and larger registers have been
> added to the architecture.
>
> MINSIGSTKSZ is a constant provided in the kernel signal.h headers and
> typically distributed in lib-dev(el) packages, e.g. [1]. Its value is
> compiled into programs and is part of the user/kernel ABI. The MINSIGSTKSZ
> constant indicates to userspace how much data the kernel expects to push on
> the user stack, [2][3].
>
> However, this constant is much too small and does not reflect recent
> additions to the architecture. For instance, when AVX-512 states are in
> use, the signal frame size can be 3.5KB while MINSIGSTKSZ remains 2KB.
>
> The bug report [4] explains this as an ABI issue. The small MINSIGSTKSZ can
> cause user stack overflow when delivering a signal.

Acked-by: Thomas Gleixner <redacted>
```
