b1dca6
commit dce452dc5278f2985d21315721a6ba802537b862
b1dca6
Author: Siddhesh Poyarekar <siddhesh@sourceware.org>
b1dca6
Date:   Thu Aug 2 23:49:19 2018 +0530
b1dca6
b1dca6
    Rename the glibc.tune namespace to glibc.cpu
b1dca6
    
b1dca6
    The glibc.tune namespace is vaguely named since it is a 'tunable', so
b1dca6
    give it a more specific name that describes what it refers to.  Rename
b1dca6
    the tunable namespace to 'cpu' to more accurately reflect what it
b1dca6
    encompasses.  Also rename glibc.tune.cpu to glibc.cpu.name since
b1dca6
    glibc.cpu.cpu is weird.
b1dca6
    
b1dca6
            * NEWS: Mention the change.
b1dca6
            * elf/dl-tunables.list: Rename tune namespace to cpu.
b1dca6
            * sysdeps/powerpc/dl-tunables.list: Likewise.
b1dca6
            * sysdeps/x86/dl-tunables.list: Likewise.
b1dca6
            * sysdeps/aarch64/dl-tunables.list: Rename tune.cpu to
b1dca6
            cpu.name.
b1dca6
            * elf/dl-hwcaps.c (_dl_important_hwcaps): Adjust.
b1dca6
            * elf/dl-hwcaps.h (GET_HWCAP_MASK): Likewise.
b1dca6
            * manual/README.tunables: Likewise.
b1dca6
            * manual/tunables.texi: Likewise.
b1dca6
            * sysdeps/powerpc/cpu-features.c: Likewise.
b1dca6
            * sysdeps/unix/sysv/linux/aarch64/cpu-features.c
b1dca6
            (init_cpu_features): Likewise.
b1dca6
            * sysdeps/x86/cpu-features.c: Likewise.
b1dca6
            * sysdeps/x86/cpu-features.h: Likewise.
b1dca6
            * sysdeps/x86/cpu-tunables.c: Likewise.
b1dca6
            * sysdeps/x86_64/Makefile: Likewise.
b1dca6
            * sysdeps/x86/dl-cet.c: Likewise.
b1dca6
    
b1dca6
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
b1dca6
b1dca6
Conflicts:
b1dca6
	manual/tunables.texi
b1dca6
	  (Earlier backport of non-temporal memcpy threshold.)
b1dca6
	sysdeps/x86/Makefile
b1dca6
	  (Earlier CET backports.)
b1dca6
b1dca6
diff --git a/elf/dl-hwcaps.c b/elf/dl-hwcaps.c
b1dca6
index 23482a88a1c9bca9..ecf00b457760e517 100644
b1dca6
--- a/elf/dl-hwcaps.c
b1dca6
+++ b/elf/dl-hwcaps.c
b1dca6
@@ -140,7 +140,7 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
b1dca6
 	 string and bit like you can ignore an OS-supplied HWCAP bit.  */
b1dca6
       hwcap_mask |= (uint64_t) mask << _DL_FIRST_EXTRA;
b1dca6
 #if HAVE_TUNABLES
b1dca6
-      TUNABLE_SET (glibc, tune, hwcap_mask, uint64_t, hwcap_mask);
b1dca6
+      TUNABLE_SET (glibc, cpu, hwcap_mask, uint64_t, hwcap_mask);
b1dca6
 #else
b1dca6
       GLRO(dl_hwcap_mask) = hwcap_mask;
b1dca6
 #endif
b1dca6
diff --git a/elf/dl-hwcaps.h b/elf/dl-hwcaps.h
b1dca6
index 17f0da4c73772425..d69ee11dc27bb5e5 100644
b1dca6
--- a/elf/dl-hwcaps.h
b1dca6
+++ b/elf/dl-hwcaps.h
b1dca6
@@ -19,7 +19,7 @@
b1dca6
 #include <elf/dl-tunables.h>
b1dca6
 
b1dca6
 #if HAVE_TUNABLES
