[PATCH 5/6] cet: Correctly run linux tests with SHSTK enabled in hwcaps
Arjun Shankar
arjun@redhat.com
Mon Nov 23 12:46:59 GMT 2026
Since 55d63e731253de82e96ed4ddca2e294076cd0bc5, CET is not set active
unless enabled in hwcaps. Because of this, the vfork test was being
marked UNSUPPORTED and the setcontext test was running and passing in
non-SHSTK mode.
Enable SHSTK in hwcaps for these tests so that they are executed in the
correct mode.
---
sysdeps/unix/sysv/linux/x86_64/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sysdeps/unix/sysv/linux/x86_64/Makefile b/sysdeps/unix/sysv/linux/x86_64/Makefile
index 528fd951b2..13668c5b79 100644
--- a/sysdeps/unix/sysv/linux/x86_64/Makefile
+++ b/sysdeps/unix/sysv/linux/x86_64/Makefile
@@ -116,10 +116,12 @@ endif
ifeq ($(subdir),posix)
tests += tst-cet-vfork-1
CFLAGS-tst-cet-vfork-1.c += -mshstk
+tst-cet-vfork-1-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK
endif
ifeq ($(subdir),stdlib)
tests += tst-cet-setcontext-1
CFLAGS-tst-cet-setcontext-1.c += -mshstk
+tst-cet-setcontext-1-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK
endif
endif
--
2.56.0
More information about the Libc-alpha
mailing list