diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-04-29 05:35:34 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-04-29 05:35:34 -0700 |
commit | 2ad5d0845d80589d0adf86593bd36a7c71a521f8 (patch) | |
tree | 81bc0b7de7e0b93604944ed70e4125866547eb39 /sysdeps/unix/syscalls.list | |
parent | 9207e30d3f070712df6c4175547094be112454d2 (diff) | |
download | glibc-2ad5d0845d80589d0adf86593bd36a7c71a521f8.tar.gz glibc-2ad5d0845d80589d0adf86593bd36a7c71a521f8.tar.xz glibc-2ad5d0845d80589d0adf86593bd36a7c71a521f8.zip |
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.
Diffstat (limited to 'sysdeps/unix/syscalls.list')
-rw-r--r-- | sysdeps/unix/syscalls.list | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sysdeps/unix/syscalls.list b/sysdeps/unix/syscalls.list index e8f8718b04..766d1664aa 100644 --- a/sysdeps/unix/syscalls.list +++ b/sysdeps/unix/syscalls.list @@ -37,16 +37,16 @@ kill - kill i:ii __kill kill link - link i:ss __link link listen - listen i:ii __listen listen lseek - lseek i:iii __libc_lseek __lseek lseek -madvise - madvise i:pii __madvise madvise +madvise - madvise i:pUi __madvise madvise mkdir - mkdir i:si __mkdir mkdir mmap - mmap b:aniiii __mmap mmap -mprotect - mprotect i:aii __mprotect mprotect -munmap - munmap i:ai __munmap munmap +mprotect - mprotect i:aUi __mprotect mprotect +munmap - munmap i:aU __munmap munmap open - open Ci:siv __libc_open __open open profil - profil i:piii __profil profil ptrace - ptrace i:iiii ptrace read - read Ci:ibn __libc_read __read read -readlink - readlink i:spi __readlink readlink +readlink - readlink i:spU __readlink readlink readv - readv Ci:ipi __readv readv reboot - reboot i:i reboot recv - recv Ci:ibni __libc_recv recv |