public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Noah Goldstein <goldstein.w.n@gmail.com>
Cc: "Andreas K. Huettel" <dilfridge@gentoo.org>,
	libc-alpha <libc-alpha@sourceware.org>,
	toolchain@gentoo.org
Subject: Re: [2.33] FAIL: string/tst-memset-rtm
Date: Tue, 1 Feb 2022 06:09:42 -0800	[thread overview]
Message-ID: <CAMe9rOqA64aRsSvDqTMPZQBct8AaqApE7C5CbF0cMf7CdVa+8w@mail.gmail.com> (raw)
In-Reply-To: <CAFUsyf+_Tv4y8brku9u0yf35-s4HrMoYj4Rw+sa5g=1AXi2gWg@mail.gmail.com>

On Tue, Feb 1, 2022 at 12:04 AM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
>
> On Tue, Feb 1, 2022 at 1:30 AM Andreas K. Huettel via Libc-alpha
> <libc-alpha@sourceware.org> wrote:
> >
> > > > FAIL: string/tst-memset-rtm
> > > >
> > > > tst-memset-rtm.out says
> > > > error: ../sysdeps/x86/tst-string-rtm.h:63: TSX abort rate: 100.00% (3000 out of 3000)
> > > > error: 1 test failures
> > > >
> > > > Something to worry about?
> > > >
> > > > Linux pinacolada 5.15.16-gentoo #1 SMP PREEMPT Tue Jan 25 23:46:25 CET 2022 x86_64 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz GenuineIntel GNU/Linux
> > > > gcc (Gentoo 11.2.0 p1) 11.2.0
> > > > GNU ld (Gentoo 2.37_p1 p0) 2.37
> > >
> > > What processor are you using? Please show your /proc/cpuinfo
> > >
> >
> > huettel@pinacolada ~/Gentoo/gentoo/sys-libs/glibc $ cat /proc/cpuinfo
> > processor       : 0
> > vendor_id       : GenuineIntel
> > cpu family      : 6
> > model           : 94
> > model name      : Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
> > stepping        : 3
> > microcode       : 0x33
> > cpu MHz         : 3400.000
> > cache size      : 8192 KB
> > physical id     : 0
> > siblings        : 8
> > core id         : 0
> > cpu cores       : 4
> > apicid          : 0
> > initial apicid  : 0
> > fpu             : yes
> > fpu_exception   : yes
> > cpuid level     : 22
> > wp              : yes
> > flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp
> > vmx flags       : vnmi preemption_timer invvpid ept_x_only ept_ad ept_1gb flexpriority tsc_offset vtpr mtf vapic ept vpid unrestricted_guest ple shadow_vmcs pml
> > bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihit srbds
> > bogomips        : 6799.81
> > clflush size    : 64
> > cache_alignment : 64
> > address sizes   : 39 bits physical, 48 bits virtual
> > power management:
> >
> > (...)
> >
> > huettel@pinacolada ~/Gentoo/gentoo/sys-libs/glibc $ LANG=C lscpu
> > Architecture:            x86_64
> >   CPU op-mode(s):        32-bit, 64-bit
> >   Address sizes:         39 bits physical, 48 bits virtual
> >   Byte Order:            Little Endian
> > CPU(s):                  8
> >   On-line CPU(s) list:   0-7
> > Vendor ID:               GenuineIntel
> >   Model name:            Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
> >     CPU family:          6
> >     Model:               94
> >     Thread(s) per core:  2
> >     Core(s) per socket:  4
> >     Socket(s):           1
> >     Stepping:            3
> >     CPU max MHz:         4000.0000
> >     CPU min MHz:         800.0000
> >     BogoMIPS:            6799.81
> >     Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm con
> >                          stant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg
> >                          fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti tpr_sha
> >                          dow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsav
> >                          ec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp
> > Virtualization features:
> >   Virtualization:        VT-x
> > Caches (sum of all):
> >   L1d:                   128 KiB (4 instances)
> >   L1i:                   128 KiB (4 instances)
> >   L2:                    1 MiB (4 instances)
> >   L3:                    8 MiB (1 instance)
> > NUMA:
> >   NUMA node(s):          1
> >   NUMA node0 CPU(s):     0-7
> > Vulnerabilities:
> >   Itlb multihit:         KVM: Mitigation: VMX disabled
> >   L1tf:                  Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
> >   Mds:                   Vulnerable: Clear CPU buffers attempted, no microcode; SMT vulnerable
> >   Meltdown:              Mitigation; PTI
> >   Spec store bypass:     Vulnerable
> >   Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization
> >   Spectre v2:            Mitigation; Full generic retpoline, STIBP disabled, RSB filling
> >   Srbds:                 Vulnerable: No microcode
> >   Tsx async abort:       Vulnerable: Clear CPU buffers attempted, no microcode; SMT vulnerable
> >
> >
> >
> >
> > --
> > Andreas K. Hüttel
> > dilfridge@gentoo.org
> > Gentoo Linux developer
> > (council, toolchain, base-system, perl, libreoffice)
> >
> >
>
>
>
> If its not a bug with CPU id
>
> https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S;h=584747f1a1664005419671ed0e7caf390b77d92c;hb=refs/heads/release/2.33/master#l215
> Looks suspect.
> `VZEROUPPER_SHORT_RETURN` is defined as just `vzeroupper; ret`
> and it doesn't appear the avx2 memset defined `VZEROUPPER_SHORT_RETURN`
>
> https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86_64/multiarch/memset-avx2-unaligned-erms-rtm.S;h=8ac3e479bba488becd0becb63011496fef9eff13;hb=refs/heads/release/2.33/master
> https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86_64/multiarch/memset-avx2-unaligned-erms.S;h=ae0860f36a47d5941456e5138b11544ad9540dbf;hb=refs/heads/release/2.33/master

Should be fixed by these backports:

1b8f2456b9 x86: Use CHECK_FEATURE_PRESENT to check HLE [BZ #27398]
54fdfa2b33 x86: Black list more Intel CPUs for TSX [BZ #27398]
0a5f5e2dc1 x86: Check RTM_ALWAYS_ABORT for RTM [BZ #28033]
5cb6edb6cd x86: Copy IBT and SHSTK usable only if CET is enabled


-- 
H.J.

  reply	other threads:[~2022-02-01 14:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-31 22:56 Andreas K. Huettel
2022-01-31 23:36 ` H.J. Lu
2022-02-01  7:29   ` Andreas K. Huettel
2022-02-01  8:04     ` Noah Goldstein
2022-02-01 14:09       ` H.J. Lu [this message]
2022-02-01 20:40         ` Andreas K. Huettel

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=CAMe9rOqA64aRsSvDqTMPZQBct8AaqApE7C5CbF0cMf7CdVa+8w@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=dilfridge@gentoo.org \
    --cc=goldstein.w.n@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=toolchain@gentoo.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).