Skip to content
Commit fbd72f14 authored by Florian Weimer's avatar Florian Weimer
Browse files

x86: Fix mis-merge of XSAVE ld.so trampoline selection [BZ #22641]

The change is best viewed with “diff -w”:

@@ -226,6 +226,7 @@ init_cpu_features (struct cpu_features *cpu_features)
 	  /* Determine if FMA4 is usable.  */
 	  if (HAS_CPU_FEATURE (FMA4))
 	    cpu_features->feature[index_FMA4_Usable] |= bit_FMA4_Usable;
+	}

       /* For _dl_runtime_resolve, set xsave_state_size to xsave area
 	 size + integer register save size and align it to 64 bytes.  */
@@ -292,7 +293,6 @@ init_cpu_features (struct cpu_features *cpu_features)
 	    }
 	}
     }
-    }

 #if !HAS_CPUID
 no_cpuid:

Without this change, XSAVE support will never be selected unless the CPU
also supports AVX, which is not what we want.  For example, if AVX is
disabled, but MPX is supported, the BND registers are not preserved if
we use FXSAVE instead of XSAVE.

This fixes commit 26d289bb (x86-64:
Use fxsave/xsave/xsavec in _dl_runtime_resolve).
parent 26d289bb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment