aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/x86
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2023-03-10 13:18:10 -0800
committerH.J. Lu <hjl.tools@gmail.com>2023-12-19 06:57:32 -0800
commit71c0cc3357fe6d72f1dbef1c695e54b117d91b96 (patch)
tree5acb2a6c34fc05aeaf109959d5f376a21c002368 /sysdeps/x86
parentf418fe6f973300c4c61461ed241928cba11017c2 (diff)
downloadglibc-71c0cc3357fe6d72f1dbef1c695e54b117d91b96.tar
glibc-71c0cc3357fe6d72f1dbef1c695e54b117d91b96.tar.gz
glibc-71c0cc3357fe6d72f1dbef1c695e54b117d91b96.tar.bz2
glibc-71c0cc3357fe6d72f1dbef1c695e54b117d91b96.zip
x86/cet: Check CPU_FEATURE_ACTIVE when CET is disabled
Verify that CPU_FEATURE_ACTIVE (SHSTK) works properly when CET is disabled.
Diffstat (limited to 'sysdeps/x86')
-rw-r--r--sysdeps/x86/Makefile5
-rw-r--r--sysdeps/x86/tst-cet-legacy-10a-static.c2
-rw-r--r--sysdeps/x86/tst-cet-legacy-10a.c2
3 files changed, 9 insertions, 0 deletions
diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile
index a41598adf9..23f3ac1430 100644
--- a/sysdeps/x86/Makefile
+++ b/sysdeps/x86/Makefile
@@ -156,10 +156,13 @@ tests += \
tst-cet-legacy-9-static \
tst-cet-legacy-10 \
tst-cet-legacy-10-static \
+ tst-cet-legacy-10a \
+ tst-cet-legacy-10a-static \
# tests
tests-static += \
tst-cet-legacy-9-static \
tst-cet-legacy-10-static \
+ tst-cet-legacy-10a-static \
# tests-static
tst-cet-legacy-1a-ARGS = -- $(host-test-program-cmd)
@@ -226,6 +229,8 @@ CFLAGS-tst-cet-legacy-mod-6c.c += -fcf-protection
CFLAGS-tst-cet-legacy-7.c += -fcf-protection=none
CFLAGS-tst-cet-legacy-10.c += -mshstk
CFLAGS-tst-cet-legacy-10-static.c += -mshstk
+CFLAGS-tst-cet-legacy-10a.c += -fcf-protection=none
+CFLAGS-tst-cet-legacy-10a-static.c += -fcf-protection=none
CFLAGS-tst-shstk-legacy-1a.c += -fcf-protection=none
CFLAGS-tst-shstk-legacy-1a-static.c += -fcf-protection=none
diff --git a/sysdeps/x86/tst-cet-legacy-10a-static.c b/sysdeps/x86/tst-cet-legacy-10a-static.c
new file mode 100644
index 0000000000..05073a5d1e
--- /dev/null
+++ b/sysdeps/x86/tst-cet-legacy-10a-static.c
@@ -0,0 +1,2 @@
+#pragma GCC target ("shstk")
+#include "tst-cet-legacy-10.c"
diff --git a/sysdeps/x86/tst-cet-legacy-10a.c b/sysdeps/x86/tst-cet-legacy-10a.c
new file mode 100644
index 0000000000..05073a5d1e
--- /dev/null
+++ b/sysdeps/x86/tst-cet-legacy-10a.c
@@ -0,0 +1,2 @@
+#pragma GCC target ("shstk")
+#include "tst-cet-legacy-10.c"