public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "engelke at in dot tum.de" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug dynamic-link/29953] New: Invalid x86_non_temporal_threshold without cache info
Date: Mon, 02 Jan 2023 17:33:37 +0000	[thread overview]
Message-ID: <bug-29953-131@http.sourceware.org/bugzilla/> (raw)

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.

             reply	other threads:[~2023-01-02 17:33 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-02 17:33 engelke at in dot tum.de [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-29953-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).