public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/31402] New: clone (NULL, NULL, ...) clobbers %r7 register on s390{,x}
@ 2024-02-19 14:58 jakub at redhat dot com
  2024-02-19 14:59 ` [Bug libc/31402] " jakub at redhat dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jakub at redhat dot com @ 2024-02-19 14:58 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 31402
           Summary: clone (NULL, NULL, ...) clobbers %r7 register on
                    s390{,x}
           Product: glibc
           Version: 2.40
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: jakub at redhat dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

Initially filed in https://gcc.gnu.org/PR113991, but it looks like a glibc bug
to me.
vsftpd for some strange reason does:
int ret = clone(NULL, NULL, CLONE_NEWPID | CLONE_NEWIPC | SIGCHLD, NULL);
My reading of glibc sources is that this results always in -1/EINVAL without
invoking the syscall.
Anyway, since
https://sourceware.org/git/?p=glibc.git;a=commit;h=e57d8fc97b90127de4ed3e3a9cdf663667580935
if the first or second clone argument is NULL, it will return -1/EINVAL, but
clobber the call-saved %r7 register.
I think error: label should either lm{,g} %r6,%7 or l{,g} %r7.

-- 
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 libc/31402] clone (NULL, NULL, ...) clobbers %r7 register on s390{,x}
  2024-02-19 14:58 [Bug libc/31402] New: clone (NULL, NULL, ...) clobbers %r7 register on s390{,x} jakub at redhat dot com
@ 2024-02-19 14:59 ` jakub at redhat dot com
  2024-02-19 15:12 ` schwab@linux-m68k.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at redhat dot com @ 2024-02-19 14:59 UTC (permalink / raw)
  To: glibc-bugs

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

Jakub Jelinek <jakub at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |stli at linux dot ibm.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 libc/31402] clone (NULL, NULL, ...) clobbers %r7 register on s390{,x}
  2024-02-19 14:58 [Bug libc/31402] New: clone (NULL, NULL, ...) clobbers %r7 register on s390{,x} jakub at redhat dot com
  2024-02-19 14:59 ` [Bug libc/31402] " jakub at redhat dot com
@ 2024-02-19 15:12 ` schwab@linux-m68k.org
  2024-02-19 16:30 ` sam at gentoo dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: schwab@linux-m68k.org @ 2024-02-19 15:12 UTC (permalink / raw)
  To: glibc-bugs

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

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|2.40                        |2.37

--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> ---
Introduced in commit e57d8fc97b.

-- 
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 libc/31402] clone (NULL, NULL, ...) clobbers %r7 register on s390{,x}
  2024-02-19 14:58 [Bug libc/31402] New: clone (NULL, NULL, ...) clobbers %r7 register on s390{,x} jakub at redhat dot com
  2024-02-19 14:59 ` [Bug libc/31402] " jakub at redhat dot com
  2024-02-19 15:12 ` schwab@linux-m68k.org
@ 2024-02-19 16:30 ` sam at gentoo dot org
  2024-02-20  6:50 ` stli at linux dot ibm.com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: sam at gentoo dot org @ 2024-02-19 16:30 UTC (permalink / raw)
  To: glibc-bugs

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

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=113991
                 CC|                            |sam at gentoo dot org

-- 
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 libc/31402] clone (NULL, NULL, ...) clobbers %r7 register on s390{,x}
  2024-02-19 14:58 [Bug libc/31402] New: clone (NULL, NULL, ...) clobbers %r7 register on s390{,x} jakub at redhat dot com
                   ` (2 preceding siblings ...)
  2024-02-19 16:30 ` sam at gentoo dot org
@ 2024-02-20  6:50 ` stli at linux dot ibm.com
  2024-02-21 21:59 ` carlos at redhat dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: stli at linux dot ibm.com @ 2024-02-20  6:50 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #2 from Stefan Liebler <stli at linux dot ibm.com> ---
Yes, you are right, this is broken. I'll take care of it. Thanks for figuring
out and reporting to me.

