public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug string/29127] New: Incomplete backport causes tst-{strncmp,wcsncmp}-rtm to fail
@ 2022-05-07  1:17 ats-sourceware at offog dot org
  2022-05-23 13:32 ` [Bug string/29127] " fweimer at redhat dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: ats-sourceware at offog dot org @ 2022-05-07  1:17 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 29127
           Summary: Incomplete backport causes tst-{strncmp,wcsncmp}-rtm
                    to fail
           Product: glibc
           Version: 2.35
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: string
          Assignee: unassigned at sourceware dot org
          Reporter: ats-sourceware at offog dot org
  Target Milestone: ---

Created attachment 14093
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14093&action=edit
Sample fix for 2.35 branch

The commit c6272098323153db373f2986c67786ea8c85f1cf ("x86: Fallback
{str|wcs}cmp RTM in the ncmp overflow case [BZ #28896]") was backported as
fd412fff6d2bd322ec24ebd13fab196efc6c5506 to the 2.35 branch, but the backported
version doesn't cover all of the fallback cases in the original commit.
(Looking at #28896, maybe the original version got backported rather than the
revised version that went into master?)

On my i7-9700KF, this causes string/tst-strncmp-rtm and string/tst-wcsncmp-rtm
to fail with:

error: ../sysdeps/x86/tst-string-rtm.h:63: TSX abort rate: 100.00% (3000 out of
3000)

I've attached an example patch to fix this for 2.35 - just making the
appropriate bit of sysdeps/x86_64/multiarch/strcmp-avx2.S match what's now in
master - but a similar fix probably needs applying to the other release
branches too.

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

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

* [Bug string/29127] Incomplete backport causes tst-{strncmp,wcsncmp}-rtm to fail
  2022-05-07  1:17 [Bug string/29127] New: Incomplete backport causes tst-{strncmp,wcsncmp}-rtm to fail ats-sourceware at offog dot org
@ 2022-05-23 13:32 ` fweimer at redhat dot com
  2022-05-23 15:25 ` goldstein.w.n at gmail dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: fweimer at redhat dot com @ 2022-05-23 13:32 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-
                 CC|                            |fweimer at redhat dot com

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

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

* [Bug string/29127] Incomplete backport causes tst-{strncmp,wcsncmp}-rtm to fail
  2022-05-07  1:17 [Bug string/29127] New: Incomplete backport causes tst-{strncmp,wcsncmp}-rtm to fail ats-sourceware at offog dot org
  2022-05-23 13:32 ` [Bug string/29127] " fweimer at redhat dot com
@ 2022-05-23 15:25 ` goldstein.w.n at gmail dot com
  2022-05-25 22:03 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: goldstein.w.n at gmail dot com @ 2022-05-23 15:25 UTC (permalink / raw)
  To: glibc-bugs

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

Noah Goldstein <goldstein.w.n at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |goldstein.w.n at gmail dot com

--- Comment #1 from Noah Goldstein <goldstein.w.n at gmail dot com> ---
Seems to be missing:

https://sourceware.org/git/?p=glibc.git;a=commit;h=fd412fff6d2bd322ec24ebd13fab196efc6c5506

commit c6272098323153db373f2986c67786ea8c85f1cf
Author: Noah Goldstein <goldstein.w.n@gmail.com>
Date:   Tue Feb 15 08:18:15 2022 -0600

    x86: Fallback {str|wcs}cmp RTM in the ncmp overflow case [BZ #28896]

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

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

* [Bug string/29127] Incomplete backport causes tst-{strncmp,wcsncmp}-rtm to fail
  2022-05-07  1:17 [Bug string/29127] New: Incomplete backport causes tst-{strncmp,wcsncmp}-rtm to fail ats-sourceware at offog dot org
  2022-05-23 13:32 ` [Bug string/29127] " fweimer at redhat dot com
  2022-05-23 15:25 ` goldstein.w.n at gmail dot com
@ 2022-05-25 22:03 ` cvs-commit at gcc dot gnu.org
  2022-05-25 23:08 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-25 22:03 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The release/2.35/master branch has been updated by Sunil Pandey
<skpgkp2@sourceware.org>:

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

