[PATCH v4 5/5] nptl: add pthread_attr_{get,set}shadowstacksize

Mark Brown broonie@kernel.org
Mon Nov 24 14:43:19 GMT 2025


On Mon, Nov 24, 2025 at 11:00:08AM -0300, Adhemerval Zanella Netto wrote:

> The kernel limits the shadow stack size up to half of standard size or
> 2GB, whichever is smaller. Should we do the same?

That's a default value rather than a limit.

> Does it make sense to allow shadow stacks larger than user stacks?

Not currently, we require the return addresses to be pushed onto the
regular stack as well as the shadow stack so it must be at least the
same size.  For arm64 we support skipping the push to the regular stack
in the architecture but we'd need to define an ABI for actually using
that, currently userspace can't enable that mode.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20251124/71c33383/attachment.sig>


More information about the Libc-alpha mailing list