diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-01-12 19:00:13 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2021-01-13 05:03:34 -0800 |
commit | 2ef23b520597f4ea1790a669b83e608f24f4cf12 (patch) | |
tree | b9b38477b14203a05128302e42db909025011180 /sysdeps/x86/dl-cet.c | |
parent | f430293d842031f2afc3013f156e1018065e480e (diff) | |
download | glibc-2ef23b520597f4ea1790a669b83e608f24f4cf12.zip glibc-2ef23b520597f4ea1790a669b83e608f24f4cf12.tar.gz glibc-2ef23b520597f4ea1790a669b83e608f24f4cf12.tar.bz2 |
x86: Set header.feature_1 in TCB for always-on CET [BZ #27177]
Update dl_cet_check() to set header.feature_1 in TCB when both IBT and
SHSTK are always on.
Diffstat (limited to 'sysdeps/x86/dl-cet.c')
-rw-r--r-- | sysdeps/x86/dl-cet.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdeps/x86/dl-cet.c b/sysdeps/x86/dl-cet.c index ed7fd6d..a63b9c7 100644 --- a/sysdeps/x86/dl-cet.c +++ b/sysdeps/x86/dl-cet.c @@ -47,7 +47,10 @@ dl_cet_check (struct link_map *m, const char *program) /* No legacy object check if both IBT and SHSTK are always on. */ if (enable_ibt_type == cet_always_on && enable_shstk_type == cet_always_on) - return; + { + THREAD_SETMEM (THREAD_SELF, header.feature_1, GL(dl_x86_feature_1)); + return; + } /* Check if IBT is enabled by kernel. */ bool ibt_enabled |