[PATCH v4 2/2] manual: add architecture specific note on clone and clone3 syscalls

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Tue Sep 23 12:27:41 GMT 2025



On 01/09/25 06:51, Yury Khrustalev wrote:
> Add a new section for architecture specific notes for syscalls.
> 
> Add a note about calling the __arm_za_disable() function when the
> clone and clone3 syscalls are invoked directly via the syscall()
> function rather than using Glibc wrapper.
> ---
>  manual/startup.texi | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/manual/startup.texi b/manual/startup.texi
> index c444750479..1e9ba8ef9e 100644
> --- a/manual/startup.texi
> +++ b/manual/startup.texi
> @@ -804,6 +804,19 @@ if (rc == -1)
>  
>  @end deftypefun
>  
> +@subsection Architecture specific notes on system calls
> +
> +Because @code{syscall} function does not know anything about what a particular
> +system call does or what are the ABI requirements for it, it is important to be
> +aware of any additional requirements that the target kernel might have for
> +certain system calls.
> +
> +On AArch64 systems with enabled SME extension, system calls with @var{sysno}
> +equal to @code{SYS_clone} or @code{SYS_clone3} must be preceded with a call
> +to the @code{__arm_za_disable()} function in order to disable ZA state of SME
> +(see @url{https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst}
> +for details) . When the @code{clone()} wrapper provided by @theglibc{} is used,
> +this would happen automatically.

I am not sure if this adds much w.r.t to glibc usage: clone/clone3 is not really
usable through syscall() interface so callers will need to bypass the libc to
correctly use these kernel interfaces. 

>  
>  @node Program Termination
>  @section Program Termination



More information about the Libc-alpha mailing list