about summary refs log tree commit diff
path: root/sysdeps/x86/cpu-tunables.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-03-19 06:15:37 -0700
committerH.J. Lu <hjl.tools@gmail.com>2021-03-29 06:04:17 -0700
commit27f74636752d0c4438cf8346cf2a76b6fcf3be16 (patch)
treed3710a44e90b6e6ab090a7de68b3437e41280b1f /sysdeps/x86/cpu-tunables.c
parentcb882b21b63606aabd6e55afe23b42434d95f2ef (diff)
downloadglibc-27f74636752d0c4438cf8346cf2a76b6fcf3be16.tar.gz
glibc-27f74636752d0c4438cf8346cf2a76b6fcf3be16.tar.xz
glibc-27f74636752d0c4438cf8346cf2a76b6fcf3be16.zip
x86: Properly disable XSAVE related features [BZ #27605]
1. Support GLIBC_TUNABLES=glibc.cpu.hwcaps=-XSAVE.
2. Disable all features which depend on XSAVE:
   a. If OSXSAVE is disabled by glibc tunables.  Or
   b. If both XSAVE and XSAVEC aren't usable.
Diffstat (limited to 'sysdeps/x86/cpu-tunables.c')
-rw-r--r--sysdeps/x86/cpu-tunables.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sysdeps/x86/cpu-tunables.c b/sysdeps/x86/cpu-tunables.c
index 126896f41b..61b05e5b1d 100644
--- a/sysdeps/x86/cpu-tunables.c
+++ b/sysdeps/x86/cpu-tunables.c
@@ -168,6 +168,7 @@ TUNABLE_CALLBACK (set_hwcaps) (tunable_val_t *valp)
 	      CHECK_GLIBC_IFUNC_CPU_OFF (n, cpu_features, MOVBE, 5);
 	      CHECK_GLIBC_IFUNC_CPU_OFF (n, cpu_features, SHSTK, 5);
 	      CHECK_GLIBC_IFUNC_CPU_OFF (n, cpu_features, SSSE3, 5);
+	      CHECK_GLIBC_IFUNC_CPU_OFF (n, cpu_features, XSAVE, 5);
 	    }
 	  break;
 	case 6: