mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-30 00:31:08 +00:00
e0043e17df
The personality system call, starting with linux kernel commit v2.6.29-6609-g11d06b2a1e5658f448a308aa3beb97bacd64a940, always successfully changes the personality if requested. The syscall wrapper, however, still can return an error in the following cases: - the value returned by the system call looks like an error due to architecture limitations of 32-bit kernels; - a personality greater than 0xffffffff is passed to the system call, and the 64-bit kernel does not have commit v2.6.35-rc1-372-g485d527686850d68a0e9006dd9904f19f122485e that would truncate this value to unsigned int; - on sparc64, the value returned by the system call looks like an error due to sparc64 kernel sign extension bug. The solution is three-fold: - move generic syscalls.list personality entry to generic 64-bit syscalls.list file; - for each 32-bit architecture that use negated errno semantics, add a NOERRNO personality entry to their syscalls.list file; - for sparc64 and 32-bit architectures that use dedicated registers to flag syscall errors, add a wrapper around personality syscall; if the system call return value is flagged as an error, this wrapper returns the negated "would be errno" value, otherwise it returns the system call return value; on sparc64, it also truncates the personality argument to unsigned int before passing it to the kernel. [BZ #19408] * sysdeps/unix/sysv/linux/personality.c: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/personality.c: Likewise. * sysdeps/unix/sysv/linux/tst-personality.c: Likewise. * sysdeps/unix/sysv/linux/Makefile [$(subdir) == misc] (sysdep_routines): Add personality. (tests): Add tst-personality. * sysdeps/unix/sysv/linux/syscalls.list (personality): Move ... * sysdeps/unix/sysv/linux/wordsize-64/syscalls.list: ... here. * sysdeps/unix/sysv/linux/arm/syscalls.list (personality): New entry. * sysdeps/unix/sysv/linux/hppa/syscalls.list (personality): Likewise. * sysdeps/unix/sysv/linux/i386/syscalls.list (personality): Likewise. * sysdeps/unix/sysv/linux/m68k/syscalls.list (personality): Likewise. * sysdeps/unix/sysv/linux/microblaze/syscalls.list (personality): Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list (personality): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list (personality): Likewise. * sysdeps/unix/sysv/linux/sh/syscalls.list (personality): Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list (personality): Likewise.
125 lines
5.3 KiB
Plaintext
125 lines
5.3 KiB
Plaintext
# File name Caller Syscall name Args Strong name Weak names
|
|
|
|
adjtimex adjtime adjtimex i:p __adjtimex adjtimex ntp_adjtime
|
|
alarm - alarm i:i alarm
|
|
bdflush EXTRA bdflush i:ii __compat_bdflush bdflush@GLIBC_2.0:GLIBC_2.23
|
|
capget EXTRA capget i:pp capget
|
|
capset EXTRA capset i:pp capset
|
|
clock_adjtime EXTRA clock_adjtime i:ip clock_adjtime
|
|
creat - creat Ci:si creat
|
|
create_module EXTRA create_module 3 __compat_create_module create_module@GLIBC_2.0:GLIBC_2.23
|
|
delete_module EXTRA delete_module 3 delete_module
|
|
epoll_create EXTRA epoll_create i:i epoll_create
|
|
epoll_create1 EXTRA epoll_create1 i:i epoll_create1
|
|
epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl
|
|
epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait
|
|
execve - execve i:spp __execve execve
|
|
fdatasync - fdatasync Ci:i fdatasync
|
|
flock - flock i:ii __flock flock
|
|
get_kernel_syms EXTRA get_kernel_syms i:p __compat_get_kernel_syms get_kernel_syms@GLIBC_2.0:GLIBC_2.23
|
|
getegid - getegid Ei: __getegid getegid
|
|
geteuid - geteuid Ei: __geteuid geteuid
|
|
getpgid - getpgid i:i __getpgid getpgid
|
|
getpgrp - getpgrp Ei: getpgrp
|
|
getpmsg - getpmsg i:ipppp getpmsg
|
|
getppid - getppid Ei: __getppid getppid
|
|
getresuid - getresuid i:ppp getresuid
|
|
getresgid - getresgid i:ppp getresgid
|
|
getrlimit - ugetrlimit i:ip __new_getrlimit __getrlimit getrlimit@@GLIBC_2.2
|
|
getsid - getsid i:i getsid
|
|
init_module EXTRA init_module 5 init_module
|
|
inotify_add_watch EXTRA inotify_add_watch i:isi inotify_add_watch
|
|
inotify_init EXTRA inotify_init i: inotify_init
|
|
inotify_init1 EXTRA inotify_init1 i:I inotify_init1
|
|
inotify_rm_watch EXTRA inotify_rm_watch i:ii inotify_rm_watch
|
|
ioperm - ioperm i:iii ioperm
|
|
iopl - iopl i:i iopl
|
|
klogctl EXTRA syslog i:isi klogctl
|
|
lchown - lchown i:sii __lchown lchown
|
|
mincore - mincore i:anV mincore
|
|
mlock - mlock i:bn mlock
|
|
mlockall - mlockall i:i mlockall
|
|
mount EXTRA mount i:sssip __mount mount
|
|
mremap EXTRA mremap b:ainip __mremap mremap
|
|
munlock - munlock i:ai munlock
|
|
munlockall - munlockall i: munlockall
|
|
nanosleep - nanosleep Ci:pp __nanosleep nanosleep
|
|
nfsservctl EXTRA nfsservctl i:ipp nfsservctl
|
|
pause - pause Ci: __libc_pause pause
|
|
pipe - pipe i:f __pipe pipe
|
|
pipe2 - pipe2 i:fi __pipe2 pipe2
|
|
pivot_root EXTRA pivot_root i:ss pivot_root
|
|
poll - poll Ci:pii __libc_poll __poll poll
|
|
prctl EXTRA prctl i:iiiii __prctl prctl
|
|
putpmsg - putpmsg i:ippii putpmsg
|
|
query_module EXTRA query_module i:sipip __compat_query_module query_module@GLIBC_2.0:GLIBC_2.23
|
|
quotactl EXTRA quotactl i:isip quotactl
|
|
remap_file_pages - remap_file_pages i:piiii __remap_file_pages remap_file_pages
|
|
sched_getp - sched_getparam i:ip __sched_getparam sched_getparam
|
|
sched_gets - sched_getscheduler i:i __sched_getscheduler sched_getscheduler
|
|
sched_primax - sched_get_priority_max i:i __sched_get_priority_max sched_get_priority_max
|
|
sched_primin - sched_get_priority_min i:i __sched_get_priority_min sched_get_priority_min
|
|
sched_rr_gi - sched_rr_get_interval i:ip __sched_rr_get_interval sched_rr_get_interval
|
|
sched_setp - sched_setparam i:ip __sched_setparam sched_setparam
|
|
sched_sets - sched_setscheduler i:iip __sched_setscheduler sched_setscheduler
|
|
sched_yield - sched_yield i: __sched_yield sched_yield
|
|
select - _newselect Ci:iPPPP __select __libc_select select
|
|
sendfile - sendfile i:iipi sendfile
|
|
sendfile64 - sendfile64 i:iipi sendfile64
|
|
setfsgid EXTRA setfsgid i:i setfsgid
|
|
setfsuid EXTRA setfsuid i:i setfsuid
|
|
setpgid - setpgid i:ii __setpgid setpgid
|
|
sigaltstack - sigaltstack i:PP __sigaltstack sigaltstack
|
|
splice EXTRA splice Ci:iPiPii splice
|
|
stime - stime i:p stime
|
|
sysinfo EXTRA sysinfo i:p __sysinfo sysinfo
|
|
swapon - swapon i:si __swapon swapon
|
|
swapoff - swapoff i:s __swapoff swapoff
|
|
tee EXTRA tee Ci:iiii tee
|
|
unshare EXTRA unshare i:i unshare
|
|
uselib EXTRA uselib i:s __compat_uselib uselib@GLIBC_2.0:GLIBC_2.23
|
|
utime - utime i:sP utime
|
|
vmsplice EXTRA vmsplice Ci:iPii vmsplice
|
|
wait4 - wait4 i:iWiP __wait4 wait4
|
|
|
|
chown - chown i:sii __libc_chown __chown chown
|
|
|
|
fchownat - fchownat i:isiii fchownat
|
|
linkat - linkat i:isisi linkat
|
|
mkdirat - mkdirat i:isi mkdirat
|
|
readlinkat - readlinkat i:issi readlinkat
|
|
renameat - renameat i:isis renameat
|
|
symlinkat - symlinkat i:sis symlinkat
|
|
unlinkat - unlinkat i:isi unlinkat
|
|
|
|
setxattr - setxattr i:sspii setxattr
|
|
lsetxattr - lsetxattr i:sspii lsetxattr
|
|
fsetxattr - fsetxattr i:ispii fsetxattr
|
|
getxattr - getxattr i:sspi getxattr
|
|
lgetxattr - lgetxattr i:sspi lgetxattr
|
|
fgetxattr - fgetxattr i:ispi fgetxattr
|
|
listxattr - listxattr i:ssi listxattr
|
|
llistxattr - llistxattr i:ssi llistxattr
|
|
flistxattr - flistxattr i:isi flistxattr
|
|
removexattr - removexattr i:ss removexattr
|
|
lremovexattr - lremovexattr i:ss lremovexattr
|
|
fremovexattr - fremovexattr i:is fremovexattr
|
|
|
|
mq_timedsend - mq_timedsend Ci:ipiip __mq_timedsend mq_timedsend
|
|
mq_timedreceive - mq_timedreceive Ci:ipipp __mq_timedreceive mq_timedreceive
|
|
mq_setattr - mq_getsetattr i:ipp mq_setattr
|
|
|
|
timerfd_create EXTRA timerfd_create i:ii timerfd_create
|
|
timerfd_settime EXTRA timerfd_settime i:iipp timerfd_settime
|
|
timerfd_gettime EXTRA timerfd_gettime i:ip timerfd_gettime
|
|
|
|
fanotify_init EXTRA fanotify_init i:ii fanotify_init
|
|
|
|
name_to_handle_at EXTRA name_to_handle_at i:isppi name_to_handle_at
|
|
open_by_handle_at EXTRA open_by_handle_at Ci:ipi open_by_handle_at
|
|
|
|
setns EXTRA setns i:ii setns
|
|
|
|
process_vm_readv EXTRA process_vm_readv i:ipipii process_vm_readv
|
|
process_vm_writev EXTRA process_vm_writev i:ipipii process_vm_writev
|