[PATCH v3 2/2] aarch64: Tests for locking GCS
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Thu Feb 12 17:19:54 GMT 2026
On 12/02/26 14:07, Mark Brown wrote:
> 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.
Fair enough.
More information about the Libc-alpha
mailing list