[PATCH v3 2/2] aarch64: Tests for locking GCS

Mark Brown broonie@kernel.org
Thu Feb 12 17:07:51 GMT 2026


On Thu, Feb 12, 2026 at 01:58:11PM -0300, Adhemerval Zanella Netto wrote:
> On 09/02/26 08:58, Yury Khrustalev wrote:

> > +static int
> > +do_test_argv (int argc, char **argv)
> > +{
> > +  /* Check if GCS could possible by enabled.  */
> > +  if (!(getauxval (AT_HWCAP) & HWCAP_GCS))
> > +    FAIL_UNSUPPORTED ("kernel or CPU does not support GCS");

> Is checking HWCAP_GCS suffice to avoid false positive while checking GCS locking?
> I recall that there was some execve issue fixed only on recent kernels, but I
> don't recall whether this gates HWCAP_GCS advertise by the kernel.

> I did not see any issue with 6.19 on qemu though.

The fix is in all currently active stable kernels, and realistically
there isn't any way to test if it's there so this is sensible.  At the
minute you have to make a special effort to set up a virtual environment
which emulates all the shiny new features that aren't in hardware, it's
probably reasonable to assume that anyone doing that has arranged for an
up to date kernel.
-------------- 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/20260212/8bb7fbb2/attachment.sig>


More information about the Libc-alpha mailing list