public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/31325] New: mips: clone3 is wrong for o32
@ 2024-02-01 17:40 adhemerval.zanella at linaro dot org
  2024-06-15 13:37 ` [Bug libc/31325] " dilfridge at gentoo dot org
  0 siblings, 1 reply; 2+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2024-02-01 17:40 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 31325
           Summary: mips: clone3 is wrong for o32
           Product: glibc
           Version: 2.39
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: adhemerval.zanella at linaro dot org
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

The mips clone3 (sysdeps/unix/sysv/linux/mips/clone3.S) does not take in
consideration that the cprestore might generate the gp save on the stack (so
clone3 must allocate some space before issuing the syscall) and $8 is not
guarantee by the kABI to be preserved after the syscall.

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

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

* [Bug libc/31325] mips: clone3 is wrong for o32
  2024-02-01 17:40 [Bug libc/31325] New: mips: clone3 is wrong for o32 adhemerval.zanella at linaro dot org
@ 2024-06-15 13:37 ` dilfridge at gentoo dot org
  0 siblings, 0 replies; 2+ messages in thread
From: dilfridge at gentoo dot org @ 2024-06-15 13:37 UTC (permalink / raw)
  To: glibc-bugs

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

Andreas K. Huettel <dilfridge at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |2.40
                 CC|                            |dilfridge at gentoo dot org
             Status|NEW                         |RESOLVED

--- Comment #1 from Andreas K. Huettel <dilfridge at gentoo dot org> ---
commit bbd248ac0d75efdef8fe61ea69b1fb25fb95b6e7
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Feb 1 14:29:53 2024 -0300

    mips: FIx clone3 implementation (BZ 31325)

    For o32 we need to setup a minimal stack frame to allow cprestore
    on __thread_start_clone3 (which instruct the linker to save the
    gp for PIC).  Also, there is no guarantee by kABI that $8 will be
    preserved after syscall execution, so we need to save it on the
    provided stack.

    Checked on mipsel-linux-gnu.

    Reported-by: Khem Raj <raj.khem@gmail.com>
    Tested-by: Khem Raj <raj.khem@gmail.com>

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

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

end of thread, other threads:[~2024-06-15 13:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-01 17:40 [Bug libc/31325] New: mips: clone3 is wrong for o32 adhemerval.zanella at linaro dot org
2024-06-15 13:37 ` [Bug libc/31325] " dilfridge at gentoo dot org

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).