glibc/sysdeps/unix
Florian Weimer 6a04404521 Linux: Switch back to assembly syscall wrapper for prctl (bug 29770)
Commit ff026950e2 ("Add a C wrapper for
prctl [BZ #25896]") replaced the assembler wrapper with a C function.
However, on powerpc64le-linux-gnu, the C variadic function
implementation requires extra work in the caller to set up the
parameter save area.  Calling a function that needs a parameter save
area without one (because the prototype used indicates the function is
not variadic) corrupts the caller's stack.   The Linux manual pages
project documents prctl as a non-variadic function.  This has resulted
in various projects over the years using non-variadic prototypes,
including the sanitizer libraries in LLVm and GCC (GCC PR 113728).

This commit switches back to the assembler implementation on most
targets and only keeps the C implementation for x86-64 x32.

Also add the __prctl_time64 alias from commit
b39ffab860 ("Linux: Add time64 alias for
prctl") to sysdeps/unix/sysv/linux/syscalls.list; it was not yet
present in commit ff026950e2.

This restores the old ABI on powerpc64le-linux-gnu, thus fixing
bug 29770.

Reviewed-By: Simon Chopin <simon.chopin@canonical.com>
2024-02-17 09:17:04 +01:00
..
alpha Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
arm Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
bsd Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
i386 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
inet Remove obsolete, never-implemented XSI STREAMS declarations 2019-03-14 15:44:15 +01:00
mips Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
powerpc Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
sh Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
sysv/linux Linux: Switch back to assembly syscall wrapper for prctl (bug 29770) 2024-02-17 09:17:04 +01:00
x86_64 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
confstr.h
get_child_max.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
getlogin_r.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
getlogin.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
getpagesize.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
grantpt.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ifreq.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Implies
make-syscalls.sh Add SYSCALL_ULONG_ARG_[12] to pass long to syscall [BZ #25810] 2020-04-29 05:35:34 -07:00
Makefile Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
setxid.h Update. 2004-11-12 01:27:04 +00:00
sockatmark.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
syscall-template.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
syscall.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
syscalls.list misc: Add time64 alias for ioctl 2021-07-21 11:58:09 +02:00
sysdep.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00