aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2019-10-19 21:25:23 -0400
committerRich Felker <dalias@aerifal.cx>2019-10-19 21:25:23 -0400
commit7e8171143124f7f510db555dc6f6327a965a3e84 (patch)
treea3237123e0131a232e7e1fd595e2b652b817557b
parentc2518a8efb6507f1b41c3b12e03b06f8f2317a1f (diff)
downloadmusl-7e8171143124f7f510db555dc6f6327a965a3e84.zip
musl-7e8171143124f7f510db555dc6f6327a965a3e84.tar.gz
musl-7e8171143124f7f510db555dc6f6327a965a3e84.tar.bz2
internally, define time64 rusage syscalls on x32 as the existing ones
this is analogous to commit 40aa18d55ab763e69ad16d0cf1cebea708ffde47. so far, there are not any actual time64 versions of the rusage syscalls (getrusage and wait4) and might never be. however, the existing x32 ones behave the way time64 versions would if they existed: using 64-bit slots in place of all longs. presently, wait4 and getrusage are broken on x32, storing the timevals correctly but messing up everything else due to the long/kernel-long mismatch. this would be a huge buffer overflow if not for the 16 reserved slots we left long ago, which suffice to prevent 14 double-sized longs from overflowing into unrelated memory. this commit will make it possible to fix them.
-rw-r--r--arch/x32/syscall_arch.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x32/syscall_arch.h b/arch/x32/syscall_arch.h
index e0a2216..e0111cc 100644
--- a/arch/x32/syscall_arch.h
+++ b/arch/x32/syscall_arch.h
@@ -87,5 +87,7 @@ static __inline long __syscall6(long long n, long long a1, long long a2, long lo
#define SYS_rt_sigtimedwait_time64 SYS_rt_sigtimedwait
#define SYS_futex_time64 SYS_futex
#define SYS_sched_rr_get_interval_time64 SYS_sched_rr_get_interval
+#define SYS_getrusage_time64 SYS_getrusage
+#define SYS_wait4_time64 SYS_wait4
#define IPC_64 0