[RFC 2/5] aarch64: check if clone3 supports shadow stack

Yury Khrustalev yury.khrustalev@arm.com
Thu Jun 12 08:28:22 GMT 2025


On Wed, Jun 11, 2025 at 05:42:58PM -0300, Adhemerval Zanella Netto wrote:
> 
> With clone3 probing we will need to change __clone_internal to return

We could do the check in thread_alloc_shadow_stack() and cache the result
in the same way we do clone3_supported in __clone3_internal() or write
atomically into GL (dl_aarch64_cpu_features).clone3_has_shadow_stack

> ...

> We will also probably need to add some clone3 syscall optimization to 
> avoid keep trying it with large clone_args on kernels without 
> shadow_stack_token support, but we already do this for other syscalls.

Since clone3() is not part of public API, whoever calls it directly should
take care of handling all errors.

Thanks,
Yury



More information about the Libc-alpha mailing list