public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo
@ 2021-02-12  4:44 siddhesh at sourceware dot org
  2021-02-12  4:52 ` [Bug libc/27398] " siddhesh at sourceware dot org
                   ` (35 more replies)
  0 siblings, 36 replies; 37+ messages in thread
From: siddhesh at sourceware dot org @ 2021-02-12  4:44 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 27398
           Summary: Sporadic failures in tst-cpu-features-cpuinfo
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: siddhesh at sourceware dot org
                CC: drepper.fsp at gmail dot com, hjl.tools at gmail dot com
  Target Milestone: ---

The following tests fail sporadically on my machine:

Checking HAS_CPU_FEATURE (HLE):
  HAS_CPU_FEATURE (HLE): 1
  cpuinfo (hle): 0
 *** failure ***
--
Checking HAS_CPU_FEATURE (RTM):
  HAS_CPU_FEATURE (RTM): 1
  cpuinfo (rtm): 0
 *** failure ***

Whenever it succeeds, HAS_CPU_FEATURE is 0 in both cases but every once in a
while it returns 1.

To reproduce:

while ./testrun.sh elf/tst-cpu-features-cpuinfo; do /bin/true; done

This exits on the first failed run.

My /proc/cpuinfo:

processor       : 7
vendor_id       : GenuineIntel
cpu family      : 6
model           : 142
model name      : Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz
stepping        : 12
microcode       : 0xde
cpu MHz         : 877.111
cache size      : 8192 KB
physical id     : 0
siblings        : 8
core id         : 3
cpu cores       : 4
apicid          : 7
initial apicid  : 7
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
tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch
cpuid_fault epb invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow
vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms
invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves
dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear
flush_l1d arch_capabilities
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 ept_mode_based_exec
bugs            : spectre_v1 spectre_v2 spec_store_bypass swapgs taa
itlb_multihit srbds
bogomips        : 4199.88
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

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

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

