1999-02-19 03:21:36 +03:00
/*
* Copyright ( c ) 1993 Branko Lankester < branko @ hacktic . nl >
* Copyright ( c ) 1993 , 1994 , 1995 Rick Sladkey < jrs @ world . std . com >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions
* are met :
* 1. Redistributions of source code must retain the above copyright
* notice , this list of conditions and the following disclaimer .
* 2. Redistributions in binary form must reproduce the above copyright
* notice , this list of conditions and the following disclaimer in the
* documentation and / or other materials provided with the distribution .
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission .
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ` ` AS IS ' ' AND ANY EXPRESS OR
* IMPLIED WARRANTIES , INCLUDING , BUT NOT LIMITED TO , THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED .
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT , INDIRECT ,
* INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT
* NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE ,
* DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT
* ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE .
*/
# include "dummy.h"
2011-11-29 03:41:58 +04:00
/* common syscalls */
1999-02-19 03:21:36 +03:00
2011-11-29 03:41:58 +04:00
int sys_accept ( ) ;
int sys_accept4 ( ) ;
int sys_access ( ) ;
2014-02-06 02:41:45 +04:00
int sys_add_key ( ) ;
2011-11-29 03:41:58 +04:00
int sys_adjtimex ( ) ;
int sys_arch_prctl ( ) ;
int sys_bind ( ) ;
int sys_brk ( ) ;
int sys_capget ( ) ;
int sys_capset ( ) ;
2011-11-29 03:25:13 +04:00
int sys_chdir ( ) ;
int sys_chmod ( ) ;
int sys_chown ( ) ;
2012-03-12 01:25:51 +04:00
int sys_clock_adjtime ( ) ;
2011-11-29 03:41:58 +04:00
int sys_clock_gettime ( ) ;
int sys_clock_nanosleep ( ) ;
int sys_clock_settime ( ) ;
int sys_clone ( ) ;
int sys_close ( ) ;
int sys_connect ( ) ;
int sys_creat ( ) ;
int sys_create_module ( ) ;
2014-06-04 07:00:41 +04:00
int sys_delete_module ( ) ;
int sys_dup ( ) ;
2011-11-29 03:41:58 +04:00
int sys_dup2 ( ) ;
int sys_dup3 ( ) ;
int sys_epoll_create ( ) ;
int sys_epoll_create1 ( ) ;
int sys_epoll_ctl ( ) ;
int sys_epoll_pwait ( ) ;
int sys_epoll_wait ( ) ;
int sys_eventfd ( ) ;
int sys_eventfd2 ( ) ;
int sys_execve ( ) ;
int sys_exit ( ) ;
int sys_faccessat ( ) ;
int sys_fadvise64 ( ) ;
int sys_fadvise64_64 ( ) ;
int sys_fallocate ( ) ;
2014-02-05 08:13:18 +04:00
int sys_fanotify_init ( ) ;
int sys_fanotify_mark ( ) ;
2011-11-29 03:41:58 +04:00
int sys_fchmod ( ) ;
int sys_fchmodat ( ) ;
int sys_fchown ( ) ;
int sys_fchownat ( ) ;
int sys_fcntl ( ) ;
int sys_fgetxattr ( ) ;
2014-02-05 20:17:02 +04:00
int sys_finit_module ( ) ;
2011-11-29 03:41:58 +04:00
int sys_flistxattr ( ) ;
int sys_flock ( ) ;
int sys_fork ( ) ;
int sys_fremovexattr ( ) ;
int sys_fsetxattr ( ) ;
int sys_fstat ( ) ;
int sys_fstat64 ( ) ;
int sys_fstatfs ( ) ;
int sys_fstatfs64 ( ) ;
int sys_ftruncate ( ) ;
int sys_ftruncate64 ( ) ;
int sys_futex ( ) ;
int sys_futimesat ( ) ;
int sys_get_mempolicy ( ) ;
2012-03-12 02:32:26 +04:00
int sys_get_robust_list ( ) ;
2011-11-29 03:41:58 +04:00
int sys_get_thread_area ( ) ;
int sys_getcpu ( ) ;
int sys_getcwd ( ) ;
int sys_getdents ( ) ;
int sys_getdents64 ( ) ;
int sys_getdtablesize ( ) ;
int sys_getgroups ( ) ;
int sys_gethostname ( ) ;
int sys_getitimer ( ) ;
2013-03-05 19:17:46 +04:00
int sys_getpmsg ( ) ; /* TODO: non-Linux, remove? */
2011-11-29 03:41:58 +04:00
int sys_getpriority ( ) ;
2015-02-04 19:38:09 +03:00
int sys_getrandom ( ) ;
2011-11-29 03:41:58 +04:00
int sys_getresuid ( ) ;
2011-11-29 03:25:13 +04:00
int sys_getrlimit ( ) ;
int sys_getrusage ( ) ;
2011-11-29 03:41:58 +04:00
int sys_getsockname ( ) ;
int sys_getsockopt ( ) ;
2011-11-29 03:25:13 +04:00
int sys_gettimeofday ( ) ;
2011-11-29 03:41:58 +04:00
int sys_getuid ( ) ;
int sys_getxattr ( ) ;
int sys_init_module ( ) ;
int sys_inotify_add_watch ( ) ;
int sys_inotify_init1 ( ) ;
int sys_inotify_rm_watch ( ) ;
int sys_io_cancel ( ) ;
int sys_io_destroy ( ) ;
int sys_io_getevents ( ) ;
int sys_io_setup ( ) ;
int sys_io_submit ( ) ;
int sys_ioctl ( ) ;
2014-02-05 21:27:43 +04:00
int sys_ioprio_get ( ) ;
int sys_ioprio_set ( ) ;
2012-02-20 21:02:38 +04:00
int sys_ipc ( ) ;
2014-02-06 02:41:45 +04:00
int sys_keyctl ( ) ;
2014-02-05 17:48:26 +04:00
int sys_kexec_load ( ) ;
2011-11-29 03:41:58 +04:00
int sys_kill ( ) ;
int sys_link ( ) ;
int sys_linkat ( ) ;
int sys_listen ( ) ;
int sys_listxattr ( ) ;
int sys_llseek ( ) ;
int sys_lseek ( ) ;
int sys_madvise ( ) ;
int sys_mbind ( ) ;
2012-03-12 02:44:14 +04:00
int sys_migrate_pages ( ) ;
2011-11-29 03:41:58 +04:00
int sys_mincore ( ) ;
int sys_mknod ( ) ;
int sys_mknodat ( ) ;
int sys_mlockall ( ) ;
int sys_mmap ( ) ;
Clean up mmap decoding
Previous code merges too many similar, but different ways
of decoding mmap. For example, sys_old_mmap is "params in memory"
API... except SH[64], where it is "params in regs",
i.e. what sys_mmap ("new mmap") function does on other arches!
It's much simpler when every mmap handler has same API regardless
of arch. Where API means whether params are in regs or in memory,
and whether offset is in bytes, pages, or 4k blocks.
Then we just insert correct function pointers into
arch syscall tables.
It turns out there are four common mmap APIs over
all architectures which exist in Linux kernel,
and one outlier for S390.
A number of mmap decoders were plain wrong in arch tables.
For example, BFIN has no old_mmap. It returns ENOSYS.
I checked kernel sources for all arches nad fixed the tables.
There was dead code for x86_64 for old_mmap:
x86_64 has no old_mmap.
* mem.c: Refactor mmap functions so that we have five mmap syscall
handlers, each with the fixed API (not varying by arch).
* pathtrace.c (pathtrace_match): Adjust sys_func == mmap_func checks.
* linux/syscall.h: Declare new mmap syscall handler functions.
* linux/arm/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/avr32/syscallent.h: mmap is sys_mmap_pgoff.
* linux/bfin/syscallent.h: old_mmap is ENOSYS, mmap2 is sys_mmap_pgoff.
* linux/hppa/syscallent.h: mmap2 is sys_mmap_4koff.
* linux/i386/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/ia64/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/m68k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/microblaze/syscallent.h: old_mmap is sys_mmap, mmap2 is sys_mmap_pgoff.
* linux/mips/syscallent.h: mmap is sys_mmap_4kgoff.
* linux/or1k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/powerpc/syscallent.h: mmap2 is sys_mmap_4kgoff.
* linux/s390/syscallent.h: mmap2 is sys_old_mmap_pgoff.
* linux/s390x/syscallent.h: mmap is sys_old_mmap and thus has 1 arg.
* linux/sh/syscallent.h: old_mmap2 is sys_mmap, mmap2 is sys_mmap_4koff.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent1.h: mmap is TD|TM.
* linux/tile/syscallent1.h: mmap2 is sys_mmap_4koff.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-19 14:28:20 +04:00
int sys_mmap_pgoff ( ) ;
int sys_mmap_4koff ( ) ;
2011-11-29 03:25:13 +04:00
int sys_modify_ldt ( ) ;
2011-11-29 03:41:58 +04:00
int sys_mount ( ) ;
int sys_move_pages ( ) ;
2011-11-29 03:25:13 +04:00
int sys_mprotect ( ) ;
2011-11-29 03:41:58 +04:00
int sys_mq_getsetattr ( ) ;
int sys_mq_notify ( ) ;
int sys_mq_open ( ) ;
int sys_mq_timedreceive ( ) ;
int sys_mq_timedsend ( ) ;
int sys_mremap ( ) ;
int sys_msgctl ( ) ;
int sys_msgget ( ) ;
int sys_msgrcv ( ) ;
int sys_msgsnd ( ) ;
2011-11-29 03:25:13 +04:00
int sys_msync ( ) ;
2011-11-29 03:41:58 +04:00
int sys_munmap ( ) ;
2011-11-29 03:25:13 +04:00
int sys_nanosleep ( ) ;
2011-11-29 03:41:58 +04:00
int sys_newfstatat ( ) ;
int sys_old_mmap ( ) ;
Clean up mmap decoding
Previous code merges too many similar, but different ways
of decoding mmap. For example, sys_old_mmap is "params in memory"
API... except SH[64], where it is "params in regs",
i.e. what sys_mmap ("new mmap") function does on other arches!
It's much simpler when every mmap handler has same API regardless
of arch. Where API means whether params are in regs or in memory,
and whether offset is in bytes, pages, or 4k blocks.
Then we just insert correct function pointers into
arch syscall tables.
It turns out there are four common mmap APIs over
all architectures which exist in Linux kernel,
and one outlier for S390.
A number of mmap decoders were plain wrong in arch tables.
For example, BFIN has no old_mmap. It returns ENOSYS.
I checked kernel sources for all arches nad fixed the tables.
There was dead code for x86_64 for old_mmap:
x86_64 has no old_mmap.
* mem.c: Refactor mmap functions so that we have five mmap syscall
handlers, each with the fixed API (not varying by arch).
* pathtrace.c (pathtrace_match): Adjust sys_func == mmap_func checks.
* linux/syscall.h: Declare new mmap syscall handler functions.
* linux/arm/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/avr32/syscallent.h: mmap is sys_mmap_pgoff.
* linux/bfin/syscallent.h: old_mmap is ENOSYS, mmap2 is sys_mmap_pgoff.
* linux/hppa/syscallent.h: mmap2 is sys_mmap_4koff.
* linux/i386/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/ia64/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/m68k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/microblaze/syscallent.h: old_mmap is sys_mmap, mmap2 is sys_mmap_pgoff.
* linux/mips/syscallent.h: mmap is sys_mmap_4kgoff.
* linux/or1k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/powerpc/syscallent.h: mmap2 is sys_mmap_4kgoff.
* linux/s390/syscallent.h: mmap2 is sys_old_mmap_pgoff.
* linux/s390x/syscallent.h: mmap is sys_old_mmap and thus has 1 arg.
* linux/sh/syscallent.h: old_mmap2 is sys_mmap, mmap2 is sys_mmap_4koff.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent1.h: mmap is TD|TM.
* linux/tile/syscallent1.h: mmap2 is sys_mmap_4koff.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-19 14:28:20 +04:00
int sys_old_mmap_pgoff ( ) ;
2011-11-29 03:41:58 +04:00
int sys_oldfstat ( ) ;
int sys_oldselect ( ) ;
int sys_oldstat ( ) ;
int sys_open ( ) ;
int sys_openat ( ) ;
2013-02-04 03:04:57 +04:00
int sys_perf_event_open ( ) ;
2011-11-29 03:41:58 +04:00
int sys_personality ( ) ;
int sys_pipe ( ) ;
int sys_pipe2 ( ) ;
int sys_poll ( ) ;
int sys_poll ( ) ;
int sys_ppoll ( ) ;
int sys_prctl ( ) ;
2011-11-29 03:25:13 +04:00
int sys_pread ( ) ;
int sys_preadv ( ) ;
Implement prlimit64 decoding, rewrite [gs]etrlimit decoding
* configure.ac: Remove AC_RLIM_T_IS_LONG_LONG call.
Define SIZEOF_RLIM_T.
* m4/long_long.m4 (AC_RLIM_T_IS_LONG_LONG): Remove.
* linux/dummy.h (sys_prlimit64): Remove.
* linux/syscall.h (sys_prlimit64): New prototype.
* resource.c (resources): Reindent, add RLIMIT_RTTIME.
(sprintrlim, print_rlimit32, sys_getrlimit, sys_setrlimit): Remove.
[HAVE_LONG_LONG_RLIM_T]: Remove dead code.
[_LFS64_LARGEFILE || HAVE_LONG_LONG_RLIM_T]: Likewise.
(sprint_rlim64, print_rlimit64, decode_rlimit64, sprint_rlim32,
print_rlimit32, decode_rlimit, sys_getrlimit, sys_setrlimit,
sys_prlimit64): New functions.
2012-03-16 23:05:21 +04:00
int sys_prlimit64 ( ) ;
2012-01-28 04:46:33 +04:00
int sys_process_vm_readv ( ) ;
2012-03-10 18:14:49 +04:00
int sys_process_vm_writev ( ) ;
Implement prlimit64 decoding, rewrite [gs]etrlimit decoding
* configure.ac: Remove AC_RLIM_T_IS_LONG_LONG call.
Define SIZEOF_RLIM_T.
* m4/long_long.m4 (AC_RLIM_T_IS_LONG_LONG): Remove.
* linux/dummy.h (sys_prlimit64): Remove.
* linux/syscall.h (sys_prlimit64): New prototype.
* resource.c (resources): Reindent, add RLIMIT_RTTIME.
(sprintrlim, print_rlimit32, sys_getrlimit, sys_setrlimit): Remove.
[HAVE_LONG_LONG_RLIM_T]: Remove dead code.
[_LFS64_LARGEFILE || HAVE_LONG_LONG_RLIM_T]: Likewise.
(sprint_rlim64, print_rlimit64, decode_rlimit64, sprint_rlim32,
print_rlimit32, decode_rlimit, sys_getrlimit, sys_setrlimit,
sys_prlimit64): New functions.
2012-03-16 23:05:21 +04:00
int sys_pselect6 ( ) ;
int sys_ptrace ( ) ;
2013-03-05 19:17:46 +04:00
int sys_putpmsg ( ) ; /* TODO: non-Linux, remove? */
2011-11-29 03:41:58 +04:00
int sys_pwrite ( ) ;
2011-11-29 03:25:13 +04:00
int sys_pwritev ( ) ;
2011-11-29 03:41:58 +04:00
int sys_query_module ( ) ;
int sys_quotactl ( ) ;
int sys_read ( ) ;
int sys_readahead ( ) ;
int sys_readdir ( ) ;
int sys_readlink ( ) ;
int sys_readlinkat ( ) ;
int sys_readv ( ) ;
int sys_reboot ( ) ;
int sys_recv ( ) ;
int sys_recvfrom ( ) ;
int sys_recvmmsg ( ) ;
int sys_recvmsg ( ) ;
int sys_remap_file_pages ( ) ;
int sys_removexattr ( ) ;
int sys_renameat ( ) ;
2014-08-14 12:05:41 +04:00
int sys_renameat2 ( ) ;
2014-02-06 02:41:45 +04:00
int sys_request_key ( ) ;
2011-11-29 03:41:58 +04:00
int sys_restart_syscall ( ) ;
2011-11-29 03:25:13 +04:00
int sys_rt_sigaction ( ) ;
int sys_rt_sigpending ( ) ;
2011-11-29 03:41:58 +04:00
int sys_rt_sigprocmask ( ) ;
2011-11-29 03:25:13 +04:00
int sys_rt_sigqueueinfo ( ) ;
2011-11-29 03:41:58 +04:00
int sys_rt_sigsuspend ( ) ;
2011-11-29 03:25:13 +04:00
int sys_rt_sigtimedwait ( ) ;
2012-03-13 19:51:13 +04:00
int sys_rt_tgsigqueueinfo ( ) ;
2011-11-29 03:41:58 +04:00
int sys_sched_get_priority_min ( ) ;
int sys_sched_getaffinity ( ) ;
int sys_sched_getparam ( ) ;
int sys_sched_getscheduler ( ) ;
2012-03-12 03:00:11 +04:00
int sys_sched_rr_get_interval ( ) ;
2011-11-29 03:41:58 +04:00
int sys_sched_setaffinity ( ) ;
int sys_sched_setparam ( ) ;
int sys_sched_setscheduler ( ) ;
2015-02-05 02:50:50 +03:00
int sys_seccomp ( ) ;
2011-11-29 03:41:58 +04:00
int sys_select ( ) ;
int sys_semctl ( ) ;
int sys_semget ( ) ;
int sys_semop ( ) ;
int sys_semtimedop ( ) ;
int sys_send ( ) ;
2011-11-29 03:25:13 +04:00
int sys_sendfile ( ) ;
int sys_sendfile64 ( ) ;
2012-03-12 03:59:29 +04:00
int sys_sendmmsg ( ) ;
2011-11-29 03:41:58 +04:00
int sys_sendmsg ( ) ;
int sys_sendto ( ) ;
int sys_set_mempolicy ( ) ;
2011-11-29 03:25:13 +04:00
int sys_set_thread_area ( ) ;
2011-11-29 03:41:58 +04:00
int sys_setfsuid ( ) ;
int sys_setgroups ( ) ;
int sys_sethostname ( ) ;
int sys_setitimer ( ) ;
2014-05-13 20:46:04 +04:00
int sys_setns ( ) ;
2011-11-29 03:41:58 +04:00
int sys_setpriority ( ) ;
int sys_setresuid ( ) ;
int sys_setreuid ( ) ;
int sys_setrlimit ( ) ;
int sys_setsockopt ( ) ;
int sys_settimeofday ( ) ;
int sys_setuid ( ) ;
int sys_setxattr ( ) ;
int sys_shmat ( ) ;
int sys_shmctl ( ) ;
int sys_shmdt ( ) ;
int sys_shmget ( ) ;
int sys_shutdown ( ) ;
int sys_sigaction ( ) ;
int sys_sigaltstack ( ) ;
int sys_siggetmask ( ) ;
int sys_signal ( ) ;
int sys_signalfd ( ) ;
int sys_signalfd4 ( ) ;
int sys_sigpending ( ) ;
int sys_sigprocmask ( ) ;
int sys_sigreturn ( ) ;
int sys_sigsetmask ( ) ;
int sys_sigsuspend ( ) ;
int sys_socket ( ) ;
2012-02-20 21:02:38 +04:00
int sys_socketcall ( ) ;
2011-11-29 03:41:58 +04:00
int sys_socketpair ( ) ;
int sys_splice ( ) ;
int sys_stat ( ) ;
int sys_stat64 ( ) ;
int sys_statfs ( ) ;
int sys_statfs64 ( ) ;
2012-03-10 01:02:19 +04:00
int sys_swapon ( ) ;
2011-11-29 03:41:58 +04:00
int sys_symlinkat ( ) ;
2013-08-09 21:04:11 +04:00
int sys_sync_file_range ( ) ;
int sys_sync_file_range2 ( ) ;
2011-11-29 03:41:58 +04:00
int sys_sysctl ( ) ;
int sys_sysinfo ( ) ;
2012-03-13 19:28:01 +04:00
int sys_syslog ( ) ;
2011-11-29 03:41:58 +04:00
int sys_tee ( ) ;
int sys_tgkill ( ) ;
int sys_time ( ) ;
2011-11-29 03:25:13 +04:00
int sys_timer_create ( ) ;
int sys_timer_gettime ( ) ;
int sys_timer_settime ( ) ;
int sys_timerfd ( ) ;
int sys_timerfd_create ( ) ;
int sys_timerfd_gettime ( ) ;
2011-11-29 03:41:58 +04:00
int sys_timerfd_settime ( ) ;
int sys_times ( ) ;
int sys_truncate ( ) ;
int sys_truncate64 ( ) ;
int sys_umask ( ) ;
int sys_umount2 ( ) ;
int sys_uname ( ) ;
2006-10-13 Ulrich Drepper <drepper@redhat.com>
Bernhard Kaindl <bk@suse.de>
Dmitry V. Levin <ldv@altlinux.org>
Michael Holzheu <holzheu@de.ibm.com>
Add hooks for new syscalls. Add decoders for *at, inotify*,
pselect6, ppoll and unshare syscalls.
* defs.h: Declare print_sigset.
* desc.c (sys_pselect6): New function.
* file.c (decode_open, decode_access, decode_mkdir,
decode_readlink, decode_chmod, decode_utimes, decode_mknod):
New functions.
(sys_open, sys_access, sys_mkdir, sys_readlink, sys_chmod,
sys_utimes, sys_mknod): Use them.
[LINUX] (fstatatflags, unlinkatflags, inotify_modes): New
variables.
[LINUX] (print_dirfd, sys_openat, sys_faccessat,
sys_newfstatat, sys_mkdirat, sys_linkat, sys_unlinkat,
sys_symlinkat, sys_readlinkat, sys_renameat, sys_fchownat,
sys_fchmodat, sys_futimesat, sys_mknodat, sys_inotify_add_watch,
sys_inotify_rm_watch): New functions.
* process.c [LINUX] (sys_unshare): New function.
* signal.c (print_sigset): New function.
(sys_sigprocmask): Use it.
* stream.c (decode_poll): New function.
(sys_poll): Use it.
[LINUX] (sys_ppoll): New function.
* linux/syscall.h: Delcare new syscall handlers.
* linux/syscallent.h: Hook up new syscalls.
* linux/alpha/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
Fixes RH#178633.
2006-10-14 00:25:12 +04:00
int sys_unlinkat ( ) ;
int sys_unshare ( ) ;
2011-11-29 03:41:58 +04:00
int sys_utime ( ) ;
int sys_utimensat ( ) ;
int sys_utimes ( ) ;
2011-10-11 21:07:05 +04:00
int sys_vmsplice ( ) ;
2011-11-29 03:41:58 +04:00
int sys_wait4 ( ) ;
int sys_waitid ( ) ;
int sys_waitpid ( ) ;
int sys_write ( ) ;
int sys_writev ( ) ;
1999-02-19 03:21:36 +03:00
1999-11-18 20:12:55 +03:00
/* architecture-specific calls */
# ifdef ALPHA
2011-11-29 03:41:58 +04:00
int osf_statfs ( ) ;
int osf_fstatfs ( ) ;
1999-11-18 20:26:45 +03:00
int sys_osf_getitimer ( ) ;
int sys_osf_getrusage ( ) ;
2011-11-29 03:41:58 +04:00
int sys_osf_gettimeofday ( ) ;
int sys_osf_select ( ) ;
int sys_osf_setitimer ( ) ;
int sys_osf_settimeofday ( ) ;
1999-11-18 20:26:45 +03:00
int sys_osf_utimes ( ) ;
2011-11-29 03:41:58 +04:00
int sys_osf_wait4 ( ) ;
1999-11-18 20:12:55 +03:00
# endif
2011-11-29 03:41:58 +04:00
# if defined(ALPHA) || defined(IA64) || defined(SPARC) || defined(SPARC64)
2000-02-04 00:58:30 +03:00
int sys_getpagesize ( ) ;
# endif
1999-02-19 03:21:36 +03:00
2001-02-19 16:35:53 +03:00
# ifdef MIPS
2001-04-08 01:37:12 +04:00
int sys_sysmips ( ) ;
2001-02-19 16:35:53 +03:00
# endif
2010-12-01 16:27:07 +03:00
# if defined M68K || defined SH
1999-05-09 04:29:58 +04:00
int sys_cacheflush ( ) ;
# endif
2008-05-20 05:11:56 +04:00
2013-02-14 16:26:27 +04:00
# if defined OR1K
int sys_or1k_atomic ( ) ;
# endif
2008-08-25 07:09:16 +04:00
# ifdef POWERPC
int sys_subpage_prot ( ) ;
# endif
2008-11-11 01:21:41 +03:00
# ifdef BFIN
2010-09-11 23:04:18 +04:00
int sys_cacheflush ( ) ;
2011-11-29 03:41:58 +04:00
int sys_sram_alloc ( ) ;
2008-11-11 01:21:41 +03:00
# endif
2011-02-19 23:48:52 +03:00
# if defined SPARC || defined SPARC64
# include "sparc/syscall1.h"
int sys_execv ( ) ;
2011-11-29 03:25:13 +04:00
int sys_getmsg ( ) ;
int sys_putmsg ( ) ;
2011-02-19 23:48:52 +03:00
# endif
Fix decoding of 16-bit *chown and [gs]et*[gu]id syscalls
Define two sets of parsers on architectures that support (either
directly or via multiarch) 16-bit and 32-bit uid/gid syscalls
simultaneously. Since the code in these two sets is essentially
the same and the key difference between them is the size of uid_t,
implement it by parametrizing uid_t and names of parser functions.
* defs.h (NEED_UID16_PARSERS): New macro.
* linux/syscall.h [NEED_UID16_PARSERS] (sys_chown16, sys_fchown16,
sys_getresuid16, sys_getuid16, sys_setfsuid16, sys_setresuid16,
sys_setreuid16, sys_setuid16): New prototypes.
* linux/dummy.h (sys_geteuid16): Alias to sys_getuid16.
(sys_getegid16, sys_getgid16, sys_getresgid16, sys_setfsgid16,
sys_setgid16, sys_setregid16, sys_setresgid16): Alias to corresponding
sys_*uid16 functions.
* uid.c: Stop including <asm/posix_types.h>.
Parametrize uid_t and names of all exported functions.
(get_print_uid): New function.
(sys_getresuid): Use it.
(printuid): Check for (uid_t) -1.
* uid16.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* linux/arm/syscallent.h: Use sys_chown16, sys_fchown16, sys_getegid16,
sys_geteuid16, sys_getgid16, sys_getresgid16, sys_getresuid16,
sys_getuid16, sys_setfsgid16, sys_setfsuid16, sys_setgid16,
sys_setregid16, sys_setresgid16, sys_setresuid16, sys_setreuid16,
and sys_setuid16 parsers for *chown and [gs]et*[gu]id syscall entries.
* linux/bfin/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* tests/uid16.c: New file.
* tests/uid16.test: New test.
* tests/Makefile.am (CHECK_PROGRAMS): Add uid16.
(TESTS): Add uid16.test.
* tests/.gitignore: Add uid16.
2014-12-14 00:49:01 +03:00
# if NEED_UID16_PARSERS
int sys_chown16 ( ) ;
int sys_fchown16 ( ) ;
2014-12-14 16:30:54 +03:00
int sys_getgroups16 ( ) ;
Fix decoding of 16-bit *chown and [gs]et*[gu]id syscalls
Define two sets of parsers on architectures that support (either
directly or via multiarch) 16-bit and 32-bit uid/gid syscalls
simultaneously. Since the code in these two sets is essentially
the same and the key difference between them is the size of uid_t,
implement it by parametrizing uid_t and names of parser functions.
* defs.h (NEED_UID16_PARSERS): New macro.
* linux/syscall.h [NEED_UID16_PARSERS] (sys_chown16, sys_fchown16,
sys_getresuid16, sys_getuid16, sys_setfsuid16, sys_setresuid16,
sys_setreuid16, sys_setuid16): New prototypes.
* linux/dummy.h (sys_geteuid16): Alias to sys_getuid16.
(sys_getegid16, sys_getgid16, sys_getresgid16, sys_setfsgid16,
sys_setgid16, sys_setregid16, sys_setresgid16): Alias to corresponding
sys_*uid16 functions.
* uid.c: Stop including <asm/posix_types.h>.
Parametrize uid_t and names of all exported functions.
(get_print_uid): New function.
(sys_getresuid): Use it.
(printuid): Check for (uid_t) -1.
* uid16.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* linux/arm/syscallent.h: Use sys_chown16, sys_fchown16, sys_getegid16,
sys_geteuid16, sys_getgid16, sys_getresgid16, sys_getresuid16,
sys_getuid16, sys_setfsgid16, sys_setfsuid16, sys_setgid16,
sys_setregid16, sys_setresgid16, sys_setresuid16, sys_setreuid16,
and sys_setuid16 parsers for *chown and [gs]et*[gu]id syscall entries.
* linux/bfin/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* tests/uid16.c: New file.
* tests/uid16.test: New test.
* tests/Makefile.am (CHECK_PROGRAMS): Add uid16.
(TESTS): Add uid16.test.
* tests/.gitignore: Add uid16.
2014-12-14 00:49:01 +03:00
int sys_getresuid16 ( ) ;
int sys_getuid16 ( ) ;
int sys_setfsuid16 ( ) ;
2014-12-14 16:30:54 +03:00
int sys_setgroups16 ( ) ;
Fix decoding of 16-bit *chown and [gs]et*[gu]id syscalls
Define two sets of parsers on architectures that support (either
directly or via multiarch) 16-bit and 32-bit uid/gid syscalls
simultaneously. Since the code in these two sets is essentially
the same and the key difference between them is the size of uid_t,
implement it by parametrizing uid_t and names of parser functions.
* defs.h (NEED_UID16_PARSERS): New macro.
* linux/syscall.h [NEED_UID16_PARSERS] (sys_chown16, sys_fchown16,
sys_getresuid16, sys_getuid16, sys_setfsuid16, sys_setresuid16,
sys_setreuid16, sys_setuid16): New prototypes.
* linux/dummy.h (sys_geteuid16): Alias to sys_getuid16.
(sys_getegid16, sys_getgid16, sys_getresgid16, sys_setfsgid16,
sys_setgid16, sys_setregid16, sys_setresgid16): Alias to corresponding
sys_*uid16 functions.
* uid.c: Stop including <asm/posix_types.h>.
Parametrize uid_t and names of all exported functions.
(get_print_uid): New function.
(sys_getresuid): Use it.
(printuid): Check for (uid_t) -1.
* uid16.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* linux/arm/syscallent.h: Use sys_chown16, sys_fchown16, sys_getegid16,
sys_geteuid16, sys_getgid16, sys_getresgid16, sys_getresuid16,
sys_getuid16, sys_setfsgid16, sys_setfsuid16, sys_setgid16,
sys_setregid16, sys_setresgid16, sys_setresuid16, sys_setreuid16,
and sys_setuid16 parsers for *chown and [gs]et*[gu]id syscall entries.
* linux/bfin/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* tests/uid16.c: New file.
* tests/uid16.test: New test.
* tests/Makefile.am (CHECK_PROGRAMS): Add uid16.
(TESTS): Add uid16.test.
* tests/.gitignore: Add uid16.
2014-12-14 00:49:01 +03:00
int sys_setresuid16 ( ) ;
int sys_setreuid16 ( ) ;
int sys_setuid16 ( ) ;
# endif