aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/x86/cpu-features.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/x86/cpu-features.c')
-rw-r--r--sysdeps/x86/cpu-features.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c
index bfb415f05a..b6d5d9d4b1 100644
--- a/sysdeps/x86/cpu-features.c
+++ b/sysdeps/x86/cpu-features.c
@@ -39,7 +39,6 @@ extern void TUNABLE_CALLBACK (set_x86_shstk) (tunable_val_t *)
#if CET_ENABLED
# include <dl-cet.h>
-# include <cet-tunables.h>
#endif
static void
@@ -620,7 +619,7 @@ no_cpuid:
if (cet_status)
{
- GL(dl_x86_feature_1)[0] = cet_status;
+ GL(dl_x86_feature_1) = cet_status;
# ifndef SHARED
/* Check if IBT and SHSTK are enabled by kernel. */
@@ -644,14 +643,13 @@ no_cpuid:
/* Clear the disabled bits in dl_x86_feature_1. */
if (res == 0)
- GL(dl_x86_feature_1)[0] &= ~cet_feature;
+ GL(dl_x86_feature_1) &= ~cet_feature;
}
/* Lock CET if IBT or SHSTK is enabled in executable. Don't
- lock CET if SHSTK is enabled permissively. */
- if (((GL(dl_x86_feature_1)[1] >> CET_MAX)
- & ((1 << CET_MAX) - 1))
- != CET_PERMISSIVE)
+ lock CET if IBT or SHSTK is enabled permissively. */
+ if (GL(dl_x86_feature_control).ibt != cet_permissive
+ && GL(dl_x86_feature_control).shstk != cet_permissive)
dl_cet_lock_cet ();
}
# endif