diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-04-27 15:44:07 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-05-18 08:38:53 -0700 |
commit | 9e38f455a6c602be86b7b5a8d6523cbdcd7ec051 (patch) | |
tree | 3fa62a570dd9ae651db62b21231a63358bd66edf /sysdeps/x86/dl-procruntime.c | |
parent | ce12fc711387375d0248ab3ff9084fb958c43bc6 (diff) | |
download | glibc-9e38f455a6c602be86b7b5a8d6523cbdcd7ec051.tar glibc-9e38f455a6c602be86b7b5a8d6523cbdcd7ec051.tar.gz glibc-9e38f455a6c602be86b7b5a8d6523cbdcd7ec051.tar.bz2 glibc-9e38f455a6c602be86b7b5a8d6523cbdcd7ec051.zip |
x86: Add --enable-cet=permissive
When CET is enabled, it is an error to dlopen a non CET enabled shared
library in CET enabled application. It may be desirable to make CET
permissive, that is disable CET when dlopening a non CET enabled shared
library. With the new --enable-cet=permissive configure option, CET is
disabled when dlopening a non CET enabled shared library.
Add DEFAULT_DL_X86_CET_CONTROL to config.h.in:
/* The default value of x86 CET control. */
#define DEFAULT_DL_X86_CET_CONTROL cet_elf_property
which enables CET features based on ELF property note.
--enable-cet=permissive it to
/* The default value of x86 CET control. */
#define DEFAULT_DL_X86_CET_CONTROL cet_permissive
which enables CET features permissively.
Update tst-cet-legacy-5a, tst-cet-legacy-5b, tst-cet-legacy-6a and
tst-cet-legacy-6b to check --enable-cet and --enable-cet=permissive.
Diffstat (limited to 'sysdeps/x86/dl-procruntime.c')
-rw-r--r-- | sysdeps/x86/dl-procruntime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/x86/dl-procruntime.c b/sysdeps/x86/dl-procruntime.c index 2c3e97952b..a3ec61b91e 100644 --- a/sysdeps/x86/dl-procruntime.c +++ b/sysdeps/x86/dl-procruntime.c @@ -65,8 +65,8 @@ PROCINFO_CLASS struct dl_x86_feature_control _dl_x86_feature_control # endif # ifndef PROCINFO_DECL = { - .ibt = cet_elf_property, - .shstk = cet_elf_property + .ibt = DEFAULT_DL_X86_CET_CONTROL, + .shstk = DEFAULT_DL_X86_CET_CONTROL, } # endif # if !defined SHARED || defined PROCINFO_DECL |