b1dca6
-# define GET_HWCAP_MASK() TUNABLE_GET (glibc, tune, hwcap_mask, uint64_t, NULL)
b1dca6
+# define GET_HWCAP_MASK() TUNABLE_GET (glibc, cpu, hwcap_mask, uint64_t, NULL)
b1dca6
 #else
b1dca6
 # ifdef SHARED
b1dca6
 #   define GET_HWCAP_MASK() GLRO(dl_hwcap_mask)
b1dca6
diff --git a/elf/dl-tunables.list b/elf/dl-tunables.list
b1dca6
index 1ff6fcb6f24f93a8..b7cc79f8bfe0a7c6 100644
b1dca6
--- a/elf/dl-tunables.list
b1dca6
+++ b/elf/dl-tunables.list
b1dca6
@@ -91,7 +91,7 @@ glibc {
b1dca6
       security_level: SXID_IGNORE
b1dca6
     }
b1dca6
   }
b1dca6
-  tune {
b1dca6
+  cpu {
b1dca6
     hwcap_mask {
b1dca6
       type: UINT_64
b1dca6
       env_alias: LD_HWCAP_MASK
b1dca6
diff --git a/manual/README.tunables b/manual/README.tunables
b1dca6
index 3967679f432a6378..f87a31a65e0a3455 100644
b1dca6
--- a/manual/README.tunables
b1dca6
+++ b/manual/README.tunables
b1dca6
@@ -105,11 +105,11 @@ where 'check' is the tunable name, 'int32_t' is the C type of the tunable and
b1dca6
 To get and set tunables in a different namespace from that module, use the full
b1dca6
 form of the macros as follows:
b1dca6
 
b1dca6
-  val = TUNABLE_GET_FULL (glibc, tune, hwcap_mask, uint64_t, NULL)
b1dca6
+  val = TUNABLE_GET_FULL (glibc, cpu, hwcap_mask, uint64_t, NULL)
b1dca6
 
b1dca6
-  TUNABLE_SET_FULL (glibc, tune, hwcap_mask, uint64_t, val)
b1dca6
+  TUNABLE_SET_FULL (glibc, cpu, hwcap_mask, uint64_t, val)
b1dca6
 
b1dca6
-where 'glibc' is the top namespace, 'tune' is the tunable namespace and the
b1dca6
+where 'glibc' is the top namespace, 'cpu' is the tunable namespace and the
b1dca6
 remaining arguments are the same as the short form macros.
b1dca6
 
b1dca6
 When TUNABLE_NAMESPACE is not defined in a module, TUNABLE_GET is equivalent to
b1dca6
diff --git a/manual/tunables.texi b/manual/tunables.texi
b1dca6
index 3e1e519dff153b09..ef10d2872cfc244e 100644
b1dca6
--- a/manual/tunables.texi
b1dca6
+++ b/manual/tunables.texi
b1dca6
@@ -307,23 +307,23 @@ The default value of this tunable is @samp{3}.
b1dca6
 @cindex non_temporal_threshold tunables
b1dca6
 @cindex tunables, non_temporal_threshold
b1dca6
 
b1dca6
-@deftp {Tunable namespace} glibc.tune
b1dca6
+@deftp {Tunable namespace} glibc.cpu
b1dca6
 Behavior of @theglibc{} can be tuned to assume specific hardware capabilities
b1dca6
-by setting the following tunables in the @code{tune} namespace:
b1dca6
+by setting the following tunables in the @code{cpu} namespace:
b1dca6
 @end deftp
b1dca6
 
b1dca6
-@deftp Tunable glibc.tune.hwcap_mask
b1dca6
+@deftp Tunable glibc.cpu.hwcap_mask
b1dca6
 This tunable supersedes the @env{LD_HWCAP_MASK} environment variable and is
b1dca6
 identical in features.
b1dca6
 
b1dca6
 The @code{AT_HWCAP} key in the Auxiliary Vector specifies instruction set
b1dca6
 extensions available in the processor at runtime for some architectures.  The
b1dca6
-@code{glibc.tune.hwcap_mask} tunable allows the user to mask out those
b1dca6
+@code{glibc.cpu.hwcap_mask} tunable allows the user to mask out those
b1dca6
 capabilities at runtime, thus disabling use of those extensions.
b1dca6
 @end deftp
b1dca6
 
b1dca6
-@deftp Tunable glibc.tune.hwcaps
b1dca6
-The @code{glibc.tune.hwcaps=-xxx,yyy,-zzz...} tunable allows the user to
b1dca6
+@deftp Tunable glibc.cpu.hwcaps
b1dca6
+The @code{glibc.cpu.hwcaps=-xxx,yyy,-zzz...} tunable allows the user to
b1dca6
 enable CPU/ARCH feature @code{yyy}, disable CPU/ARCH feature @code{xxx}
b1dca6
 and @code{zzz} where the feature name is case-sensitive and has to match
b1dca6
 the ones in @code{sysdeps/x86/cpu-features.h}.
b1dca6
@@ -331,8 +331,8 @@ the ones in @code{sysdeps/x86/cpu-features.h}.
b1dca6
 This tunable is specific to i386 and x86-64.
b1dca6
 @end deftp
b1dca6
 
b1dca6
-@deftp Tunable glibc.tune.cached_memopt
b1dca6
-The @code{glibc.tune.cached_memopt=[0|1]} tunable allows the user to
b1dca6
+@deftp Tunable glibc.cpu.cached_memopt
b1dca6
+The @code{glibc.cpu.cached_memopt=[0|1]} tunable allows the user to
b1dca6
 enable optimizations recommended for cacheable memory.  If set to
b1dca6
 @code{1}, @theglibc{} assumes that the process memory image consists
b1dca6
 of cacheable (non-device) memory only.  The default, @code{0},
b1dca6
@@ -341,8 +341,8 @@ indicates that the process may use device memory.
b1dca6
 This tunable is specific to powerpc, powerpc64 and powerpc64le.
b1dca6
 @end deftp
b1dca6
 
b1dca6
-@deftp Tunable glibc.tune.cpu
b1dca6
-The @code{glibc.tune.cpu=xxx} tunable allows the user to tell @theglibc{} to
b1dca6
+@deftp Tunable glibc.cpu.name
b1dca6
+The @code{glibc.cpu.name=xxx} tunable allows the user to tell @theglibc{} to
b1dca6
 assume that the CPU is @code{xxx} where xxx may have one of these values:
b1dca6
 @code{generic}, @code{falkor}, @code{thunderxt88}, @code{thunderx2t99},
b1dca6
 @code{thunderx2t99p1}.
b1dca6
@@ -350,20 +350,20 @@ assume that the CPU is @code{xxx} where xxx may have one of these values:
b1dca6
 This tunable is specific to aarch64.
b1dca6
 @end deftp
b1dca6
 
b1dca6
-@deftp Tunable glibc.tune.x86_data_cache_size
b1dca6
-The @code{glibc.tune.x86_data_cache_size} tunable allows the user to set
b1dca6
+@deftp Tunable glibc.cpu.x86_data_cache_size
b1dca6
+The @code{glibc.cpu.x86_data_cache_size} tunable allows the user to set
b1dca6
 data cache size in bytes for use in memory and string routines.
b1dca6
 
b1dca6
 This tunable is specific to i386 and x86-64.
b1dca6
 @end deftp
b1dca6
 
b1dca6
-@deftp Tunable glibc.tune.x86_shared_cache_size
b1dca6
-The @code{glibc.tune.x86_shared_cache_size} tunable allows the user to
b1dca6
+@deftp Tunable glibc.cpu.x86_shared_cache_size
b1dca6
+The @code{glibc.cpu.x86_shared_cache_size} tunable allows the user to
b1dca6
 set shared cache size in bytes for use in memory and string routines.
b1dca6
 @end deftp
b1dca6
 
b1dca6
-@deftp Tunable glibc.tune.x86_non_temporal_threshold
b1dca6
-The @code{glibc.tune.x86_non_temporal_threshold} tunable allows the user
b1dca6
+@deftp Tunable glibc.cpu.x86_non_temporal_threshold
b1dca6
+The @code{glibc.cpu.x86_non_temporal_threshold} tunable allows the user
b1dca6
 to set threshold in bytes for non temporal store. Non temporal stores
b1dca6
 give a hint to the hardware to move data directly to memory without
b1dca6
 displacing other data from the cache. This tunable is used by some
b1dca6
@@ -373,8 +373,8 @@ like memmove and memcpy.
b1dca6
 This tunable is specific to i386 and x86-64.
b1dca6
 @end deftp
b1dca6
 
b1dca6
-@deftp Tunable glibc.tune.x86_ibt
b1dca6
-The @code{glibc.tune.x86_ibt} tunable allows the user to control how
b1dca6
+@deftp Tunable glibc.cpu.x86_ibt
b1dca6
+The @code{glibc.cpu.x86_ibt} tunable allows the user to control how
b1dca6
 indirect branch tracking (IBT) should be enabled.  Accepted values are
b1dca6
 @code{on}, @code{off}, and @code{permissive}.  @code{on} always turns
b1dca6
 on IBT regardless of whether IBT is enabled in the executable and its
b1dca6
@@ -386,8 +386,8 @@ IBT on non-CET executables and shared libraries.
b1dca6
 This tunable is specific to i386 and x86-64.
b1dca6
 @end deftp
b1dca6
 
b1dca6
-@deftp Tunable glibc.tune.x86_shstk
b1dca6
-The @code{glibc.tune.x86_shstk} tunable allows the user to control how
b1dca6
+@deftp Tunable glibc.cpu.x86_shstk
b1dca6
+The @code{glibc.cpu.x86_shstk} tunable allows the user to control how
b1dca6
 the shadow stack (SHSTK) should be enabled.  Accepted values are
b1dca6
 @code{on}, @code{off}, and @code{permissive}.  @code{on} always turns on
b1dca6
 SHSTK regardless of whether SHSTK is enabled in the executable and its
b1dca6
diff --git a/sysdeps/aarch64/dl-tunables.list b/sysdeps/aarch64/dl-tunables.list
b1dca6
index f6a88168cc5ec7e6..cfcf940ebd15a9aa 100644
b1dca6
--- a/sysdeps/aarch64/dl-tunables.list
b1dca6
+++ b/sysdeps/aarch64/dl-tunables.list
b1dca6
@@ -17,8 +17,8 @@
b1dca6
 # <http://www.gnu.org/licenses/>.
b1dca6
 
b1dca6
 glibc {
b1dca6
-  tune {
b1dca6
-    cpu {
b1dca6
+  cpu {
b1dca6
+    name {
b1dca6
       type: STRING
b1dca6
     }
b1dca6
   }
b1dca6
diff --git a/sysdeps/powerpc/cpu-features.c b/sysdeps/powerpc/cpu-features.c
b1dca6
index 955d4778a69db607..ad809b9815eb68f0 100644
b1dca6
--- a/sysdeps/powerpc/cpu-features.c
b1dca6
+++ b/sysdeps/powerpc/cpu-features.c
b1dca6
@@ -30,7 +30,7 @@ init_cpu_features (struct cpu_features *cpu_features)
b1dca6
      tunables is enable, since for this case user can explicit disable
b1dca6
      unaligned optimizations.  */
b1dca6
 #if HAVE_TUNABLES
b1dca6
-  int32_t cached_memfunc = TUNABLE_GET (glibc, tune, cached_memopt, int32_t,
b1dca6
+  int32_t cached_memfunc = TUNABLE_GET (glibc, cpu, cached_memopt, int32_t,
b1dca6
 					NULL);
b1dca6
   cpu_features->use_cached_memopt = (cached_memfunc > 0);
b1dca6
 #else
b1dca6
diff --git a/sysdeps/powerpc/dl-tunables.list b/sysdeps/powerpc/dl-tunables.list
b1dca6
index d26636a16bfcd6d9..b3372555f75f8e38 100644
b1dca6
--- a/sysdeps/powerpc/dl-tunables.list
b1dca6
+++ b/sysdeps/powerpc/dl-tunables.list
b1dca6
@@ -17,7 +17,7 @@
b1dca6
 # <http://www.gnu.org/licenses/>.
b1dca6
 
b1dca6
 glibc {
b1dca6
-  tune {
b1dca6
+  cpu {
b1dca6
     cached_memopt {
b1dca6
       type: INT_32
b1dca6
       minval: 0
b1dca6
diff --git a/sysdeps/unix/sysv/linux/aarch64/cpu-features.c b/sysdeps/unix/sysv/linux/aarch64/cpu-features.c
b1dca6
index 39eba0186f55b5de..b4f348509eb1c6b3 100644
b1dca6
--- a/sysdeps/unix/sysv/linux/aarch64/cpu-features.c
b1dca6
+++ b/sysdeps/unix/sysv/linux/aarch64/cpu-features.c
b1dca6
@@ -57,7 +57,7 @@ init_cpu_features (struct cpu_features *cpu_features)
b1dca6
 
b1dca6
 #if HAVE_TUNABLES
b1dca6
   /* Get the tunable override.  */
b1dca6
-  const char *mcpu = TUNABLE_GET (glibc, tune, cpu, const char *, NULL);
b1dca6
+  const char *mcpu = TUNABLE_GET (glibc, cpu, name, const char *, NULL);
b1dca6
   if (mcpu != NULL)
b1dca6
     midr = get_midr_from_mcpu (mcpu);
b1dca6
 #endif
b1dca6
diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile
b1dca6
index d5f821e0831997ac..a936134a577e42a5 100644
b1dca6
--- a/sysdeps/x86/Makefile
b1dca6
+++ b/sysdeps/x86/Makefile
b1dca6
@@ -84,21 +84,21 @@ LDFLAGS-tst-cet-legacy-mod-6c.so = -Wl,--enable-new-dtags,-z,nodelete
b1dca6
 ifneq (no,$(have-tunables))
b1dca6
 $(objpfx)tst-cet-legacy-4a: $(libdl)
b1dca6
 $(objpfx)tst-cet-legacy-4a.out: $(objpfx)tst-cet-legacy-mod-4.so
b1dca6
-tst-cet-legacy-4a-ENV = GLIBC_TUNABLES=glibc.tune.x86_shstk=permissive
b1dca6
+tst-cet-legacy-4a-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=permissive
b1dca6
 $(objpfx)tst-cet-legacy-4b: $(libdl)
b1dca6
 $(objpfx)tst-cet-legacy-4b.out: $(objpfx)tst-cet-legacy-mod-4.so
b1dca6
-tst-cet-legacy-4b-ENV = GLIBC_TUNABLES=glibc.tune.x86_shstk=on
b1dca6
+tst-cet-legacy-4b-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=on
b1dca6
 $(objpfx)tst-cet-legacy-4c: $(libdl)
b1dca6
 $(objpfx)tst-cet-legacy-4c.out: $(objpfx)tst-cet-legacy-mod-4.so
b1dca6
-tst-cet-legacy-4c-ENV = GLIBC_TUNABLES=glibc.tune.x86_shstk=off
b1dca6
+tst-cet-legacy-4c-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=off
b1dca6
 $(objpfx)tst-cet-legacy-5b: $(libdl)
b1dca6
 $(objpfx)tst-cet-legacy-5b.out: $(objpfx)tst-cet-legacy-mod-5a.so \
b1dca6
 				$(objpfx)tst-cet-legacy-mod-5b.so
b1dca6
-tst-cet-legacy-5b-ENV = GLIBC_TUNABLES=glibc.tune.x86_ibt=off:glibc.tune.x86_shstk=off
b1dca6
+tst-cet-legacy-5b-ENV = GLIBC_TUNABLES=glibc.cpu.x86_ibt=off:glibc.cpu.x86_shstk=off
b1dca6
 $(objpfx)tst-cet-legacy-6b: $(libdl)
b1dca6
 $(objpfx)tst-cet-legacy-6b.out: $(objpfx)tst-cet-legacy-mod-6a.so \
b1dca6
 				$(objpfx)tst-cet-legacy-mod-6b.so
b1dca6
-tst-cet-legacy-6b-ENV = GLIBC_TUNABLES=glibc.tune.x86_ibt=off:glibc.tune.x86_shstk=off
b1dca6
+tst-cet-legacy-6b-ENV = GLIBC_TUNABLES=glibc.cpu.x86_ibt=off:glibc.cpu.x86_shstk=off
b1dca6
 endif
b1dca6
 endif
b1dca6
 
b1dca6
diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c
b1dca6
index 41f2d15fa5c8a756..3b268efbce627e6c 100644
b1dca6
--- a/sysdeps/x86/cpu-features.c
b1dca6
+++ b/sysdeps/x86/cpu-features.c
b1dca6
@@ -22,7 +22,7 @@
b1dca6
 #include <libc-pointer-arith.h>
b1dca6
 
b1dca6
 #if HAVE_TUNABLES
b1dca6
-# define TUNABLE_NAMESPACE tune
b1dca6
+# define TUNABLE_NAMESPACE cpu
b1dca6
 # include <unistd.h>		/* Get STDOUT_FILENO for _dl_printf.  */
b1dca6
 # include <elf/dl-tunables.h>
b1dca6
 
b1dca6
@@ -424,7 +424,7 @@ no_cpuid:
b1dca6
 
b1dca6
   /* Reuse dl_platform, dl_hwcap and dl_hwcap_mask for x86.  */
b1dca6
 #if !HAVE_TUNABLES && defined SHARED
b1dca6
-  /* The glibc.tune.hwcap_mask tunable is initialized already, so no need to do
b1dca6
+  /* The glibc.cpu.hwcap_mask tunable is initialized already, so no need to do
b1dca6
      this.  */
b1dca6
   GLRO(dl_hwcap_mask) = HWCAP_IMPORTANT;
b1dca6
 #endif
b1dca6
@@ -499,7 +499,7 @@ no_cpuid:
b1dca6
 	  /* Disable IBT and/or SHSTK if they are enabled by kernel, but
b1dca6
 	     disabled by environment variable:
b1dca6
 
b1dca6
-	     GLIBC_TUNABLES=glibc.tune.hwcaps=-IBT,-SHSTK
b1dca6
+	     GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK
b1dca6
 	   */
b1dca6
 	  unsigned int cet_feature = 0;
b1dca6
 	  if (!HAS_CPU_FEATURE (IBT))
b1dca6
diff --git a/sysdeps/x86/cpu-features.h b/sysdeps/x86/cpu-features.h
b1dca6
index 347a4b118d007fd8..4c6d08c709eea204 100644
b1dca6
--- a/sysdeps/x86/cpu-features.h
b1dca6
+++ b/sysdeps/x86/cpu-features.h
b1dca6
@@ -141,7 +141,7 @@ struct cpu_features
b1dca6
   unsigned long int xsave_state_size;
b1dca6
   /* The full state size for XSAVE when XSAVEC is disabled by
b1dca6
 
b1dca6
-     GLIBC_TUNABLES=glibc.tune.hwcaps=-XSAVEC_Usable
b1dca6
+     GLIBC_TUNABLES=glibc.cpu.hwcaps=-XSAVEC_Usable
b1dca6
    */
b1dca6
   unsigned int xsave_state_full_size;
b1dca6
   unsigned int feature[FEATURE_INDEX_MAX];
b1dca6
diff --git a/sysdeps/x86/cpu-tunables.c b/sysdeps/x86/cpu-tunables.c
b1dca6
index fad6726882fa7e2d..2e5d37753713e975 100644
b1dca6
--- a/sysdeps/x86/cpu-tunables.c
b1dca6
+++ b/sysdeps/x86/cpu-tunables.c
b1dca6
@@ -17,7 +17,7 @@
b1dca6
    <http://www.gnu.org/licenses/>.  */
b1dca6
 
b1dca6
 #if HAVE_TUNABLES
b1dca6
-# define TUNABLE_NAMESPACE tune
b1dca6
+# define TUNABLE_NAMESPACE cpu
b1dca6
 # include <stdbool.h>
b1dca6
 # include <stdint.h>
b1dca6
 # include <unistd.h>		/* Get STDOUT_FILENO for _dl_printf.  */
b1dca6
@@ -116,7 +116,7 @@ TUNABLE_CALLBACK (set_hwcaps) (tunable_val_t *valp)
b1dca6
      the hardware which wasn't available when the selection was made.
b1dca6
      The environment variable:
b1dca6
 
b1dca6
-     GLIBC_TUNABLES=glibc.tune.hwcaps=-xxx,yyy,-zzz,....
b1dca6
+     GLIBC_TUNABLES=glibc.cpu.hwcaps=-xxx,yyy,-zzz,....
b1dca6
 
b1dca6
      can be used to enable CPU/ARCH feature yyy, disable CPU/ARCH feature
b1dca6
      yyy and zzz, where the feature name is case-sensitive and has to
b1dca6
diff --git a/sysdeps/x86/dl-cet.c b/sysdeps/x86/dl-cet.c
b1dca6
index ebc0d577e414c807..d481bddc27e5d7cc 100644
b1dca6
--- a/sysdeps/x86/dl-cet.c
b1dca6
+++ b/sysdeps/x86/dl-cet.c
b1dca6
@@ -72,7 +72,7 @@ dl_cet_check (struct link_map *m, const char *program)
b1dca6
 	  /* Enable IBT and SHSTK only if they are enabled in executable.
b1dca6
 	     NB: IBT and SHSTK may be disabled by environment variable:
b1dca6
 
b1dca6
-	     GLIBC_TUNABLES=glibc.tune.hwcaps=-IBT,-SHSTK
b1dca6
+	     GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK
b1dca6
 	   */
b1dca6
 	  enable_ibt &= (HAS_CPU_FEATURE (IBT)
b1dca6
 			 && (enable_ibt_type == cet_always_on
b1dca6
diff --git a/sysdeps/x86/dl-tunables.list b/sysdeps/x86/dl-tunables.list
b1dca6
index 73886b1352316854..2a457d0eec9c3122 100644
b1dca6
--- a/sysdeps/x86/dl-tunables.list
b1dca6
+++ b/sysdeps/x86/dl-tunables.list
b1dca6
@@ -17,7 +17,7 @@
b1dca6
 # <http://www.gnu.org/licenses/>.
b1dca6
 
b1dca6
 glibc {
b1dca6
-  tune {
b1dca6
+  cpu {
b1dca6
     hwcaps {
b1dca6
       type: STRING
b1dca6
     }
b1dca6
diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile
b1dca6
index 9f1562f1b25a2df5..d51cf03ac92ebcc2 100644
b1dca6
--- a/sysdeps/x86_64/Makefile
b1dca6
+++ b/sysdeps/x86_64/Makefile
b1dca6
@@ -57,7 +57,7 @@ modules-names += x86_64/tst-x86_64mod-1
b1dca6
 LDFLAGS-tst-x86_64mod-1.so = -Wl,-soname,tst-x86_64mod-1.so
b1dca6
 ifneq (no,$(have-tunables))
b1dca6
 # Test the state size for XSAVE when XSAVEC is disabled.
b1dca6
-tst-x86_64-1-ENV = GLIBC_TUNABLES=glibc.tune.hwcaps=-XSAVEC_Usable
b1dca6
+tst-x86_64-1-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-XSAVEC_Usable
b1dca6
 endif
b1dca6
 
b1dca6
 $(objpfx)tst-x86_64-1: $(objpfx)x86_64/tst-x86_64mod-1.so
b1dca6
@@ -74,7 +74,7 @@ $(objpfx)tst-platform-1.out: $(objpfx)x86_64/tst-platformmod-2.so
b1dca6
 # Turn off AVX512F_Usable and AVX2_Usable so that GLRO(dl_platform) is
b1dca6
 # always set to x86_64.
b1dca6
 tst-platform-1-ENV = LD_PRELOAD=$(objpfx)\$$PLATFORM/tst-platformmod-2.so \
b1dca6
-	GLIBC_TUNABLES=glibc.tune.hwcaps=-AVX512F_Usable,-AVX2_Usable
b1dca6
+	GLIBC_TUNABLES=glibc.cpu.hwcaps=-AVX512F_Usable,-AVX2_Usable
b1dca6
 endif
b1dca6
 
b1dca6
 tests += tst-audit3 tst-audit4 tst-audit5 tst-audit6 tst-audit7 \