-- 
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 libc/31402] clone (NULL, NULL, ...) clobbers %r7 register on s390{,x}
  2024-02-19 14:58 [Bug libc/31402] New: clone (NULL, NULL, ...) clobbers %r7 register on s390{,x} jakub at redhat dot com
                   ` (3 preceding siblings ...)
  2024-02-20  6:50 ` stli at linux dot ibm.com
@ 2024-02-21 21:59 ` carlos at redhat dot com
  2024-02-26 12:45 ` stli at linux dot ibm.com
  2024-02-27 10:16 ` stli at linux dot ibm.com
  6 siblings, 0 replies; 8+ messages in thread
From: carlos at redhat dot com @ 2024-02-21 21:59 UTC (permalink / raw)
  To: glibc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |carlos at redhat dot com

--- Comment #3 from Carlos O'Donell <carlos at redhat dot com> ---
Patch under review:
https://patchwork.sourceware.org/project/glibc/patch/20240221161307.2821102-1-stli@linux.ibm.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 libc/31402] clone (NULL, NULL, ...) clobbers %r7 register on s390{,x}
  2024-02-19 14:58 [Bug libc/31402] New: clone (NULL, NULL, ...) clobbers %r7 register on s390{,x} jakub at redhat dot com
                   ` (4 preceding siblings ...)
  2024-02-21 21:59 ` carlos at redhat dot com
@ 2024-02-26 12:45 ` stli at linux dot ibm.com
  2024-02-27 10:16 ` stli at linux dot ibm.com
  6 siblings, 0 replies; 8+ messages in thread
From: stli at linux dot ibm.com @ 2024-02-26 12:45 UTC (permalink / raw)
  To: glibc-bugs

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

Stefan Liebler <stli at linux dot ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2.40

--- Comment #4 from Stefan Liebler <stli at linux dot ibm.com> ---
Committed to master:
"S390: Do not clobber r7 in clone [BZ #31402]"
https://sourceware.org/git/?p=glibc.git;a=commit;h=02782fd12849b6673cb5c2728cb750e8ec295aa3

I will backport this commit to the release branches and will then close this
bugzilla.

-- 
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 libc/31402] clone (NULL, NULL, ...) clobbers %r7 register on s390{,x}
  2024-02-19 14:58 [Bug libc/31402] New: clone (NULL, NULL, ...) clobbers %r7 register on s390{,x} jakub at redhat dot com
                   ` (5 preceding siblings ...)
  2024-02-26 12:45 ` stli at linux dot ibm.com
@ 2024-02-27 10:16 ` stli at linux dot ibm.com
  6 siblings, 0 replies; 8+ messages in thread
From: stli at linux dot ibm.com @ 2024-02-27 10:16 UTC (permalink / raw)
  To: glibc-bugs

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

Stefan Liebler <stli at linux dot ibm.com> changed:

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

--- Comment #5 from Stefan Liebler <stli at linux dot ibm.com> ---
Also backported to release-branches:
- release/2.37/master:
https://sourceware.org/git/?p=glibc.git;a=commit;h=9a1bdd7df731a4bc60f72dbdc1b849e02cfa9c34
- release/2.38/master:
https://sourceware.org/git/?p=glibc.git;a=commit;h=ee4806e978467d705b26ccb7dfddb9e0a710f8e4
- release/2.39/master:
https://sourceware.org/git/?p=glibc.git;a=commit;h=e0910f1d3278f05439fb434ee528fc9be1b6bd5e

-- 
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:[~2024-02-27 10:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-19 14:58 [Bug libc/31402] New: clone (NULL, NULL, ...) clobbers %r7 register on s390{,x} jakub at redhat dot com
2024-02-19 14:59 ` [Bug libc/31402] " jakub at redhat dot com
2024-02-19 15:12 ` schwab@linux-m68k.org
2024-02-19 16:30 ` sam at gentoo dot org
2024-02-20  6:50 ` stli at linux dot ibm.com
2024-02-21 21:59 ` carlos at redhat dot com
2024-02-26 12:45 ` stli at linux dot ibm.com
2024-02-27 10:16 ` stli at linux dot ibm.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).