[Bug dynamic-link/22641] New: Merge error in x86 XSAVE dynamic linker trampoline commit in 2.23

fweimer at redhat dot com sourceware-bugzilla@sourceware.org
Thu Dec 21 20:08:00 GMT 2017


https://sourceware.org/bugzilla/show_bug.cgi?id=22641

            Bug ID: 22641
           Summary: Merge error in x86 XSAVE dynamic linker trampoline
                    commit in 2.23
           Product: glibc
           Version: 2.23
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
  Target Milestone: ---
            Target: x86

The check for the availability of XSAVE is incorrectly nested under that for
AVX YMM registers:

    185   /* Can we call xgetbv?  */
    186   if (HAS_CPU_FEATURE (OSXSAVE))
    187     {
    188       unsigned int xcrlow;
    189       unsigned int xcrhigh;
    190       asm ("xgetbv" : "=a" (xcrlow), "=d" (xcrhigh) : "c" (0));
    191       /* Is YMM and XMM state usable?  */
    192       if ((xcrlow & (bit_YMM_state | bit_XMM_state)) ==
    193           (bit_YMM_state | bit_XMM_state))
    194         {
    195           /* Determine if AVX is usable.  */
    196           if (HAS_CPU_FEATURE (AVX))
…
    230           /* For _dl_runtime_resolve, set xsave_state_size to xsave
area
    231              size + integer register save size and align it to 64
bytes.  */
    232           if (cpu_features->max_cpuid >= 0xd)
    233             {
    234               unsigned int eax, ebx, ecx, edx;
    235 
    236               __cpuid_count (0xd, 0, eax, ebx, ecx, edx);
    237               if (ebx != 0)
    238                 {
    239                   cpu_features->xsave_state_size
    240                 = ALIGN_UP (ebx + STATE_SAVE_OFFSET, 64);

As far as I can see, this only affects the 2.23 release branch.

We are still investigating the practical impact of this change (without AVX,
FXSAVE should be good enough, unless the configuration is very special and MPX
or pkeys support is present).

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list