^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) #!/bin/sh
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) # SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) # Check if current architecture are missing any function calls compared
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) # to i386.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) # i386 define a number of legacy system calls that are i386 specific
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) # and listed below so they are ignored.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) # Usage:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) # checksyscalls.sh gcc gcc-options
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) ignore_list() {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) cat << EOF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #include <asm/types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #include <asm/unistd.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) /* *at */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #define __IGNORE_open /* openat */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #define __IGNORE_link /* linkat */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #define __IGNORE_unlink /* unlinkat */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #define __IGNORE_mknod /* mknodat */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #define __IGNORE_chmod /* fchmodat */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #define __IGNORE_chown /* fchownat */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #define __IGNORE_mkdir /* mkdirat */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) #define __IGNORE_rmdir /* unlinkat */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) #define __IGNORE_lchown /* fchownat */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) #define __IGNORE_access /* faccessat */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) #define __IGNORE_rename /* renameat2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) #define __IGNORE_readlink /* readlinkat */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) #define __IGNORE_symlink /* symlinkat */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) #define __IGNORE_utimes /* futimesat */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) #define __IGNORE_stat /* fstatat */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) #define __IGNORE_lstat /* fstatat */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) #define __IGNORE_stat64 /* fstatat64 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) #define __IGNORE_lstat64 /* fstatat64 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) #ifndef __ARCH_WANT_SET_GET_RLIMIT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) #define __IGNORE_getrlimit /* getrlimit */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) #define __IGNORE_setrlimit /* setrlimit */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) /* Missing flags argument */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) #define __IGNORE_renameat /* renameat2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) /* CLOEXEC flag */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) #define __IGNORE_pipe /* pipe2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) #define __IGNORE_dup2 /* dup3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) #define __IGNORE_epoll_create /* epoll_create1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) #define __IGNORE_inotify_init /* inotify_init1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) #define __IGNORE_eventfd /* eventfd2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) #define __IGNORE_signalfd /* signalfd4 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) /* MMU */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) #ifndef CONFIG_MMU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) #define __IGNORE_madvise
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) #define __IGNORE_mbind
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) #define __IGNORE_mincore
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) #define __IGNORE_mlock
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) #define __IGNORE_mlockall
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) #define __IGNORE_munlock
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) #define __IGNORE_munlockall
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) #define __IGNORE_mprotect
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) #define __IGNORE_msync
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) #define __IGNORE_migrate_pages
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) #define __IGNORE_move_pages
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) #define __IGNORE_remap_file_pages
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) #define __IGNORE_get_mempolicy
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) #define __IGNORE_set_mempolicy
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) #define __IGNORE_swapoff
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) #define __IGNORE_swapon
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) /* System calls for 32-bit kernels only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) #if BITS_PER_LONG == 64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) #define __IGNORE_sendfile64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) #define __IGNORE_ftruncate64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) #define __IGNORE_truncate64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) #define __IGNORE_stat64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) #define __IGNORE_lstat64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) #define __IGNORE_fstat64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) #define __IGNORE_fcntl64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) #define __IGNORE_fadvise64_64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) #define __IGNORE_fstatat64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) #define __IGNORE_fstatfs64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) #define __IGNORE_statfs64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) #define __IGNORE_llseek
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) #define __IGNORE_mmap2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) #define __IGNORE_clock_gettime64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) #define __IGNORE_clock_settime64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) #define __IGNORE_clock_adjtime64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) #define __IGNORE_clock_getres_time64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) #define __IGNORE_clock_nanosleep_time64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) #define __IGNORE_timer_gettime64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) #define __IGNORE_timer_settime64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) #define __IGNORE_timerfd_gettime64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) #define __IGNORE_timerfd_settime64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) #define __IGNORE_utimensat_time64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) #define __IGNORE_pselect6_time64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) #define __IGNORE_ppoll_time64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) #define __IGNORE_io_pgetevents_time64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) #define __IGNORE_recvmmsg_time64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) #define __IGNORE_mq_timedsend_time64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) #define __IGNORE_mq_timedreceive_time64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) #define __IGNORE_semtimedop_time64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) #define __IGNORE_rt_sigtimedwait_time64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) #define __IGNORE_futex_time64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) #define __IGNORE_sched_rr_get_interval_time64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) #define __IGNORE_sendfile
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) #define __IGNORE_ftruncate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) #define __IGNORE_truncate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) #define __IGNORE_stat
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) #define __IGNORE_lstat
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) #define __IGNORE_fstat
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) #define __IGNORE_fcntl
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) #define __IGNORE_fadvise64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) #define __IGNORE_newfstatat
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) #define __IGNORE_fstatfs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) #define __IGNORE_statfs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) #define __IGNORE_lseek
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) #define __IGNORE_mmap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) #define __IGNORE_clock_gettime
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) #define __IGNORE_clock_settime
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) #define __IGNORE_clock_adjtime
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) #define __IGNORE_clock_getres
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) #define __IGNORE_clock_nanosleep
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) #define __IGNORE_timer_gettime
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) #define __IGNORE_timer_settime
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) #define __IGNORE_timerfd_gettime
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) #define __IGNORE_timerfd_settime
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) #define __IGNORE_utimensat
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) #define __IGNORE_pselect6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) #define __IGNORE_ppoll
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) #define __IGNORE_io_pgetevents
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) #define __IGNORE_recvmmsg
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) #define __IGNORE_mq_timedsend
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) #define __IGNORE_mq_timedreceive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) #define __IGNORE_semtimedop
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) #define __IGNORE_rt_sigtimedwait
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) #define __IGNORE_futex
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) #define __IGNORE_sched_rr_get_interval
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) #define __IGNORE_gettimeofday
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) #define __IGNORE_settimeofday
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) #define __IGNORE_wait4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) #define __IGNORE_adjtimex
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) #define __IGNORE_nanosleep
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) #define __IGNORE_io_getevents
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) #define __IGNORE_recvmmsg
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) /* i386-specific or historical system calls */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) #define __IGNORE_break
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) #define __IGNORE_stty
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) #define __IGNORE_gtty
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) #define __IGNORE_ftime
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) #define __IGNORE_prof
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) #define __IGNORE_lock
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) #define __IGNORE_mpx
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) #define __IGNORE_ulimit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) #define __IGNORE_profil
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) #define __IGNORE_ioperm
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) #define __IGNORE_iopl
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) #define __IGNORE_idle
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) #define __IGNORE_modify_ldt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) #define __IGNORE_ugetrlimit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) #define __IGNORE_vm86
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) #define __IGNORE_vm86old
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) #define __IGNORE_set_thread_area
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) #define __IGNORE_get_thread_area
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) #define __IGNORE_madvise1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) #define __IGNORE_oldstat
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) #define __IGNORE_oldfstat
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) #define __IGNORE_oldlstat
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) #define __IGNORE_oldolduname
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) #define __IGNORE_olduname
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) #define __IGNORE_umount
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) #define __IGNORE_waitpid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) #define __IGNORE_stime
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) #define __IGNORE_nice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) #define __IGNORE_signal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) #define __IGNORE_sigaction
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) #define __IGNORE_sgetmask
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) #define __IGNORE_sigsuspend
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) #define __IGNORE_sigpending
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) #define __IGNORE_ssetmask
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) #define __IGNORE_readdir
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) #define __IGNORE_socketcall
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) #define __IGNORE_ipc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) #define __IGNORE_sigreturn
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) #define __IGNORE_sigprocmask
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) #define __IGNORE_bdflush
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) #define __IGNORE__llseek
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) #define __IGNORE__newselect
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) #define __IGNORE_create_module
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) #define __IGNORE_query_module
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) #define __IGNORE_get_kernel_syms
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) #define __IGNORE_sysfs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) #define __IGNORE_uselib
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) #define __IGNORE__sysctl
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) #define __IGNORE_arch_prctl
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) #define __IGNORE_nfsservctl
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) /* ... including the "new" 32-bit uid syscalls */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) #define __IGNORE_lchown32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) #define __IGNORE_getuid32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) #define __IGNORE_getgid32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) #define __IGNORE_geteuid32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) #define __IGNORE_getegid32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) #define __IGNORE_setreuid32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) #define __IGNORE_setregid32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) #define __IGNORE_getgroups32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) #define __IGNORE_setgroups32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) #define __IGNORE_fchown32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) #define __IGNORE_setresuid32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) #define __IGNORE_getresuid32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) #define __IGNORE_setresgid32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) #define __IGNORE_getresgid32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) #define __IGNORE_chown32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) #define __IGNORE_setuid32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) #define __IGNORE_setgid32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) #define __IGNORE_setfsuid32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) #define __IGNORE_setfsgid32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) /* these can be expressed using other calls */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) #define __IGNORE_alarm /* setitimer */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) #define __IGNORE_creat /* open */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) #define __IGNORE_fork /* clone */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) #define __IGNORE_futimesat /* utimensat */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) #define __IGNORE_getpgrp /* getpgid */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) #define __IGNORE_getdents /* getdents64 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) #define __IGNORE_pause /* sigsuspend */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) #define __IGNORE_poll /* ppoll */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) #define __IGNORE_select /* pselect6 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) #define __IGNORE_epoll_wait /* epoll_pwait */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) #define __IGNORE_time /* gettimeofday */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) #define __IGNORE_uname /* newuname */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) #define __IGNORE_ustat /* statfs */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) #define __IGNORE_utime /* utimes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) #define __IGNORE_vfork /* clone */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) /* sync_file_range had a stupid ABI. Allow sync_file_range2 instead */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) #ifdef __NR_sync_file_range2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) #define __IGNORE_sync_file_range
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) /* Unmerged syscalls for AFS, STREAMS, etc. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) #define __IGNORE_afs_syscall
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) #define __IGNORE_getpmsg
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) #define __IGNORE_putpmsg
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) #define __IGNORE_vserver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) EOF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) syscall_list() {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) grep '^[0-9]' "$1" | sort -n |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) while read nr abi name entry ; do
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) echo "#if !defined(__NR_${name}) && !defined(__IGNORE_${name})"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) echo "#warning syscall ${name} not implemented"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) echo "#endif"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) done
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) (ignore_list && syscall_list $(dirname $0)/../arch/x86/entry/syscalls/syscall_32.tbl) | \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) $* -E -x c - > /dev/null