commit ac87df8d750b0734e20ffb82d1d0d0efbe4b6212
Author: Noah Goldstein <goldstein.w.n@gmail.com>
Date:   Tue Feb 15 08:18:15 2022 -0600

    x86: Fallback {str|wcs}cmp RTM in the ncmp overflow case [BZ #29127]

    Re-cherry-pick commit c627209832 for strcmp-avx2.S change which was
    omitted in intial cherry pick because at the time this bug was not
    present on release branch.

    Fixes BZ #29127.

    In the overflow fallback strncmp-avx2-rtm and wcsncmp-avx2-rtm would
    call strcmp-avx2 and wcscmp-avx2 respectively. This would have
    not checks around vzeroupper and would trigger spurious
    aborts. This commit fixes that.

    test-strcmp, test-strncmp, test-wcscmp, and test-wcsncmp all pass on
    AVX2 machines with and without RTM.

    Co-authored-by: H.J. Lu <hjl.tools@gmail.com>
    (cherry picked from commit c6272098323153db373f2986c67786ea8c85f1cf)

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

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

* [Bug string/29127] Incomplete backport causes tst-{strncmp,wcsncmp}-rtm to fail
  2022-05-07  1:17 [Bug string/29127] New: Incomplete backport causes tst-{strncmp,wcsncmp}-rtm to fail ats-sourceware at offog dot org
                   ` (2 preceding siblings ...)
  2022-05-25 22:03 ` cvs-commit at gcc dot gnu.org
@ 2022-05-25 23:08 ` cvs-commit at gcc dot gnu.org
  2022-05-25 23:11 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-25 23:08 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #3 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 Sunil Pandey
<skpgkp2@sourceware.org>:

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

commit 83ae8287c1c3009459ff29241b647ff61363b22c
Author: Noah Goldstein <goldstein.w.n@gmail.com>
Date:   Tue Feb 15 08:18:15 2022 -0600

    x86: Fallback {str|wcs}cmp RTM in the ncmp overflow case [BZ #29127]

    Re-cherry-pick commit c627209832 for strcmp-avx2.S change which was
    omitted in intial cherry pick because at the time this bug was not
    present on release branch.

    Fixes BZ #29127.

    In the overflow fallback strncmp-avx2-rtm and wcsncmp-avx2-rtm would
    call strcmp-avx2 and wcscmp-avx2 respectively. This would have
    not checks around vzeroupper and would trigger spurious
    aborts. This commit fixes that.

    test-strcmp, test-strncmp, test-wcscmp, and test-wcsncmp all pass on
    AVX2 machines with and without RTM.

    Co-authored-by: H.J. Lu <hjl.tools@gmail.com>
    (cherry picked from commit c6272098323153db373f2986c67786ea8c85f1cf)

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

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

* [Bug string/29127] Incomplete backport causes tst-{strncmp,wcsncmp}-rtm to fail
  2022-05-07  1:17 [Bug string/29127] New: Incomplete backport causes tst-{strncmp,wcsncmp}-rtm to fail ats-sourceware at offog dot org
                   ` (3 preceding siblings ...)
  2022-05-25 23:08 ` cvs-commit at gcc dot gnu.org
@ 2022-05-25 23:11 ` cvs-commit at gcc dot gnu.org
  2022-05-25 23:24 ` ats-sourceware at offog dot org
  2022-05-26  3:01 ` hjl.tools at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-25 23:11 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #4 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 Sunil Pandey
<skpgkp2@sourceware.org>:

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

commit 69f16619e7119e26d70c00ac8b8750ed350147a3
Author: Noah Goldstein <goldstein.w.n@gmail.com>
Date:   Tue Feb 15 08:18:15 2022 -0600

    x86: Fallback {str|wcs}cmp RTM in the ncmp overflow case [BZ #29127]

    Re-cherry-pick commit c627209832 for strcmp-avx2.S change which was
    omitted in intial cherry pick because at the time this bug was not
    present on release branch.

    Fixes BZ #29127.

    In the overflow fallback strncmp-avx2-rtm and wcsncmp-avx2-rtm would
    call strcmp-avx2 and wcscmp-avx2 respectively. This would have
    not checks around vzeroupper and would trigger spurious
    aborts. This commit fixes that.

    test-strcmp, test-strncmp, test-wcscmp, and test-wcsncmp all pass on
    AVX2 machines with and without RTM.

    Co-authored-by: H.J. Lu <hjl.tools@gmail.com>
    (cherry picked from commit c6272098323153db373f2986c67786ea8c85f1cf)

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

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

* [Bug string/29127] Incomplete backport causes tst-{strncmp,wcsncmp}-rtm to fail
  2022-05-07  1:17 [Bug string/29127] New: Incomplete backport causes tst-{strncmp,wcsncmp}-rtm to fail ats-sourceware at offog dot org
                   ` (4 preceding siblings ...)
  2022-05-25 23:11 ` cvs-commit at gcc dot gnu.org
@ 2022-05-25 23:24 ` ats-sourceware at offog dot org
  2022-05-26  3:01 ` hjl.tools at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: ats-sourceware at offog dot org @ 2022-05-25 23:24 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #5 from Adam Sampson <ats-sourceware at offog dot org> ---
Excellent - I can confirm the 2.35 branch fix works for me. Thanks very much!

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

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

* [Bug string/29127] Incomplete backport causes tst-{strncmp,wcsncmp}-rtm to fail
  2022-05-07  1:17 [Bug string/29127] New: Incomplete backport causes tst-{strncmp,wcsncmp}-rtm to fail ats-sourceware at offog dot org
                   ` (5 preceding siblings ...)
  2022-05-25 23:24 ` ats-sourceware at offog dot org
@ 2022-05-26  3:01 ` hjl.tools at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2022-05-26  3:01 UTC (permalink / raw)
  To: glibc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |2.35

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed on 2.35 branch.

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

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

end of thread, other threads:[~2022-05-26  3:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-07  1:17 [Bug string/29127] New: Incomplete backport causes tst-{strncmp,wcsncmp}-rtm to fail ats-sourceware at offog dot org
2022-05-23 13:32 ` [Bug string/29127] " fweimer at redhat dot com
2022-05-23 15:25 ` goldstein.w.n at gmail dot com
2022-05-25 22:03 ` cvs-commit at gcc dot gnu.org
2022-05-25 23:08 ` cvs-commit at gcc dot gnu.org
2022-05-25 23:11 ` cvs-commit at gcc dot gnu.org
2022-05-25 23:24 ` ats-sourceware at offog dot org
2022-05-26  3:01 ` hjl.tools at gmail 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).