[PATCH v2 1/1] aarch64: clear ZA state of SME before clone and clone3 syscalls
Mark Rutland
mark.rutland@arm.com
Tue Jun 10 13:49:00 GMT 2025
On Mon, Jun 09, 2025 at 05:01:21PM -0400, enh wrote:
> On Mon, Jun 9, 2025 at 8:51 AM Mark Rutland <mark.rutland@arm.com> wrote:
> > On Mon, Jun 09, 2025 at 08:16:46AM -0400, enh wrote:
> > > was there an answer to my earlier question of "if this was fixed in
> > > the kernel, and there are no released kernels that have SME support
> > > but don't have this fix, why would we have a workaround?".
> >
> > Sorry; Yury had asked me to respond regarding this, but I had been busy
> > elsewhere.
> >
> > The gist is that what the kernel now does is sufficient for typical libc
> > usage of clone(), for fork() and pthread_create() specifically (and IIUC
> > that's good enough for bionic), but we're not sure whether there's any
> > userspace usage of clone() that uses CLONE_* flags in a different
> > manner (e.g. via wrappers exposed from glibc). This is intended to
> > ensure that any such cases don't encounter problems.
>
> ...but then wouldn't bionic need similar changes, for its clone()?
Sorry, I had been under the (incorrect) impression that bionic did not
expose a clone() wrapper, and hence that wasn't something that bionic
needed to worry about.
With that in mind, yes, bionic would need similar changes for clone() to
handle those cases. As above, I don't know whether there's any
real-world usage where this is problematic, but the reasoning should
apply equally to glibc and bionic.
Mark.
More information about the Libc-alpha
mailing list