From: Rich Felker Date: Sun, 20 Oct 2019 01:25:23 +0000 (-0400) Subject: internally, define time64 rusage syscalls on x32 as the existing ones X-Git-Tag: v1.2.0~89 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7e8171143124f7f510db555dc6f6327a965a3e84;p=oweals%2Fmusl.git 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. --- diff --git a/arch/x32/syscall_arch.h b/arch/x32/syscall_arch.h index e0a22160..e0111cc0 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