* [Bug libc/27398] Sporadic failures in tst-cpu-features-cpuinfo
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
@ 2021-02-12  4:52 ` siddhesh at sourceware dot org
  2021-02-12  9:46 ` [Bug libc/27398] x86: " fweimer at redhat dot com
                   ` (34 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: siddhesh at sourceware dot org @ 2021-02-12  4:52 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #1 from Siddhesh Poyarekar <siddhesh at sourceware dot org> ---
The failures become deterministic and numerous (18 failures in all) when the
test is run under valgrind.  That may have something to do with valgrind's
emulation but noting it here anyway since it seems relevant.  Importantly,
valgrind does not report any errors.

valgrind --trace-children=yes ./testrun.sh elf/tst-cpu-features-cpuinfo
--direct

<valgrind output snipped since it does not report any errors>

Checking HAS_CPU_FEATURE (ACPI):
  HAS_CPU_FEATURE (ACPI): 1
  cpuinfo (acpi): 1
Checking HAS_CPU_FEATURE (ADX):
  HAS_CPU_FEATURE (ADX): 0
  cpuinfo (adx): 1
 *** failure ***
Checking HAS_CPU_FEATURE (APIC):
  HAS_CPU_FEATURE (APIC): 1
  cpuinfo (apic): 1
Checking HAS_CPU_FEATURE (AES):
  HAS_CPU_FEATURE (AES): 1
  cpuinfo (aes): 1
Checking HAS_CPU_FEATURE (AMX_BF16):
  HAS_CPU_FEATURE (AMX_BF16): 0
  cpuinfo (amx_bf16): 0
Checking HAS_CPU_FEATURE (AMX_INT8):
  HAS_CPU_FEATURE (AMX_INT8): 0
  cpuinfo (amx_int8): 0
Checking HAS_CPU_FEATURE (AMX_TILE):
  HAS_CPU_FEATURE (AMX_TILE): 0
  cpuinfo (amx_tile): 0
Checking HAS_CPU_FEATURE (ARCH_CAPABILITIES):
  HAS_CPU_FEATURE (ARCH_CAPABILITIES): 0
  cpuinfo (arch_capabilities): 1
 *** failure ***
Checking HAS_CPU_FEATURE (AVX):
  HAS_CPU_FEATURE (AVX): 1
  cpuinfo (avx): 1
Checking HAS_CPU_FEATURE (AVX2):
  HAS_CPU_FEATURE (AVX2): 1
  cpuinfo (avx2): 1
Checking HAS_CPU_FEATURE (AVX512_4FMAPS):
  HAS_CPU_FEATURE (AVX512_4FMAPS): 0
  cpuinfo (avx512_4fmaps): 0
Checking HAS_CPU_FEATURE (AVX512_4VNNIW):
  HAS_CPU_FEATURE (AVX512_4VNNIW): 0
  cpuinfo (avx512_4vnniw): 0
Checking HAS_CPU_FEATURE (AVX512_BF16):
  HAS_CPU_FEATURE (AVX512_BF16): 0
  cpuinfo (avx512_bf16): 0
Checking HAS_CPU_FEATURE (AVX512_BITALG):
  HAS_CPU_FEATURE (AVX512_BITALG): 0
  cpuinfo (avx512_bitalg): 0
Checking HAS_CPU_FEATURE (AVX512_IFMA):
  HAS_CPU_FEATURE (AVX512_IFMA): 0
  cpuinfo (avx512ifma): 0
Checking HAS_CPU_FEATURE (AVX512_VBMI):
  HAS_CPU_FEATURE (AVX512_VBMI): 0
  cpuinfo (avx512vbmi): 0
Checking HAS_CPU_FEATURE (AVX512_VBMI2):
  HAS_CPU_FEATURE (AVX512_VBMI2): 0
  cpuinfo (avx512_vbmi2): 0
Checking HAS_CPU_FEATURE (AVX512_VNNI):
  HAS_CPU_FEATURE (AVX512_VNNI): 0
  cpuinfo (avx512_vnni): 0
Checking HAS_CPU_FEATURE (AVX512_VP2INTERSECT):
  HAS_CPU_FEATURE (AVX512_VP2INTERSECT): 0
  cpuinfo (avx512_vp2intersect): 0
Checking HAS_CPU_FEATURE (AVX512_VPOPCNTDQ):
  HAS_CPU_FEATURE (AVX512_VPOPCNTDQ): 0
  cpuinfo (avx512_vpopcntdq): 0
Checking HAS_CPU_FEATURE (AVX512BW):
  HAS_CPU_FEATURE (AVX512BW): 0
  cpuinfo (avx512bw): 0
Checking HAS_CPU_FEATURE (AVX512CD):
  HAS_CPU_FEATURE (AVX512CD): 0
  cpuinfo (avx512cd): 0
Checking HAS_CPU_FEATURE (AVX512ER):
  HAS_CPU_FEATURE (AVX512ER): 0
  cpuinfo (avx512er): 0
Checking HAS_CPU_FEATURE (AVX512DQ):
  HAS_CPU_FEATURE (AVX512DQ): 0
  cpuinfo (avx512dq): 0
Checking HAS_CPU_FEATURE (AVX512F):
  HAS_CPU_FEATURE (AVX512F): 0
  cpuinfo (avx512f): 0
Checking HAS_CPU_FEATURE (AVX512PF):
  HAS_CPU_FEATURE (AVX512PF): 0
  cpuinfo (avx512pf): 0
Checking HAS_CPU_FEATURE (AVX512VL):
  HAS_CPU_FEATURE (AVX512VL): 0
  cpuinfo (avx512vl): 0
Checking HAS_CPU_FEATURE (BMI1):
  HAS_CPU_FEATURE (BMI1): 1
  cpuinfo (bmi1): 1
Checking HAS_CPU_FEATURE (BMI2):
  HAS_CPU_FEATURE (BMI2): 1
  cpuinfo (bmi2): 1
Checking HAS_CPU_FEATURE (CLDEMOTE):
  HAS_CPU_FEATURE (CLDEMOTE): 0
  cpuinfo (cldemote): 0
Checking HAS_CPU_FEATURE (CLFLUSHOPT):
  HAS_CPU_FEATURE (CLFLUSHOPT): 0
  cpuinfo (clflushopt): 1
 *** failure ***
Checking HAS_CPU_FEATURE (CLFSH):
  HAS_CPU_FEATURE (CLFSH): 1
  cpuinfo (clflush): 1
Checking HAS_CPU_FEATURE (CLWB):
  HAS_CPU_FEATURE (CLWB): 0
  cpuinfo (clwb): 0
Checking HAS_CPU_FEATURE (CMOV):
  HAS_CPU_FEATURE (CMOV): 1
  cpuinfo (cmov): 1
Checking HAS_CPU_FEATURE (CMPXCHG16B):
  HAS_CPU_FEATURE (CMPXCHG16B): 1
  cpuinfo (cx16): 1
Checking HAS_CPU_FEATURE (CNXT_ID):
  HAS_CPU_FEATURE (CNXT_ID): 0
  cpuinfo (cnxt_id): 0
Checking HAS_CPU_FEATURE (CORE_CAPABILITIES):
  HAS_CPU_FEATURE (CORE_CAPABILITIES): 0
  cpuinfo (core_capabilities): 0
Checking HAS_CPU_FEATURE (CX8):
  HAS_CPU_FEATURE (CX8): 1
  cpuinfo (cx8): 1
Checking HAS_CPU_FEATURE (DCA):
  HAS_CPU_FEATURE (DCA): 0
  cpuinfo (dca): 0
Checking HAS_CPU_FEATURE (DE):
  HAS_CPU_FEATURE (DE): 1
  cpuinfo (de): 1
Checking HAS_CPU_FEATURE (DEPR_FPU_CS_DS):
  HAS_CPU_FEATURE (DEPR_FPU_CS_DS): 1
  cpuinfo (zero_fcs_fds): 0
 *** missing in /proc/cpuinfo ***
Checking HAS_CPU_FEATURE (DS):
  HAS_CPU_FEATURE (DS): 1
  cpuinfo (dts): 1
Checking HAS_CPU_FEATURE (DS_CPL):
  HAS_CPU_FEATURE (DS_CPL): 1
  cpuinfo (ds_cpl): 1
Checking HAS_CPU_FEATURE (DTES64):
  HAS_CPU_FEATURE (DTES64): 1
  cpuinfo (dtes64): 1
Checking HAS_CPU_FEATURE (EIST):
  HAS_CPU_FEATURE (EIST): 1
  cpuinfo (est): 1
Checking HAS_CPU_FEATURE (ENQCMD):
  HAS_CPU_FEATURE (ENQCMD): 0
  cpuinfo (enqcmd): 0
Checking HAS_CPU_FEATURE (ERMS):
  HAS_CPU_FEATURE (ERMS): 1
  cpuinfo (erms): 1
Checking HAS_CPU_FEATURE (F16C):
  HAS_CPU_FEATURE (F16C): 1
  cpuinfo (f16c): 1
Checking HAS_CPU_FEATURE (FMA):
  HAS_CPU_FEATURE (FMA): 1
  cpuinfo (fma): 1
Checking HAS_CPU_FEATURE (FMA4):
  HAS_CPU_FEATURE (FMA4): 0
  cpuinfo (fma4): 0
Checking HAS_CPU_FEATURE (FPU):
  HAS_CPU_FEATURE (FPU): 1
  cpuinfo (fpu): 1
Checking HAS_CPU_FEATURE (FSGSBASE):
  HAS_CPU_FEATURE (FSGSBASE): 0
  cpuinfo (fsgsbase): 1
 *** failure ***
Checking HAS_CPU_FEATURE (FSRM):
  HAS_CPU_FEATURE (FSRM): 0
  cpuinfo (fsrm): 0
Checking HAS_CPU_FEATURE (FXSR):
  HAS_CPU_FEATURE (FXSR): 1
  cpuinfo (fxsr): 1
Checking HAS_CPU_FEATURE (GFNI):
  HAS_CPU_FEATURE (GFNI): 0
  cpuinfo (gfni): 0
Checking HAS_CPU_FEATURE (HLE):
  HAS_CPU_FEATURE (HLE): 0
  cpuinfo (hle): 0
Checking HAS_CPU_FEATURE (HTT):
  HAS_CPU_FEATURE (HTT): 1
  cpuinfo (ht): 1
Checking HAS_CPU_FEATURE (HYBRID):
  HAS_CPU_FEATURE (HYBRID): 0
  cpuinfo (hybrid): 0
Checking HAS_CPU_FEATURE (IBRS_IBPB):
  HAS_CPU_FEATURE (IBRS_IBPB): 0
  cpuinfo (ibrs): 1
 *** failure ***
Checking HAS_CPU_FEATURE (IBT):
  HAS_CPU_FEATURE (IBT): 0
  cpuinfo (ibt): 0
Checking HAS_CPU_FEATURE (INVARIANT_TSC):
  HAS_CPU_FEATURE (INVARIANT_TSC): 1
  cpuinfo (invariant_tsc): 0
 *** missing in /proc/cpuinfo ***
Checking HAS_CPU_FEATURE (INVPCID):
  HAS_CPU_FEATURE (INVPCID): 1
  cpuinfo (invpcid): 1
Checking HAS_CPU_FEATURE (L1D_FLUSH):
  HAS_CPU_FEATURE (L1D_FLUSH): 0
  cpuinfo (flush_l1d): 1
 *** failure ***
Checking HAS_CPU_FEATURE (LAHF64_SAHF64):
  HAS_CPU_FEATURE (LAHF64_SAHF64): 1
  cpuinfo (lahf_lm): 1
Checking HAS_CPU_FEATURE (LM):
  HAS_CPU_FEATURE (LM): 1
  cpuinfo (lm): 1
Checking HAS_CPU_FEATURE (LWP):
  HAS_CPU_FEATURE (LWP): 0
  cpuinfo (lwp): 0
Checking HAS_CPU_FEATURE (LZCNT):
  HAS_CPU_FEATURE (LZCNT): 1
  cpuinfo (abm): 1
Checking HAS_CPU_FEATURE (MCA):
  HAS_CPU_FEATURE (MCA): 1
  cpuinfo (mca): 1
Checking HAS_CPU_FEATURE (MCE):
  HAS_CPU_FEATURE (MCE): 1
  cpuinfo (mce): 1
Checking HAS_CPU_FEATURE (MD_CLEAR):
  HAS_CPU_FEATURE (MD_CLEAR): 0
  cpuinfo (md_clear): 1
 *** failure ***
Checking HAS_CPU_FEATURE (MMX):
  HAS_CPU_FEATURE (MMX): 1
  cpuinfo (mmx): 1
Checking HAS_CPU_FEATURE (MONITOR):
  HAS_CPU_FEATURE (MONITOR): 1
  cpuinfo (monitor): 1
Checking HAS_CPU_FEATURE (MOVBE):
  HAS_CPU_FEATURE (MOVBE): 1
  cpuinfo (movbe): 1
Checking HAS_CPU_FEATURE (MOVDIRI):
  HAS_CPU_FEATURE (MOVDIRI): 0
  cpuinfo (movdiri): 0
Checking HAS_CPU_FEATURE (MOVDIR64B):
  HAS_CPU_FEATURE (MOVDIR64B): 0
  cpuinfo (movdir64b): 0
Checking HAS_CPU_FEATURE (MPX):
  HAS_CPU_FEATURE (MPX): 0
  cpuinfo (mpx): 1
 *** failure ***
Checking HAS_CPU_FEATURE (MSR):
  HAS_CPU_FEATURE (MSR): 1
  cpuinfo (msr): 1
Checking HAS_CPU_FEATURE (MTRR):
  HAS_CPU_FEATURE (MTRR): 1
  cpuinfo (mtrr): 1
Checking HAS_CPU_FEATURE (NX):
  HAS_CPU_FEATURE (NX): 1
  cpuinfo (nx): 1
Checking HAS_CPU_FEATURE (OSPKE):
  HAS_CPU_FEATURE (OSPKE): 0
  cpuinfo (ospke): 0
Checking HAS_CPU_FEATURE (PAE):
  HAS_CPU_FEATURE (PAE): 1
  cpuinfo (pae): 1
Checking HAS_CPU_FEATURE (PAGE1GB):
  HAS_CPU_FEATURE (PAGE1GB): 1
  cpuinfo (pdpe1gb): 1
Checking HAS_CPU_FEATURE (PAT):
  HAS_CPU_FEATURE (PAT): 1
  cpuinfo (pat): 1
Checking HAS_CPU_FEATURE (PBE):
  HAS_CPU_FEATURE (PBE): 1
  cpuinfo (pbe): 1
Checking HAS_CPU_FEATURE (PCID):
  HAS_CPU_FEATURE (PCID): 1
  cpuinfo (pcid): 1
Checking HAS_CPU_FEATURE (PCLMULQDQ):
  HAS_CPU_FEATURE (PCLMULQDQ): 1
  cpuinfo (pclmulqdq): 1
Checking HAS_CPU_FEATURE (PCONFIG):
  HAS_CPU_FEATURE (PCONFIG): 0
  cpuinfo (pconfig): 0
Checking HAS_CPU_FEATURE (PDCM):
  HAS_CPU_FEATURE (PDCM): 1
  cpuinfo (pdcm): 1
Checking HAS_CPU_FEATURE (PGE):
  HAS_CPU_FEATURE (PGE): 1
  cpuinfo (pge): 1
Checking HAS_CPU_FEATURE (PKS):
  HAS_CPU_FEATURE (PKS): 0
  cpuinfo (pks): 0
Checking HAS_CPU_FEATURE (PKU):
  HAS_CPU_FEATURE (PKU): 0
  cpuinfo (pku): 0
Checking HAS_CPU_FEATURE (POPCNT):
  HAS_CPU_FEATURE (POPCNT): 1
  cpuinfo (popcnt): 1
Checking HAS_CPU_FEATURE (PREFETCHW):
  HAS_CPU_FEATURE (PREFETCHW): 0
  cpuinfo (3dnowprefetch): 1
 *** failure ***
Checking HAS_CPU_FEATURE (PREFETCHWT1):
  HAS_CPU_FEATURE (PREFETCHWT1): 0
  cpuinfo (prefetchwt1): 0
Checking HAS_CPU_FEATURE (PTWRITE):
  HAS_CPU_FEATURE (PTWRITE): 0
  cpuinfo (ptwrite): 0
Checking HAS_CPU_FEATURE (PSE):
  HAS_CPU_FEATURE (PSE): 1
  cpuinfo (pse): 1
Checking HAS_CPU_FEATURE (PSE_36):
  HAS_CPU_FEATURE (PSE_36): 1
  cpuinfo (pse36): 1
Checking HAS_CPU_FEATURE (PSN):
  HAS_CPU_FEATURE (PSN): 0
  cpuinfo (psn): 0
Checking HAS_CPU_FEATURE (RDPID):
  HAS_CPU_FEATURE (RDPID): 0
  cpuinfo (rdpid): 0
Checking HAS_CPU_FEATURE (RDRAND):
  HAS_CPU_FEATURE (RDRAND): 1
  cpuinfo (rdrand): 1
Checking HAS_CPU_FEATURE (RDSEED):
  HAS_CPU_FEATURE (RDSEED): 0
  cpuinfo (rdseed): 1
 *** failure ***
Checking HAS_CPU_FEATURE (RDT_A):
  HAS_CPU_FEATURE (RDT_A): 0
  cpuinfo (rdt_a): 0
Checking HAS_CPU_FEATURE (RDT_M):
  HAS_CPU_FEATURE (RDT_M): 0
  cpuinfo (cqm): 0
Checking HAS_CPU_FEATURE (RDTSCP):
  HAS_CPU_FEATURE (RDTSCP): 1
  cpuinfo (rdtscp): 1
Checking HAS_CPU_FEATURE (RTM):
  HAS_CPU_FEATURE (RTM): 0
  cpuinfo (rtm): 0
Checking HAS_CPU_FEATURE (SDBG):
  HAS_CPU_FEATURE (SDBG): 1
  cpuinfo (sdbg): 1
Checking HAS_CPU_FEATURE (SEP):
  HAS_CPU_FEATURE (SEP): 1
  cpuinfo (sep): 1
Checking HAS_CPU_FEATURE (SERIALIZE):
  HAS_CPU_FEATURE (SERIALIZE): 0
  cpuinfo (serialize): 0
Checking HAS_CPU_FEATURE (SGX):
  HAS_CPU_FEATURE (SGX): 0
  cpuinfo (sgx): 0
Checking HAS_CPU_FEATURE (SGX_LC):
  HAS_CPU_FEATURE (SGX_LC): 0
  cpuinfo (sgx_lc): 0
Checking HAS_CPU_FEATURE (SHA):
  HAS_CPU_FEATURE (SHA): 0
  cpuinfo (sha_ni): 0
Checking HAS_CPU_FEATURE (SHSTK):
  HAS_CPU_FEATURE (SHSTK): 0
  cpuinfo (shstk): 0
Checking HAS_CPU_FEATURE (SMAP):
  HAS_CPU_FEATURE (SMAP): 0
  cpuinfo (smap): 1
 *** failure ***
Checking HAS_CPU_FEATURE (SMEP):
  HAS_CPU_FEATURE (SMEP): 1
  cpuinfo (smep): 1
Checking HAS_CPU_FEATURE (SMX):
  HAS_CPU_FEATURE (SMX): 1
  cpuinfo (smx): 1
Checking HAS_CPU_FEATURE (SS):
  HAS_CPU_FEATURE (SS): 1
  cpuinfo (ss): 1
Checking HAS_CPU_FEATURE (SSBD):
  HAS_CPU_FEATURE (SSBD): 0
  cpuinfo (ssbd): 1
 *** failure ***
Checking HAS_CPU_FEATURE (SSE):
  HAS_CPU_FEATURE (SSE): 1
  cpuinfo (sse): 1
Checking HAS_CPU_FEATURE (SSE2):
  HAS_CPU_FEATURE (SSE2): 1
  cpuinfo (sse2): 1
Checking HAS_CPU_FEATURE (SSE3):
  HAS_CPU_FEATURE (SSE3): 1
  cpuinfo (pni): 1
Checking HAS_CPU_FEATURE (SSE4_1):
  HAS_CPU_FEATURE (SSE4_1): 1
  cpuinfo (sse4_1): 1
Checking HAS_CPU_FEATURE (SSE4_2):
  HAS_CPU_FEATURE (SSE4_2): 1
  cpuinfo (sse4_2): 1
Checking HAS_CPU_FEATURE (SSE4A):
  HAS_CPU_FEATURE (SSE4A): 0
  cpuinfo (sse4a): 0
Checking HAS_CPU_FEATURE (SSSE3):
  HAS_CPU_FEATURE (SSSE3): 1
  cpuinfo (ssse3): 1
Checking HAS_CPU_FEATURE (STIBP):
  HAS_CPU_FEATURE (STIBP): 0
  cpuinfo (stibp): 1
 *** failure ***
Checking HAS_CPU_FEATURE (SVM):
  HAS_CPU_FEATURE (SVM): 0
  cpuinfo (svm): 0
Checking HAS_CPU_FEATURE (SYSCALL_SYSRET):
  HAS_CPU_FEATURE (SYSCALL_SYSRET): 1
  cpuinfo (syscall): 1
Checking HAS_CPU_FEATURE (TBM):
  HAS_CPU_FEATURE (TBM): 0
  cpuinfo (tbm): 0
Checking HAS_CPU_FEATURE (TM):
  HAS_CPU_FEATURE (TM): 1
  cpuinfo (tm): 1
Checking HAS_CPU_FEATURE (TM2):
  HAS_CPU_FEATURE (TM2): 1
  cpuinfo (tm2): 1
Checking HAS_CPU_FEATURE (TRACE):
  HAS_CPU_FEATURE (TRACE): 0
  cpuinfo (intel_pt): 1
 *** failure ***
Checking HAS_CPU_FEATURE (TSC):
  HAS_CPU_FEATURE (TSC): 1
  cpuinfo (tsc): 1
Checking HAS_CPU_FEATURE (TSC_ADJUST):
  HAS_CPU_FEATURE (TSC_ADJUST): 1
  cpuinfo (tsc_adjust): 1
Checking HAS_CPU_FEATURE (TSC_DEADLINE):
  HAS_CPU_FEATURE (TSC_DEADLINE): 1
  cpuinfo (tsc_deadline_timer): 1
Checking HAS_CPU_FEATURE (TSXLDTRK):
  HAS_CPU_FEATURE (TSXLDTRK): 0
  cpuinfo (tsxldtrk): 0
Checking HAS_CPU_FEATURE (UMIP):
  HAS_CPU_FEATURE (UMIP): 0
  cpuinfo (umip): 0
Checking HAS_CPU_FEATURE (VAES):
  HAS_CPU_FEATURE (VAES): 0
  cpuinfo (vaes): 0
Checking HAS_CPU_FEATURE (VME):
  HAS_CPU_FEATURE (VME): 1
  cpuinfo (vme): 1
Checking HAS_CPU_FEATURE (VMX):
  HAS_CPU_FEATURE (VMX): 1
  cpuinfo (vmx): 1
Checking HAS_CPU_FEATURE (VPCLMULQDQ):
  HAS_CPU_FEATURE (VPCLMULQDQ): 0
  cpuinfo (vpclmulqdq): 0
Checking HAS_CPU_FEATURE (WAITPKG):
  HAS_CPU_FEATURE (WAITPKG): 0
  cpuinfo (waitpkg): 0
Checking HAS_CPU_FEATURE (WBNOINVD):
  HAS_CPU_FEATURE (WBNOINVD): 0
  cpuinfo (wbnoinvd): 0
Checking HAS_CPU_FEATURE (X2APIC):
  HAS_CPU_FEATURE (X2APIC): 1
  cpuinfo (x2apic): 1
Checking HAS_CPU_FEATURE (XFD):
  HAS_CPU_FEATURE (XFD): 0
  cpuinfo (xfd): 0
Checking HAS_CPU_FEATURE (XGETBV_ECX_1):
  HAS_CPU_FEATURE (XGETBV_ECX_1): 0
  cpuinfo (xgetbv1): 1
 *** failure ***
Checking HAS_CPU_FEATURE (XOP):
  HAS_CPU_FEATURE (XOP): 0
  cpuinfo (xop): 0
Checking HAS_CPU_FEATURE (XSAVE):
  HAS_CPU_FEATURE (XSAVE): 1
  cpuinfo (xsave): 1
Checking HAS_CPU_FEATURE (XSAVEC):
  HAS_CPU_FEATURE (XSAVEC): 0
  cpuinfo (xsavec): 1
 *** failure ***
Checking HAS_CPU_FEATURE (XSAVEOPT):
  HAS_CPU_FEATURE (XSAVEOPT): 0
  cpuinfo (xsaveopt): 1
 *** failure ***
Checking HAS_CPU_FEATURE (XSAVES):
  HAS_CPU_FEATURE (XSAVES): 0
  cpuinfo (xsaves): 1
 *** failure ***
Checking HAS_CPU_FEATURE (XTPRUPDCTRL):
  HAS_CPU_FEATURE (XTPRUPDCTRL): 1
  cpuinfo (xtpr): 1
18 differences between /proc/cpuinfo and glibc code.

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

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

* [Bug libc/27398] x86: Sporadic failures in tst-cpu-features-cpuinfo
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
  2021-02-12  4:52 ` [Bug libc/27398] " siddhesh at sourceware dot org
