public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/29953] New: Invalid x86_non_temporal_threshold without cache info
@ 2023-01-02 17:33 engelke at in dot tum.de
  2023-01-02 21:21 ` [Bug dynamic-link/29953] " goldstein.w.n at gmail dot com
                   ` (24 more replies)
  0 siblings, 25 replies; 26+ messages in thread
From: engelke at in dot tum.de @ 2023-01-02 17:33 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 29953
           Summary: Invalid x86_non_temporal_threshold without cache info
           Product: glibc
           Version: 2.36
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: engelke at in dot tum.de
                CC: hjl.tools at gmail dot com
  Target Milestone: ---

When cpuid reports no information on a shared cache (e.g., in an emulator), the
x86_non_temporal_threshold will be set to zero, causing memcpy/memset to behave
wrong for mid-sized operations. sysdeps/x86/dl-cacheinfo.h indicates that the
minimum value must be 0x4040, but this is not enforced for the default value
(see also commit b446822b6ae).

In the emulator, `/lib64/ld-linux-x86-64.so.2 --list-tunables` reports:

    glibc.cpu.x86_non_temporal_threshold: 0x0 (min: 0x0, max:
0xffffffffffffffff)

Setting the tunable explicitly (env
GLIBC_TUNABLES=glibc.cpu.x86_non_temporal_threshold=0x4040) avoids the problem.

As a side note, ld.so won't load any DSO on x86-64 ("CPU ISA level is lower
than required") when the cpuid vendor not listed in sysdeps/x86/cpu-features.c,
as the feature bits in cpuid leaf 1 are not decoded in get_common_indices
(family is NULL).

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

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2023-07-17  7:29 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-02 17:33 [Bug dynamic-link/29953] New: Invalid x86_non_temporal_threshold without cache info engelke at in dot tum.de
2023-01-02 21:21 ` [Bug dynamic-link/29953] " goldstein.w.n at gmail dot com
2023-01-03  0:05 ` goldstein.w.n at gmail dot com
2023-01-03 12:49 ` engelke at in dot tum.de
2023-01-03 16:23 ` hjl.tools at gmail dot com
2023-01-03 17:52 ` goldstein.w.n at gmail dot com
2023-01-03 17:55 ` hjl.tools at gmail dot com
2023-01-03 18:00 ` goldstein.w.n at gmail dot com
2023-01-03 18:04 ` hjl.tools at gmail dot com
2023-01-03 18:13 ` goldstein.w.n at gmail dot com
2023-01-03 18:22 ` hjl.tools at gmail dot com
2023-01-03 18:39 ` engelke at in dot tum.de
2023-01-03 19:24 ` goldstein.w.n at gmail dot com
2023-01-03 21:58 ` cvs-commit at gcc dot gnu.org
2023-01-25 21:05 ` decui at microsoft dot com
2023-03-13 17:59 ` fweimer at redhat dot com
2023-03-13 18:00 ` fweimer at redhat dot com
2023-03-13 18:00 ` fweimer at redhat dot com
2023-03-13 18:17 ` hjl.tools at gmail dot com
2023-03-15 22:18 ` cvs-commit at gcc dot gnu.org
2023-04-20 15:52 ` cvs-commit at gcc dot gnu.org
2023-04-20 15:53 ` cvs-commit at gcc dot gnu.org
2023-05-08 16:44 ` fw at deneb dot enyo.de
2023-05-08 17:09 ` fweimer at redhat dot com
2023-05-08 17:09 ` fweimer at redhat dot com
2023-07-17  7:29 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).