[2.23] x86: Fix mis-merge of XSAVE ld.so trampoline selection [BZ #22641]
H.J. Lu
hjl.tools@gmail.com
Mon Jan 1 00:00:00 GMT 2018
On Thu, Jan 11, 2018 at 7:38 AM, Florian Weimer <fweimer@redhat.com> wrote:
> 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 26d289bb92b6d1125536644f607c73617463477d (x86-64:
> Use fxsave/xsave/xsavec in _dl_runtime_resolve).
>
> 2018-01-11 Florian Weimer <fweimer@redhat.com>
>
> * sysdeps/x86/cpu-features.c (init_cpu_features): Move check for
> XSAVE out of the AVX check.
>
LGTM. Sorry for that.
Thanks.
--
H.J.
More information about the Libc-stable
mailing list