[PATCH 3/6] cet: Correctly run dlopen tests with SHSTK enabled in hwcaps
Yury Khrustalev
yury.khrustalev@arm.com
Mon Nov 23 14:19:22 GMT 2026
Hi Arjun,
On Mon, Nov 23, 2026 at 01:46:57PM +0100, Arjun Shankar wrote:
> The tst-cet-legacy-{4,5,6}* tests exercise dlopen with CET. However,
> since 55d63e731253de82e96ed4ddca2e294076cd0bc5, CET is not set active
> unless enabled in hwcaps. Some of the tests were silently running and
> passing in non-SHSTK mode.
>
> ...
>
> tst-cet-legacy-4-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK
> -tst-cet-legacy-6-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK
> +tst-cet-legacy-5a-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK
> +tst-cet-legacy-6a-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK
> tst-cet-legacy-10-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK
> tst-cet-legacy-10-static-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK
> tst-cet-legacy-10a-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK
> @@ -425,11 +427,11 @@ $(objpfx)tst-cet-legacy-mod-6a.so: $(objpfx)tst-cet-legacy-mod-6c.so
> $(objpfx)tst-cet-legacy-mod-6b.so: $(objpfx)tst-cet-legacy-mod-6c.so
> LDFLAGS-tst-cet-legacy-mod-6c.so = -Wl,--enable-new-dtags,-z,nodelete
> $(objpfx)tst-cet-legacy-4a.out: $(objpfx)tst-cet-legacy-mod-4.so
> -tst-cet-legacy-4a-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=permissive
> +tst-cet-legacy-4a-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK:glibc.cpu.x86_shstk=permissive
> $(objpfx)tst-cet-legacy-4b.out: $(objpfx)tst-cet-legacy-mod-4.so
> -tst-cet-legacy-4b-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=on
> +tst-cet-legacy-4b-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK:glibc.cpu.x86_shstk=on
> $(objpfx)tst-cet-legacy-4c.out: $(objpfx)tst-cet-legacy-mod-4.so
> -tst-cet-legacy-4c-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=off
> +tst-cet-legacy-4c-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK:glibc.cpu.x86_shstk=off
> $(objpfx)tst-cet-legacy-5b.out: $(objpfx)tst-cet-legacy-mod-5a.so \
> $(objpfx)tst-cet-legacy-mod-5b.so
> tst-cet-legacy-5b-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK
Please consider using tst-name-TUNABLES instead of tst-name-ENV like
I do in this patch:
https://inbox.sourceware.org/libc-alpha/20261123125023.4064006-4-arjun@redhat.com/
Thanks,
Yury
More information about the Libc-alpha
mailing list