[Bug libc/27605] tunables can't control xsave/xsavec selection in dl_runtime_resolve_*

hjl.tools at gmail dot com sourceware-bugzilla@sourceware.org
Thu Mar 18 20:25:30 GMT 2021


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

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to dj@redhat.com from comment #2)
> I tried it.  It has no effect on the _dl_runtime_resolve selection, which is
> the call that segfaults on the wrong arch.  That's the bug - it *should* act
> like you say, but doesn't.
> 
> In this case, the choice is effectively made *before* tunables are applied.

Works for me:

(gdb) r --direct
Starting program:
/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/elf/tst-x86_64-1
--direct
[Inferior 1 (process 1499934) exited normally]
(gdb) b _dl_runtime_resolve_xsave
Breakpoint 1 at 0x7ffff7fe19d0: file ../sysdeps/x86_64/dl-trampoline.h, line
67.
(gdb) b _dl_runtime_resolve_xsavec
Breakpoint 2 at 0x7ffff7fe1aa0: file ../sysdeps/x86_64/dl-trampoline.h, line
67.
(gdb) r
Starting program:
/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/elf/tst-x86_64-1
--direct

Breakpoint 2, _dl_runtime_resolve_xsavec ()
    at ../sysdeps/x86_64/dl-trampoline.h:67
67              _CET_ENDBR
(gdb) set env GLIBC_TUNABLES=glibc.cpu.hwcaps=-XSAVEC
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program:
/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/elf/tst-x86_64-1
--direct

Breakpoint 1, _dl_runtime_resolve_xsave ()
    at ../sysdeps/x86_64/dl-trampoline.h:67
67              _CET_ENDBR
(gdb)

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


More information about the Glibc-bugs mailing list