@ 2021-02-12  9:46 ` fweimer at redhat dot com
  2021-02-12  9:59 ` siddhesh at sourceware dot org
                   ` (33 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: fweimer at redhat dot com @ 2021-02-12  9:46 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Sporadic failures in        |x86: Sporadic failures in
                   |tst-cpu-features-cpuinfo    |tst-cpu-features-cpuinfo
                 CC|                            |fweimer at redhat dot com
              Flags|                            |security-

--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
The valgrind failures are expected because fiddles with CPUID bits, while not
altering the contents of /proc/cpuinfo.

Can you try pinning the test (without valgrind) to different CPUs using
taskset? Thanks.

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

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

* [Bug libc/27398] x86: Sporadic failures in tst-cpu-features-cpuinfo
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
  2021-02-12  4:52 ` [Bug libc/27398] " siddhesh at sourceware dot org
  2021-02-12  9:46 ` [Bug libc/27398] x86: " fweimer at redhat dot com
@ 2021-02-12  9:59 ` siddhesh at sourceware dot org
  2021-02-12 13:45 ` hjl.tools at gmail dot com
                   ` (32 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: siddhesh at sourceware dot org @ 2021-02-12  9:59 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #3 from Siddhesh Poyarekar <siddhesh at sourceware dot org> ---
It only reports failures on cpu0, on every run, none of the other cores:

$ taskset --cpu-list 0 ./testrun.sh elf/tst-cpu-features-cpuinfo | grep -B 3
fail
Checking HAS_CPU_FEATURE (HLE):
  HAS_CPU_FEATURE (HLE): 1
  cpuinfo (hle): 0
 *** failure ***
--
Checking HAS_CPU_FEATURE (RTM):
  HAS_CPU_FEATURE (RTM): 1
  cpuinfo (rtm): 0
 *** failure ***

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

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

* [Bug libc/27398] x86: Sporadic failures in tst-cpu-features-cpuinfo
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (2 preceding siblings ...)
  2021-02-12  9:59 ` siddhesh at sourceware dot org
@ 2021-02-12 13:45 ` hjl.tools at gmail dot com
  2021-02-12 13:51 ` hjl.tools at gmail dot com
                   ` (31 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: hjl.tools at gmail dot com @ 2021-02-12 13:45 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Siddhesh Poyarekar from comment #1)
> The failures become deterministic and numerous (18 failures in all) when the
> test is run under valgrind.  That may have something to do with valgrind's
> emulation but noting it here anyway since it seems relevant.  Importantly,
> valgrind does not report any errors.
> 
> valgrind --trace-children=yes ./testrun.sh elf/tst-cpu-features-cpuinfo
> --direct
> 
> <valgrind output snipped since it does not report any errors>
> 
> Checking HAS_CPU_FEATURE (ACPI):
>   HAS_CPU_FEATURE (ACPI): 1
>   cpuinfo (acpi): 1
> Checking HAS_CPU_FEATURE (ADX):
>   HAS_CPU_FEATURE (ADX): 0
>   cpuinfo (adx): 1
>  *** failure ***

This is because valgrind changes CPUID value:

https://stackoverflow.com/questions/48697579/valgrind-changes-cpuid-value

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

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

* [Bug libc/27398] x86: Sporadic failures in tst-cpu-features-cpuinfo
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (3 preceding siblings ...)
  2021-02-12 13:45 ` hjl.tools at gmail dot com
@ 2021-02-12 13:51 ` hjl.tools at gmail dot com
  2021-02-12 14:00 ` siddhesh at sourceware dot org
                   ` (30 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: hjl.tools at gmail dot com @ 2021-02-12 13:51 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Siddhesh Poyarekar from comment #0)
> The following tests fail sporadically on my machine:
> 
> Checking HAS_CPU_FEATURE (HLE):
>   HAS_CPU_FEATURE (HLE): 1
>   cpuinfo (hle): 0
>  *** failure ***
> --
> Checking HAS_CPU_FEATURE (RTM):
>   HAS_CPU_FEATURE (RTM): 1
>   cpuinfo (rtm): 0
>  *** failure ***
> 
> Whenever it succeeds, HAS_CPU_FEATURE is 0 in both cases but every once in a
> while it returns 1.
> 

This sounds like CPUID instruction returns different value on your procsesors.

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

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

* [Bug libc/27398] x86: Sporadic failures in tst-cpu-features-cpuinfo
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (4 preceding siblings ...)
  2021-02-12 13:51 ` hjl.tools at gmail dot com
@ 2021-02-12 14:00 ` siddhesh at sourceware dot org
  2022-01-14 22:20 ` carlos at redhat dot com
                   ` (29 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: siddhesh at sourceware dot org @ 2021-02-12 14:00 UTC (permalink / raw)
  To: glibc-bugs

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

Siddhesh Poyarekar <siddhesh at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #6 from Siddhesh Poyarekar <siddhesh at sourceware dot org> ---
Yes, this is evidently not a glibc or a test issue.  Closing.

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

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

* [Bug libc/27398] x86: Sporadic failures in tst-cpu-features-cpuinfo
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (5 preceding siblings ...)
  2021-02-12 14:00 ` siddhesh at sourceware dot org
@ 2022-01-14 22:20 ` carlos at redhat dot com
  2022-01-14 22:21 ` [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware carlos at redhat dot com
                   ` (28 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: carlos at redhat dot com @ 2022-01-14 22:20 UTC (permalink / raw)
  To: glibc-bugs

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

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |carlos at redhat dot com
         Resolution|INVALID                     |---

--- Comment #7 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Siddhesh Poyarekar from comment #6)
> Yes, this is evidently not a glibc or a test issue.  Closing.

Just for reference I saw the same problem.

CPU0 cpuid and cpuinfo don't match.

I have the same model as Siddhesh but newer microcode.

processor       : 7
vendor_id       : GenuineIntel
cpu family      : 6
model           : 142
model name      : Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz
stepping        : 12
microcode       : 0xea
cpu MHz         : 1059.308
cache size      : 8192 KB
physical id     : 0
siblings        : 8
core id         : 3
cpu cores       : 4
apicid          : 7
initial apicid  : 7
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
tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch
cpuid_fault epb invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow
vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms
invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves
dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear
flush_l1d arch_capabilities
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 ept_mode_based_exec
bugs            : spectre_v1 spectre_v2 spec_store_bypass swapgs taa
itlb_multihit srbds
bogomips        : 4199.88
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

I'm reopening this because I think we should do something about the testing
aspect of improving false positives in the face of hardware bugs. Even if we
maintain a blacklist in support/* just for testing that would be OK with me.

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (6 preceding siblings ...)
  2022-01-14 22:20 ` carlos at redhat dot com
@ 2022-01-14 22:21 ` carlos at redhat dot com
  2022-01-14 22:26 ` hjl.tools at gmail dot com
                   ` (27 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: carlos at redhat dot com @ 2022-01-14 22:21 UTC (permalink / raw)
  To: glibc-bugs

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

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|x86: Sporadic failures in   |x86: Improve testing false
                   |tst-cpu-features-cpuinfo    |positive for
                   |                            |tst-cpu-features-cpuinfo
                   |                            |with bad hardware.

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (7 preceding siblings ...)
  2022-01-14 22:21 ` [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware carlos at redhat dot com
@ 2022-01-14 22:26 ` hjl.tools at gmail dot com
  2022-01-14 22:57 ` hjl.tools at gmail dot com
                   ` (26 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: hjl.tools at gmail dot com @ 2022-01-14 22:26 UTC (permalink / raw)
  To: glibc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |hjl.tools at gmail dot com
             Status|REOPENED                    |NEW

--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> ---
Let me take a look.

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (8 preceding siblings ...)
  2022-01-14 22:26 ` hjl.tools at gmail dot com
@ 2022-01-14 22:57 ` hjl.tools at gmail dot com
  2022-01-14 22:57 ` hjl.tools at gmail dot com
                   ` (25 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: hjl.tools at gmail dot com @ 2022-01-14 22:57 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 13908
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13908&action=edit
A patch

Please try this.

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (9 preceding siblings ...)
  2022-01-14 22:57 ` hjl.tools at gmail dot com
@ 2022-01-14 22:57 ` hjl.tools at gmail dot com
  2022-01-17 14:09 ` carlos at redhat dot com
                   ` (24 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: hjl.tools at gmail dot com @ 2022-01-14 22:57 UTC (permalink / raw)
  To: glibc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (10 preceding siblings ...)
  2022-01-14 22:57 ` hjl.tools at gmail dot com
@ 2022-01-17 14:09 ` carlos at redhat dot com
  2022-01-17 15:17 ` hjl.tools at gmail dot com
                   ` (23 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: carlos at redhat dot com @ 2022-01-17 14:09 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #10 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to H.J. Lu from comment #9)
> Created attachment 13908 [details]
> A patch
> 
> Please try this.

This fixes the issue for x86_64, thank you very much HJ.

However, I'm still seeing i686 failures as reported here:
https://sourceware.org/pipermail/libc-alpha/2022-January/135345.html

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (11 preceding siblings ...)
  2022-01-17 14:09 ` carlos at redhat dot com
@ 2022-01-17 15:17 ` hjl.tools at gmail dot com
  2022-01-17 15:17 ` hjl.tools at gmail dot com
                   ` (22 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: hjl.tools at gmail dot com @ 2022-01-17 15:17 UTC (permalink / raw)
  To: glibc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #13908|0                           |1
        is obsolete|                            |

--- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 13910
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13910&action=edit
The v2 patch

Please try this.

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (12 preceding siblings ...)
  2022-01-17 15:17 ` hjl.tools at gmail dot com
@ 2022-01-17 15:17 ` hjl.tools at gmail dot com
  2022-01-18  3:49 ` carlos at redhat dot com
                   ` (21 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: hjl.tools at gmail dot com @ 2022-01-17 15:17 UTC (permalink / raw)
  To: glibc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2.35
            Version|unspecified                 |2.35

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (13 preceding siblings ...)
  2022-01-17 15:17 ` hjl.tools at gmail dot com
@ 2022-01-18  3:49 ` carlos at redhat dot com
  2022-01-18  3:50 ` carlos at redhat dot com
                   ` (20 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: carlos at redhat dot com @ 2022-01-18  3:49 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #12 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to H.J. Lu from comment #11)
> Created attachment 13910 [details]
> The v2 patch
> 
> Please try this.

Thanks HJ.

My apologies, I made a mistake during testing, this still fails:

[carlos@fedora ~]$ taskset --cpu-list 0,1 ~/build/glibc-review/testrun.sh
/home/carlos/build/glibc-review/elf/tst-cpu-features-cpuinfo-static; echo $?

Checking HAS_CPU_FEATURE (HLE):
  HAS_CPU_FEATURE (HLE): 1
  cpuinfo (hle): 0
 *** failure ***

Checking HAS_CPU_FEATURE (RTM):
  HAS_CPU_FEATURE (RTM): 1
  cpuinfo (rtm): 0
 *** failure ***

Likewise:

[carlos@fedora ~]$ taskset --cpu-list 0,1 ~/build/glibc-review/testrun.sh
/home/carlos/build/glibc-review/string/tst-memchr-rtm; echo $?
error: ../sysdeps/x86/tst-string-rtm.h:63: TSX abort rate: 100.00% (3000 out of
3000)
error: 1 test failures
1
[carlos@fedora ~]$ taskset --cpu-list 0,1 ~/build/glibc-review/testrun.sh
/home/carlos/build/glibc-review/string/tst-memchr-rtm; echo $?
77

[carlos@fedora ~]$ taskset --cpu-list 0,1 ~/build/glibc-review-i686/testrun.sh
/home/carlos/build/glibc-review-i686/string/tst-memchr-rtm; echo $?
77
[carlos@fedora ~]$ taskset --cpu-list 0,1 ~/build/glibc-review-i686/testrun.sh
/home/carlos/build/glibc-review-i686/string/tst-memchr-rtm; echo $?
error: ../sysdeps/x86/tst-string-rtm.h:63: TSX abort rate: 100.00% (3000 out of
3000)
error: 1 test failures
1

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (14 preceding siblings ...)
  2022-01-18  3:49 ` carlos at redhat dot com
@ 2022-01-18  3:50 ` carlos at redhat dot com
  2022-01-18 14:22 ` hjl.tools at gmail dot com
                   ` (19 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: carlos at redhat dot com @ 2022-01-18  3:50 UTC (permalink / raw)
  To: glibc-bugs

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

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (15 preceding siblings ...)
  2022-01-18  3:50 ` carlos at redhat dot com
@ 2022-01-18 14:22 ` hjl.tools at gmail dot com
  2022-01-18 14:24 ` hjl.tools at gmail dot com
                   ` (18 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: hjl.tools at gmail dot com @ 2022-01-18 14:22 UTC (permalink / raw)
  To: glibc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #13910|0                           |1
        is obsolete|                            |

--- Comment #13 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 13913
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13913&action=edit
The v3 patch

Please try this.

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (16 preceding siblings ...)
  2022-01-18 14:22 ` hjl.tools at gmail dot com
@ 2022-01-18 14:24 ` hjl.tools at gmail dot com
  2022-01-18 16:17 ` carlos at redhat dot com
                   ` (17 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: hjl.tools at gmail dot com @ 2022-01-18 14:24 UTC (permalink / raw)
  To: glibc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING

--- Comment #14 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Carlos O'Donell from comment #12)
> (In reply to H.J. Lu from comment #11)
> > Created attachment 13910 [details]
> > The v2 patch
> > 
> > Please try this.
> 
> Thanks HJ.
> 
> My apologies, I made a mistake during testing, this still fails:
> 
> [carlos@fedora ~]$ taskset --cpu-list 0,1 ~/build/glibc-review/testrun.sh
> /home/carlos/build/glibc-review/elf/tst-cpu-features-cpuinfo-static; echo $?
> 
> Checking HAS_CPU_FEATURE (HLE):
>   HAS_CPU_FEATURE (HLE): 1
>   cpuinfo (hle): 0
>  *** failure ***
> 
> Checking HAS_CPU_FEATURE (RTM):
>   HAS_CPU_FEATURE (RTM): 1
>   cpuinfo (rtm): 0
>  *** failure ***

These should be fixed by the v3 patch.


> Likewise:
> 
> [carlos@fedora ~]$ taskset --cpu-list 0,1 ~/build/glibc-review/testrun.sh
> /home/carlos/build/glibc-review/string/tst-memchr-rtm; echo $?
> error: ../sysdeps/x86/tst-string-rtm.h:63: TSX abort rate: 100.00% (3000 out
> of 3000)
> error: 1 test failures
> 1
> [carlos@fedora ~]$ taskset --cpu-list 0,1 ~/build/glibc-review/testrun.sh
> /home/carlos/build/glibc-review/string/tst-memchr-rtm; echo $?
> 77
> 
> [carlos@fedora ~]$ taskset --cpu-list 0,1
> ~/build/glibc-review-i686/testrun.sh
> /home/carlos/build/glibc-review-i686/string/tst-memchr-rtm; echo $?
> 77
> [carlos@fedora ~]$ taskset --cpu-list 0,1
> ~/build/glibc-review-i686/testrun.sh
> /home/carlos/build/glibc-review-i686/string/tst-memchr-rtm; echo $?
> error: ../sysdeps/x86/tst-string-rtm.h:63: TSX abort rate: 100.00% (3000 out
> of 3000)
> error: 1 test failures
> 1

This test is gated by

static int
do_test_1 (const char *name, unsigned int loop, int (*prepare) (void),
           int (*function) (void))
{
  if (!CPU_FEATURE_ACTIVE (RTM))
    return EXIT_UNSUPPORTED;

Can you find put why your processor isn't on the black list?

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (17 preceding siblings ...)
  2022-01-18 14:24 ` hjl.tools at gmail dot com
@ 2022-01-18 16:17 ` carlos at redhat dot com
  2022-01-18 16:32 ` hjl.tools at gmail dot com
                   ` (16 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: carlos at redhat dot com @ 2022-01-18 16:17 UTC (permalink / raw)
  To: glibc-bugs

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

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #15 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to H.J. Lu from comment #14)
> Can you find put why your processor isn't on the black list?

cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 142
model name      : Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz
stepping        : 12
microcode       : 0xea

+           case 0x8e:
+             if (stepping <= 0xb)
+               goto disable_tsx;
+             break;

Model 142 == Model 142 (0x8e) [OK]
Stepping 12 > Stepping 11 (0xb) [No match]

The blacklist doesn't include my processor, but yet this i7 exhibits something
wrong in CPU0 after resume. So either the errata is wrong or we have a kernel
bug on valid hardware.

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (18 preceding siblings ...)
  2022-01-18 16:17 ` carlos at redhat dot com
@ 2022-01-18 16:32 ` hjl.tools at gmail dot com
  2022-01-18 16:35 ` carlos at redhat dot com
                   ` (15 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: hjl.tools at gmail dot com @ 2022-01-18 16:32 UTC (permalink / raw)
  To: glibc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #13913|0                           |1
        is obsolete|                            |

--- Comment #16 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 13914
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13914&action=edit
The v4 patch

Please try this.

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (19 preceding siblings ...)
  2022-01-18 16:32 ` hjl.tools at gmail dot com
@ 2022-01-18 16:35 ` carlos at redhat dot com
  2022-01-18 16:38 ` carlos at redhat dot com
                   ` (14 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: carlos at redhat dot com @ 2022-01-18 16:35 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #17 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to H.J. Lu from comment #16)
> Created attachment 13914 [details]
> The v4 patch
> 
> Please try this.

That works. Extending it to cover 0xc stepping fixes both failures.

As one of the Intel maintainers for glibc I'm going to rely on your judgement
here if extending the errata to cover 0xc is acceptable. Worst case this is
pessimistic for this hardware and we get user feedback that they want the range
adjusted.

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (20 preceding siblings ...)
  2022-01-18 16:35 ` carlos at redhat dot com
@ 2022-01-18 16:38 ` carlos at redhat dot com
  2022-01-18 22:21 ` cvs-commit at gcc dot gnu.org
                   ` (13 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: carlos at redhat dot com @ 2022-01-18 16:38 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #18 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Carlos O'Donell from comment #17)
> (In reply to H.J. Lu from comment #16)
> > Created attachment 13914 [details]
> > The v4 patch
> > 
> > Please try this.
> 
> That works. Extending it to cover 0xc stepping fixes both failures.
> 
> As one of the Intel maintainers for glibc I'm going to rely on your
> judgement here if extending the errata to cover 0xc is acceptable. Worst
> case this is pessimistic for this hardware and we get user feedback that
> they want the range adjusted.

Note that Siddhesh's hardware is also stepping 12, so this isn't something
random, but a specific flaw with this stepping or a kernel issue. But we can
sort out the latter with more time, and blacklisting this CPU seems correct for
now.

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (21 preceding siblings ...)
  2022-01-18 16:38 ` carlos at redhat dot com
@ 2022-01-18 22:21 ` cvs-commit at gcc dot gnu.org
  2022-01-18 22:22 ` hjl.tools at gmail dot com
                   ` (12 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-18 22:21 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #19 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <hjl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1e000d3d33211d5a954300e2a69b90f93f18a1a1

commit 1e000d3d33211d5a954300e2a69b90f93f18a1a1
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Jan 14 14:48:01 2022 -0800

    x86: Black list more Intel CPUs for TSX [BZ #27398]

    Disable TSX and enable RTM_ALWAYS_ABORT for Intel CPUs listed in:

   
https://www.intel.com/content/www/us/en/support/articles/000059422/processors.html

    This fixes BZ #27398.

    Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (22 preceding siblings ...)
  2022-01-18 22:21 ` cvs-commit at gcc dot gnu.org
@ 2022-01-18 22:22 ` hjl.tools at gmail dot com
  2022-01-25 18:19 ` carlos at redhat dot com
                   ` (11 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: hjl.tools at gmail dot com @ 2022-01-18 22:22 UTC (permalink / raw)
  To: glibc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #20 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed for 2.35.

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (23 preceding siblings ...)
  2022-01-18 22:22 ` hjl.tools at gmail dot com
@ 2022-01-25 18:19 ` carlos at redhat dot com
  2022-01-25 18:41 ` hjl.tools at gmail dot com
                   ` (10 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: carlos at redhat dot com @ 2022-01-25 18:19 UTC (permalink / raw)
  To: glibc-bugs

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

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #21 from Carlos O'Donell <carlos at redhat dot com> ---
On i686 I still see the following failure:

Checking CPU_FEATURE_ACTIVE (HLE):
  CPU_FEATURE_ACTIVE (HLE): 0
  __builtin_cpu_supports (hle): 1048576
 *** failure ***

Which looks like we need to suppress this test because there will always be a
difference here when HLE has been unset by the excluded CPU list?

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (24 preceding siblings ...)
  2022-01-25 18:19 ` carlos at redhat dot com
@ 2022-01-25 18:41 ` hjl.tools at gmail dot com
  2022-01-25 18:42 ` hjl.tools at gmail dot com
                   ` (9 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: hjl.tools at gmail dot com @ 2022-01-25 18:41 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #22 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 13929
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13929&action=edit
A patch for HLE

Try this.

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (25 preceding siblings ...)
  2022-01-25 18:41 ` hjl.tools at gmail dot com
@ 2022-01-25 18:42 ` hjl.tools at gmail dot com
  2022-01-26 19:30 ` carlos at redhat dot com
                   ` (8 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: hjl.tools at gmail dot com @ 2022-01-25 18:42 UTC (permalink / raw)
  To: glibc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #13929|0                           |1
        is obsolete|                            |

--- Comment #23 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 13930
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13930&action=edit
A patch for HLE

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (26 preceding siblings ...)
  2022-01-25 18:42 ` hjl.tools at gmail dot com
@ 2022-01-26 19:30 ` carlos at redhat dot com
  2022-02-01 13:54 ` cvs-commit at gcc dot gnu.org
                   ` (7 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: carlos at redhat dot com @ 2022-01-26 19:30 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #24 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to H.J. Lu from comment #23)
> Created attachment 13930 [details]
> A patch for HLE

The HLE patch fixes the issue and corrects the failure. Thank you!

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (27 preceding siblings ...)
  2022-01-26 19:30 ` carlos at redhat dot com
@ 2022-02-01 13:54 ` cvs-commit at gcc dot gnu.org
  2022-02-01 14:08 ` cvs-commit at gcc dot gnu.org
                   ` (6 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-01 13:54 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #25 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The release/2.34/master branch has been updated by H.J. Lu
<hjl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b952c25dc7adf0684c53ad72d1d667da0348c929

commit b952c25dc7adf0684c53ad72d1d667da0348c929
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Jan 14 14:48:01 2022 -0800

    x86: Black list more Intel CPUs for TSX [BZ #27398]

    Disable TSX and enable RTM_ALWAYS_ABORT for Intel CPUs listed in:

   
https://www.intel.com/content/www/us/en/support/articles/000059422/processors.html

    This fixes BZ #27398.

    Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
    (cherry picked from commit 1e000d3d33211d5a954300e2a69b90f93f18a1a1)

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (28 preceding siblings ...)
  2022-02-01 13:54 ` cvs-commit at gcc dot gnu.org
@ 2022-02-01 14:08 ` cvs-commit at gcc dot gnu.org
  2022-02-01 15:26 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-01 14:08 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #26 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The release/2.33/master branch has been updated by H.J. Lu
<hjl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=54fdfa2b33590fa960bcaf6d016b61e9b783dfab

commit 54fdfa2b33590fa960bcaf6d016b61e9b783dfab
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Jan 14 14:48:01 2022 -0800

    x86: Black list more Intel CPUs for TSX [BZ #27398]

    Disable TSX and enable RTM_ALWAYS_ABORT for Intel CPUs listed in:

   
https://www.intel.com/content/www/us/en/support/articles/000059422/processors.html

    This fixes BZ #27398.

    Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
    (cherry picked from commit 1e000d3d33211d5a954300e2a69b90f93f18a1a1)

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (29 preceding siblings ...)
  2022-02-01 14:08 ` cvs-commit at gcc dot gnu.org
@ 2022-02-01 15:26 ` cvs-commit at gcc dot gnu.org
  2022-02-01 15:36 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-01 15:26 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #27 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The release/2.32/master branch has been updated by H.J. Lu
<hjl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b1fcaf14fe91a35a21a184623c4f08352f566297

commit b1fcaf14fe91a35a21a184623c4f08352f566297
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Jan 14 14:48:01 2022 -0800

    x86: Black list more Intel CPUs for TSX [BZ #27398]

    Disable TSX and enable RTM_ALWAYS_ABORT for Intel CPUs listed in:

   
https://www.intel.com/content/www/us/en/support/articles/000059422/processors.html

    This fixes BZ #27398.

    Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
    (cherry picked from commit 1e000d3d33211d5a954300e2a69b90f93f18a1a1)

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (30 preceding siblings ...)
  2022-02-01 15:26 ` cvs-commit at gcc dot gnu.org
@ 2022-02-01 15:36 ` cvs-commit at gcc dot gnu.org
  2022-02-01 15:59 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-01 15:36 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #28 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The release/2.31/master branch has been updated by H.J. Lu
<hjl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5db3239baf661b9ccdee58949e282ad34e1c8956

commit 5db3239baf661b9ccdee58949e282ad34e1c8956
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Jan 14 14:48:01 2022 -0800

    x86: Black list more Intel CPUs for TSX [BZ #27398]

    Disable TSX and enable RTM_ALWAYS_ABORT for Intel CPUs listed in:

   
https://www.intel.com/content/www/us/en/support/articles/000059422/processors.html

    This fixes BZ #27398.

    Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
    (cherry picked from commit 1e000d3d33211d5a954300e2a69b90f93f18a1a1)

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (31 preceding siblings ...)
  2022-02-01 15:36 ` cvs-commit at gcc dot gnu.org
@ 2022-02-01 15:59 ` cvs-commit at gcc dot gnu.org
  2022-02-01 16:06 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-01 15:59 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #29 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The release/2.30/master branch has been updated by H.J. Lu
<hjl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=76e30dd44ef7aab743a538dcd4a81761a1f612d9

commit 76e30dd44ef7aab743a538dcd4a81761a1f612d9
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Jan 14 14:48:01 2022 -0800

    x86: Black list more Intel CPUs for TSX [BZ #27398]

    Disable TSX and enable RTM_ALWAYS_ABORT for Intel CPUs listed in:

   
https://www.intel.com/content/www/us/en/support/articles/000059422/processors.html

    This fixes BZ #27398.

    Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
    (cherry picked from commit 1e000d3d33211d5a954300e2a69b90f93f18a1a1)

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (32 preceding siblings ...)
  2022-02-01 15:59 ` cvs-commit at gcc dot gnu.org
@ 2022-02-01 16:06 ` cvs-commit at gcc dot gnu.org
  2022-02-01 17:16 ` cvs-commit at gcc dot gnu.org
  2022-05-02 10:42 ` fweimer at redhat dot com
  35 siblings, 0 replies; 37+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-01 16:06 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #30 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The release/2.29/master branch has been updated by H.J. Lu
<hjl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5d94c86a47ded691d954bf38c443bb83dc83cb46

commit 5d94c86a47ded691d954bf38c443bb83dc83cb46
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Jan 14 14:48:01 2022 -0800

    x86: Black list more Intel CPUs for TSX [BZ #27398]

    Disable TSX and enable RTM_ALWAYS_ABORT for Intel CPUs listed in:

   
https://www.intel.com/content/www/us/en/support/articles/000059422/processors.html

    This fixes BZ #27398.

    Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
    (cherry picked from commit 1e000d3d33211d5a954300e2a69b90f93f18a1a1)

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (33 preceding siblings ...)
  2022-02-01 16:06 ` cvs-commit at gcc dot gnu.org
@ 2022-02-01 17:16 ` cvs-commit at gcc dot gnu.org
  2022-05-02 10:42 ` fweimer at redhat dot com
  35 siblings, 0 replies; 37+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-01 17:16 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #31 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The release/2.28/master branch has been updated by H.J. Lu
<hjl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5219747d67f0f3860dc3ccf54bc9473b2aec0311

commit 5219747d67f0f3860dc3ccf54bc9473b2aec0311
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Jan 14 14:48:01 2022 -0800

    x86: Black list more Intel CPUs for TSX [BZ #27398]

    Disable TSX and enable RTM_ALWAYS_ABORT for Intel CPUs listed in:

   
https://www.intel.com/content/www/us/en/support/articles/000059422/processors.html

    This fixes BZ #27398.

    Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
    (cherry picked from commit 1e000d3d33211d5a954300e2a69b90f93f18a1a1)

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

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

* [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware.
  2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
                   ` (34 preceding siblings ...)
  2022-02-01 17:16 ` cvs-commit at gcc dot gnu.org
@ 2022-05-02 10:42 ` fweimer at redhat dot com
  35 siblings, 0 replies; 37+ messages in thread
From: fweimer at redhat dot com @ 2022-05-02 10:42 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |MOVED
             Status|REOPENED                    |RESOLVED

--- Comment #32 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Siddhesh Poyarekar from comment #3)
> It only reports failures on cpu0, on every run, none of the other cores:
> 
> $ taskset --cpu-list 0 ./testrun.sh elf/tst-cpu-features-cpuinfo | grep -B 3
> fail
> Checking HAS_CPU_FEATURE (HLE):
>   HAS_CPU_FEATURE (HLE): 1
>   cpuinfo (hle): 0
>  *** failure ***
> --
> Checking HAS_CPU_FEATURE (RTM):
>   HAS_CPU_FEATURE (RTM): 1
>   cpuinfo (rtm): 0
>  *** failure ***

This was fixed as a kernel bug:

commit e2a1256b17b16f9b9adf1b6fea56819e7b68e463
Author: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Date:   Mon Apr 4 17:35:45 2022 -0700

    x86/speculation: Restore speculation related MSRs during S3 resume

    After resuming from suspend-to-RAM, the MSRs that control CPU's
    speculative execution behavior are not being restored on the boot CPU.

    These MSRs are used to mitigate speculative execution vulnerabilities.
    Not restoring them correctly may leave the CPU vulnerable.  Secondary
    CPU's MSRs are correctly being restored at S3 resume by
    identify_secondary_cpu().

    During S3 resume, restore these MSRs for boot CPU when restoring its
    processor state.

    Fixes: 772439717dbf ("x86/bugs/intel: Set proper CPU features and setup
RDS")
    Reported-by: Neelima Krishnan <neelima.krishnan@intel.com>
    Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
    Tested-by: Neelima Krishnan <neelima.krishnan@intel.com>
    Acked-by: Borislav Petkov <bp@suse.de>
    Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Leaving this bug here at security- because it's not a glibc bug (disabling RTM
for glibc's own use does not mitigate the vulnerability).

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

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

end of thread, other threads:[~2022-05-02 10:42 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-12  4:44 [Bug libc/27398] New: Sporadic failures in tst-cpu-features-cpuinfo siddhesh at sourceware dot org
2021-02-12  4:52 ` [Bug libc/27398] " siddhesh at sourceware dot org
2021-02-12  9:46 ` [Bug libc/27398] x86: " fweimer at redhat dot com
2021-02-12  9:59 ` siddhesh at sourceware dot org
2021-02-12 13:45 ` hjl.tools at gmail dot com
2021-02-12 13:51 ` hjl.tools at gmail dot com
2021-02-12 14:00 ` siddhesh at sourceware dot org
2022-01-14 22:20 ` carlos at redhat dot com
2022-01-14 22:21 ` [Bug libc/27398] x86: Improve testing false positive for tst-cpu-features-cpuinfo with bad hardware carlos at redhat dot com
2022-01-14 22:26 ` hjl.tools at gmail dot com
2022-01-14 22:57 ` hjl.tools at gmail dot com
2022-01-14 22:57 ` hjl.tools at gmail dot com
2022-01-17 14:09 ` carlos at redhat dot com
2022-01-17 15:17 ` hjl.tools at gmail dot com
2022-01-17 15:17 ` hjl.tools at gmail dot com
2022-01-18  3:49 ` carlos at redhat dot com
2022-01-18  3:50 ` carlos at redhat dot com
2022-01-18 14:22 ` hjl.tools at gmail dot com
2022-01-18 14:24 ` hjl.tools at gmail dot com
2022-01-18 16:17 ` carlos at redhat dot com
2022-01-18 16:32 ` hjl.tools at gmail dot com
2022-01-18 16:35 ` carlos at redhat dot com
2022-01-18 16:38 ` carlos at redhat dot com
2022-01-18 22:21 ` cvs-commit at gcc dot gnu.org
2022-01-18 22:22 ` hjl.tools at gmail dot com
2022-01-25 18:19 ` carlos at redhat dot com
2022-01-25 18:41 ` hjl.tools at gmail dot com
2022-01-25 18:42 ` hjl.tools at gmail dot com
2022-01-26 19:30 ` carlos at redhat dot com
2022-02-01 13:54 ` cvs-commit at gcc dot gnu.org
2022-02-01 14:08 ` cvs-commit at gcc dot gnu.org
2022-02-01 15:26 ` cvs-commit at gcc dot gnu.org
2022-02-01 15:36 ` cvs-commit at gcc dot gnu.org
2022-02-01 15:59 ` cvs-commit at gcc dot gnu.org
2022-02-01 16:06 ` cvs-commit at gcc dot gnu.org
2022-02-01 17:16 ` cvs-commit at gcc dot gnu.org
2022-05-02 10:42 ` 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).