glibc/sysdeps/unix
H.J. Lu 6bd82f5fd0 Add SYSCALL_ULONG_ARG_[12] to pass long to syscall [BZ #25810]
X32 has 32-bit long and pointer with 64-bit off_t.  Since x32 psABI
requires that pointers passed in registers must be zero-extended to
64bit, x32 can share many syscall interfaces with LP64.  When a LP64
syscall with long and unsigned long int arguments is used for x32, these
arguments must be properly extended to 64-bit.  Otherwise if the upper
32 bits of the register have undefined value, such a syscall will be
rejected by kernel.

For syscalls implemented in assembly codes, 'U' is added to syscall
signature key letters for unsigned long, which is zero-extended to
64-bit types.  SYSCALL_ULONG_ARG_1 and SYSCALL_ULONG_ARG_2 are passed
to syscall-template.S for the first and the second unsigned long int
arguments if PSEUDOS_HAVE_ULONG_INDICES is defined.  They are used by
x32 to zero-extend 32-bit arguments to 64 bits.

Tested on i386, x86-64 and x32 as well as with build-many-glibcs.py.

(cherry picked from commit 2ad5d0845d)
2020-05-07 05:12:27 -07:00
..
alpha alpha: force old OSF1 syscalls for getegid, geteuid and getppid [BZ #24986] 2019-09-14 20:08:02 +02:00
arm
bsd
i386
inet Remove obsolete, never-implemented XSI STREAMS declarations 2019-03-14 15:44:15 +01:00
mips
powerpc
sh
sysv/linux Add SYSCALL_ULONG_ARG_[12] to pass long to syscall [BZ #25810] 2020-05-07 05:12:27 -07:00
x86_64
Implies
Makefile
clock_gettime.c nptl: Remove pthread_clock_gettime pthread_clock_settime 2019-03-22 15:37:43 -03:00
clock_nanosleep.c nptl: Remove pthread_clock_gettime pthread_clock_settime 2019-03-22 15:37:43 -03:00
clock_settime.c nptl: Remove pthread_clock_gettime pthread_clock_settime 2019-03-22 15:37:43 -03:00
confstr.h
get_child_max.c
getlogin.c
getlogin_r.c login: Remove utmp backend jump tables [BZ #23518] 2020-01-17 13:54:07 +01:00
getpagesize.c
grantpt.c Break more lines before not after operators. 2019-02-25 13:19:19 +00:00
ifreq.c
make-syscalls.sh Add SYSCALL_ULONG_ARG_[12] to pass long to syscall [BZ #25810] 2020-05-07 05:12:27 -07:00
pt-fcntl.c
s-proto-cancel.S
s-proto.S
setxid.h
sockatmark.c Fix a few typos in comments 2019-01-12 13:44:51 +00:00
stime.c
syscall-template.S Add SYSCALL_ULONG_ARG_[12] to pass long to syscall [BZ #25810] 2020-05-07 05:12:27 -07:00
syscall.S
syscalls.list Add SYSCALL_ULONG_ARG_[12] to pass long to syscall [BZ #25810] 2020-05-07 05:12:27 -07:00
sysdep.h Add single-thread.h header 2019-05-14 08:41:15 -03:00