internally, define time64 rusage syscalls on x32 as the existing ones

this is analogous to commit 40aa18d55a.
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.
This commit is contained in:
Rich Felker 2019-10-19 21:25:23 -04:00
parent c2518a8efb
commit 7e81711431
1 changed files with 2 additions and 0 deletions

View File

@ -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