mips: FIx clone3 implementation (BZ 31325)
commitbbd248ac0d75efdef8fe61ea69b1fb25fb95b6e7
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 1 Feb 2024 17:29:53 +0000 (1 14:29 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 2 Feb 2024 13:28:16 +0000 (2 10:28 -0300)
tree9cb97b4ac0323c4c24c61805af42cb1a277b7ff5
parente7b90e6e605cf236d4bd79e4930cd6a46f9932c7
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>
sysdeps/unix/sysv/linux/mips/clone3.S