diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2018-07-25 08:40:39 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2018-07-25 08:40:50 -0700 |
commit | 08ac6bed146c0546d63163ac0d42c9a35880412d (patch) | |
tree | a3e3a44aea93c41afdfadfc25b9733b2b2468aa2 /sysdeps/unix/sysv/linux/x86/Makefile | |
parent | 9faaf9385034ac71f308643de1afc91b5dd731aa (diff) | |
download | glibc-08ac6bed146c0546d63163ac0d42c9a35880412d.tar.gz glibc-08ac6bed146c0546d63163ac0d42c9a35880412d.tar.xz glibc-08ac6bed146c0546d63163ac0d42c9a35880412d.zip |
x86/CET: Add a setcontext test for CET
Verify that setcontext works with gaps above and below the newly allocated shadow stack. * sysdeps/unix/sysv/linux/x86/Makefile (tests): Add tst-cet-setcontext-1 if CET is enabled. (CFLAGS-tst-cet-setcontext-1.c): Add -mshstk. * sysdeps/unix/sysv/linux/x86/tst-cet-setcontext-1.c: New file.
Diffstat (limited to 'sysdeps/unix/sysv/linux/x86/Makefile')
-rw-r--r-- | sysdeps/unix/sysv/linux/x86/Makefile | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/x86/Makefile b/sysdeps/unix/sysv/linux/x86/Makefile index 111ff9ff58..a30fdb1dc1 100644 --- a/sysdeps/unix/sysv/linux/x86/Makefile +++ b/sysdeps/unix/sysv/linux/x86/Makefile @@ -23,3 +23,10 @@ endif ifeq ($(subdir),setjmp) tests += tst-saved_mask-1 endif + +ifeq ($(enable-cet),yes) +ifeq ($(subdir),stdlib) +tests += tst-cet-setcontext-1 +CFLAGS-tst-cet-setcontext-1.c += -mshstk +endif +endif |