diff options
author | Florian Weimer <fweimer@redhat.com> | 2024-02-17 09:17:04 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2024-02-17 09:17:04 +0100 |
commit | 6a04404521ac4119ae36827eeb288ea84eee7cf6 (patch) | |
tree | 6f61723edc556c027ca4434dd3773cdae9cb1c08 /sysdeps/mach/hurd/getrusage.c | |
parent | 0d9166c2245cad4ac520b337dee40c9a583872b6 (diff) | |
download | glibc-6a04404521ac4119ae36827eeb288ea84eee7cf6.tar glibc-6a04404521ac4119ae36827eeb288ea84eee7cf6.tar.gz glibc-6a04404521ac4119ae36827eeb288ea84eee7cf6.tar.bz2 glibc-6a04404521ac4119ae36827eeb288ea84eee7cf6.zip |
Linux: Switch back to assembly syscall wrapper for prctl (bug 29770)
Commit ff026950e280bc3e9487b41b460fb31bc5b57721 ("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
b39ffab860cd743a82c91946619f1b8158b0b65e ("Linux: Add time64 alias for
prctl") to sysdeps/unix/sysv/linux/syscalls.list; it was not yet
present in commit ff026950e280bc3e9487b41b460fb31bc5b57721.
This restores the old ABI on powerpc64le-linux-gnu, thus fixing
bug 29770.
Reviewed-By: Simon Chopin <simon.chopin@canonical.com>
Diffstat (limited to 'sysdeps/mach/hurd/getrusage.c')
0 files changed, 0 insertions, 0 deletions