about summary refs log tree commit diff
path: root/sysdeps/x86/tst-cet-legacy-10.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-06-05 06:42:20 -0700
committerH.J. Lu <hjl.tools@gmail.com>2021-07-23 05:12:51 -0700
commit7c124e3714c38157230ed1a5d743b37defe64dc2 (patch)
treef1e13e18239c4421675234b56d880ae081d4bdcd /sysdeps/x86/tst-cet-legacy-10.c
parent5b8d271571434a74b2464c278eafe2ff81f31029 (diff)
downloadglibc-7c124e3714c38157230ed1a5d743b37defe64dc2.tar.gz
glibc-7c124e3714c38157230ed1a5d743b37defe64dc2.tar.xz
glibc-7c124e3714c38157230ed1a5d743b37defe64dc2.zip
x86: Install <bits/platform/x86.h> [BZ #27958]
1. Install <bits/platform/x86.h> for <sys/platform/x86.h> which includes
<bits/platform/x86.h>.
2. Rename HAS_CPU_FEATURE to CPU_FEATURE_PRESENT which checks if the
processor has the feature.
3. Rename CPU_FEATURE_USABLE to CPU_FEATURE_ACTIVE which checks if the
feature is active.  There may be other preconditions, like sufficient
stack space or further setup for AMX, which must be satisfied before the
feature can be used.

This fixes BZ #27958.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/x86/tst-cet-legacy-10.c')
-rw-r--r--sysdeps/x86/tst-cet-legacy-10.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sysdeps/x86/tst-cet-legacy-10.c b/sysdeps/x86/tst-cet-legacy-10.c
index a618557f45..cee4013c92 100644
--- a/sysdeps/x86/tst-cet-legacy-10.c
+++ b/sysdeps/x86/tst-cet-legacy-10.c
@@ -1,4 +1,4 @@
-/* Check CPU_FEATURE_USABLE on IBT and SHSTK.
+/* Check CPU_FEATURE_ACTIVE on IBT and SHSTK.
    Copyright (C) 2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -21,19 +21,19 @@
 #include <support/test-driver.h>
 #include <support/xunistd.h>
 
-/* Check that CPU_FEATURE_USABLE on IBT and SHSTK matches _get_ssp.  */
+/* Check that CPU_FEATURE_ACTIVE on IBT and SHSTK matches _get_ssp.  */
 
 static int
 do_test (void)
 {
   if (_get_ssp () != 0)
     {
-      if (CPU_FEATURE_USABLE (IBT) && CPU_FEATURE_USABLE (SHSTK))
+      if (CPU_FEATURE_ACTIVE (IBT) && CPU_FEATURE_ACTIVE (SHSTK))
 	return EXIT_SUCCESS;
     }
   else
     {
-      if (!CPU_FEATURE_USABLE (IBT) && !CPU_FEATURE_USABLE (SHSTK))
+      if (!CPU_FEATURE_ACTIVE (IBT) && !CPU_FEATURE_ACTIVE (SHSTK))
 	return EXIT_SUCCESS;
     }