Skip to content

Commit 4fe53bf

Browse files
committed
syscalls: add generic scripts/syscall.tbl
The asm-generic/unistd.h header still follows the old style of defining system call numbers and the table. Most architectures got the new syscall.tbl format as part of the y2038 conversion back in 2018, but the newer architectures that share a single table never did. I did a semi-automated conversion of the asm-generic/unistd.h contents into a syscall.tbl format, using the ABI field to take care of all the relevant differences that are encoded using #ifdef checks in the existing header. Conversion of the architectures is done one at a time in order to be able to review or revert them as needed. Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 22a40d1 commit 4fe53bf

File tree

1 file changed

+388
-0
lines changed

1 file changed

+388
-0
lines changed

scripts/syscall.tbl

Lines changed: 388 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,388 @@
1+
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
2+
#
3+
# This file contains the system call numbers for all of the
4+
# more recently added architectures.
5+
#
6+
# As a basic principle, no duplication of functionality
7+
# should be added, e.g. we don't use lseek when llseek
8+
# is present. New architectures should use this file
9+
# and implement the less feature-full calls in user space.
10+
#
11+
0 common io_setup sys_io_setup compat_sys_io_setup
12+
1 common io_destroy sys_io_destroy
13+
2 common io_submit sys_io_submit compat_sys_io_submit
14+
3 common io_cancel sys_io_cancel
15+
4 time32 io_getevents sys_io_getevents_time32
16+
4 64 io_getevents sys_io_getevents
17+
5 common setxattr sys_setxattr
18+
6 common lsetxattr sys_lsetxattr
19+
7 common fsetxattr sys_fsetxattr
20+
8 common getxattr sys_getxattr
21+
9 common lgetxattr sys_lgetxattr
22+
10 common fgetxattr sys_fgetxattr
23+
11 common listxattr sys_listxattr
24+
12 common llistxattr sys_llistxattr
25+
13 common flistxattr sys_flistxattr
26+
14 common removexattr sys_removexattr
27+
15 common lremovexattr sys_lremovexattr
28+
16 common fremovexattr sys_fremovexattr
29+
17 common getcwd sys_getcwd
30+
18 common lookup_dcookie sys_ni_syscall
31+
19 common eventfd2 sys_eventfd2
32+
20 common epoll_create1 sys_epoll_create1
33+
21 common epoll_ctl sys_epoll_ctl
34+
22 common epoll_pwait sys_epoll_pwait compat_sys_epoll_pwait
35+
23 common dup sys_dup
36+
24 common dup3 sys_dup3
37+
25 32 fcntl64 sys_fcntl64 compat_sys_fcntl64
38+
25 64 fcntl sys_fcntl
39+
26 common inotify_init1 sys_inotify_init1
40+
27 common inotify_add_watch sys_inotify_add_watch
41+
28 common inotify_rm_watch sys_inotify_rm_watch
42+
29 common ioctl sys_ioctl compat_sys_ioctl
43+
30 common ioprio_set sys_ioprio_set
44+
31 common ioprio_get sys_ioprio_get
45+
32 common flock sys_flock
46+
33 common mknodat sys_mknodat
47+
34 common mkdirat sys_mkdirat
48+
35 common unlinkat sys_unlinkat
49+
36 common symlinkat sys_symlinkat
50+
37 common linkat sys_linkat
51+
# renameat is superseded with flags by renameat2
52+
38 renameat renameat sys_renameat
53+
39 common umount2 sys_umount
54+
40 common mount sys_mount
55+
41 common pivot_root sys_pivot_root
56+
43 32 statfs64 sys_statfs64 compat_sys_statfs64
57+
43 64 statfs sys_statfs
58+
44 32 fstatfs64 sys_fstatfs64 compat_sys_fstatfs64
59+
44 64 fstatfs sys_fstatfs
60+
45 32 truncate64 sys_truncate64 compat_sys_truncate64
61+
45 64 truncate sys_truncate
62+
46 32 ftruncate64 sys_ftruncate64 compat_sys_ftruncate64
63+
46 64 ftruncate sys_ftruncate
64+
47 common fallocate sys_fallocate compat_sys_fallocate
65+
48 common faccessat sys_faccessat
66+
49 common chdir sys_chdir
67+
50 common fchdir sys_fchdir
68+
51 common chroot sys_chroot
69+
52 common fchmod sys_fchmod
70+
53 common fchmodat sys_fchmodat
71+
54 common fchownat sys_fchownat
72+
55 common fchown sys_fchown
73+
56 common openat sys_openat
74+
57 common close sys_close
75+
58 common vhangup sys_vhangup
76+
59 common pipe2 sys_pipe2
77+
60 common quotactl sys_quotactl
78+
61 common getdents64 sys_getdents64
79+
62 32 llseek sys_llseek
80+
62 64 lseek sys_lseek
81+
63 common read sys_read
82+
64 common write sys_write
83+
65 common readv sys_readv sys_readv
84+
66 common writev sys_writev sys_writev
85+
67 common pread64 sys_pread64 compat_sys_pread64
86+
68 common pwrite64 sys_pwrite64 compat_sys_pwrite64
87+
69 common preadv sys_preadv compat_sys_preadv
88+
70 common pwritev sys_pwritev compat_sys_pwritev
89+
71 32 sendfile64 sys_sendfile64
90+
71 64 sendfile sys_sendfile64
91+
72 time32 pselect6 sys_pselect6_time32 compat_sys_pselect6_time32
92+
72 64 pselect6 sys_pselect6
93+
73 time32 ppoll sys_ppoll_time32 compat_sys_ppoll_time32
94+
73 64 ppoll sys_ppoll
95+
74 common signalfd4 sys_signalfd4 compat_sys_signalfd4
96+
75 common vmsplice sys_vmsplice
97+
76 common splice sys_splice
98+
77 common tee sys_tee
99+
78 common readlinkat sys_readlinkat
100+
79 stat64 fstatat64 sys_fstatat64
101+
79 newstat fstatat sys_newfstatat
102+
80 stat64 fstat64 sys_fstat64
103+
80 newstat fstat sys_newfstat
104+
81 common sync sys_sync
105+
82 common fsync sys_fsync
106+
83 common fdatasync sys_fdatasync
107+
84 common sync_file_range sys_sync_file_range compat_sys_sync_file_range
108+
85 common timerfd_create sys_timerfd_create
109+
86 time32 timerfd_settime sys_timerfd_settime32
110+
86 64 timerfd_settime sys_timerfd_settime
111+
87 time32 timerfd_gettime sys_timerfd_gettime32
112+
87 64 timerfd_gettime sys_timerfd_gettime
113+
88 time32 utimensat sys_utimensat_time32
114+
88 64 utimensat sys_utimensat
115+
89 common acct sys_acct
116+
90 common capget sys_capget
117+
91 common capset sys_capset
118+
92 common personality sys_personality
119+
93 common exit sys_exit
120+
94 common exit_group sys_exit_group
121+
95 common waitid sys_waitid compat_sys_waitid
122+
96 common set_tid_address sys_set_tid_address
123+
97 common unshare sys_unshare
124+
98 time32 futex sys_futex_time32
125+
98 64 futex sys_futex
126+
99 common set_robust_list sys_set_robust_list compat_sys_set_robust_list
127+
100 common get_robust_list sys_get_robust_list compat_sys_get_robust_list
128+
101 time32 nanosleep sys_nanosleep_time32
129+
101 64 nanosleep sys_nanosleep
130+
102 common getitimer sys_getitimer compat_sys_getitimer
131+
103 common setitimer sys_setitimer compat_sys_setitimer
132+
104 common kexec_load sys_kexec_load compat_sys_kexec_load
133+
105 common init_module sys_init_module
134+
106 common delete_module sys_delete_module
135+
107 common timer_create sys_timer_create compat_sys_timer_create
136+
108 time32 timer_gettime sys_timer_gettime32
137+
108 64 timer_gettime sys_timer_gettime
138+
109 common timer_getoverrun sys_timer_getoverrun
139+
110 time32 timer_settime sys_timer_settime32
140+
110 64 timer_settime sys_timer_settime
141+
111 common timer_delete sys_timer_delete
142+
112 time32 clock_settime sys_clock_settime32
143+
112 64 clock_settime sys_clock_settime
144+
113 time32 clock_gettime sys_clock_gettime32
145+
113 64 clock_gettime sys_clock_gettime
146+
114 time32 clock_getres sys_clock_getres_time32
147+
114 64 clock_getres sys_clock_getres
148+
115 time32 clock_nanosleep sys_clock_nanosleep_time32
149+
115 64 clock_nanosleep sys_clock_nanosleep
150+
116 common syslog sys_syslog
151+
117 common ptrace sys_ptrace compat_sys_ptrace
152+
118 common sched_setparam sys_sched_setparam
153+
119 common sched_setscheduler sys_sched_setscheduler
154+
120 common sched_getscheduler sys_sched_getscheduler
155+
121 common sched_getparam sys_sched_getparam
156+
122 common sched_setaffinity sys_sched_setaffinity compat_sys_sched_setaffinity
157+
123 common sched_getaffinity sys_sched_getaffinity compat_sys_sched_getaffinity
158+
124 common sched_yield sys_sched_yield
159+
125 common sched_get_priority_max sys_sched_get_priority_max
160+
126 common sched_get_priority_min sys_sched_get_priority_min
161+
127 time32 sched_rr_get_interval sys_sched_rr_get_interval_time32
162+
127 64 sched_rr_get_interval sys_sched_rr_get_interval
163+
128 common restart_syscall sys_restart_syscall
164+
129 common kill sys_kill
165+
130 common tkill sys_tkill
166+
131 common tgkill sys_tgkill
167+
132 common sigaltstack sys_sigaltstack compat_sys_sigaltstack
168+
133 common rt_sigsuspend sys_rt_sigsuspend compat_sys_rt_sigsuspend
169+
134 common rt_sigaction sys_rt_sigaction compat_sys_rt_sigaction
170+
135 common rt_sigprocmask sys_rt_sigprocmask compat_sys_rt_sigprocmask
171+
136 common rt_sigpending sys_rt_sigpending compat_sys_rt_sigpending
172+
137 time32 rt_sigtimedwait sys_rt_sigtimedwait_time32 compat_sys_rt_sigtimedwait_time32
173+
137 64 rt_sigtimedwait sys_rt_sigtimedwait
174+
138 common rt_sigqueueinfo sys_rt_sigqueueinfo compat_sys_rt_sigqueueinfo
175+
139 common rt_sigreturn sys_rt_sigreturn compat_sys_rt_sigreturn
176+
140 common setpriority sys_setpriority
177+
141 common getpriority sys_getpriority
178+
142 common reboot sys_reboot
179+
143 common setregid sys_setregid
180+
144 common setgid sys_setgid
181+
145 common setreuid sys_setreuid
182+
146 common setuid sys_setuid
183+
147 common setresuid sys_setresuid
184+
148 common getresuid sys_getresuid
185+
149 common setresgid sys_setresgid
186+
150 common getresgid sys_getresgid
187+
151 common setfsuid sys_setfsuid
188+
152 common setfsgid sys_setfsgid
189+
153 common times sys_times compat_sys_times
190+
154 common setpgid sys_setpgid
191+
155 common getpgid sys_getpgid
192+
156 common getsid sys_getsid
193+
157 common setsid sys_setsid
194+
158 common getgroups sys_getgroups
195+
159 common setgroups sys_setgroups
196+
160 common uname sys_newuname
197+
161 common sethostname sys_sethostname
198+
162 common setdomainname sys_setdomainname
199+
# getrlimit and setrlimit are superseded with prlimit64
200+
163 rlimit getrlimit sys_getrlimit compat_sys_getrlimit
201+
164 rlimit setrlimit sys_setrlimit compat_sys_setrlimit
202+
165 common getrusage sys_getrusage compat_sys_getrusage
203+
166 common umask sys_umask
204+
167 common prctl sys_prctl
205+
168 common getcpu sys_getcpu
206+
169 time32 gettimeofday sys_gettimeofday compat_sys_gettimeofday
207+
169 64 gettimeofday sys_gettimeofday
208+
170 time32 settimeofday sys_settimeofday compat_sys_settimeofday
209+
170 64 settimeofday sys_settimeofday
210+
171 time32 adjtimex sys_adjtimex_time32
211+
171 64 adjtimex sys_adjtimex
212+
172 common getpid sys_getpid
213+
173 common getppid sys_getppid
214+
174 common getuid sys_getuid
215+
175 common geteuid sys_geteuid
216+
176 common getgid sys_getgid
217+
177 common getegid sys_getegid
218+
178 common gettid sys_gettid
219+
179 common sysinfo sys_sysinfo compat_sys_sysinfo
220+
180 common mq_open sys_mq_open compat_sys_mq_open
221+
181 common mq_unlink sys_mq_unlink
222+
182 time32 mq_timedsend sys_mq_timedsend_time32
223+
182 64 mq_timedsend sys_mq_timedsend
224+
183 time32 mq_timedreceive sys_mq_timedreceive_time32
225+
183 64 mq_timedreceive sys_mq_timedreceive
226+
184 common mq_notify sys_mq_notify compat_sys_mq_notify
227+
185 common mq_getsetattr sys_mq_getsetattr compat_sys_mq_getsetattr
228+
186 common msgget sys_msgget
229+
187 common msgctl sys_msgctl compat_sys_msgctl
230+
188 common msgrcv sys_msgrcv compat_sys_msgrcv
231+
189 common msgsnd sys_msgsnd compat_sys_msgsnd
232+
190 common semget sys_semget
233+
191 common semctl sys_semctl compat_sys_semctl
234+
192 time32 semtimedop sys_semtimedop_time32
235+
192 64 semtimedop sys_semtimedop
236+
193 common semop sys_semop
237+
194 common shmget sys_shmget
238+
195 common shmctl sys_shmctl compat_sys_shmctl
239+
196 common shmat sys_shmat compat_sys_shmat
240+
197 common shmdt sys_shmdt
241+
198 common socket sys_socket
242+
199 common socketpair sys_socketpair
243+
200 common bind sys_bind
244+
201 common listen sys_listen
245+
202 common accept sys_accept
246+
203 common connect sys_connect
247+
204 common getsockname sys_getsockname
248+
205 common getpeername sys_getpeername
249+
206 common sendto sys_sendto
250+
207 common recvfrom sys_recvfrom compat_sys_recvfrom
251+
208 common setsockopt sys_setsockopt sys_setsockopt
252+
209 common getsockopt sys_getsockopt sys_getsockopt
253+
210 common shutdown sys_shutdown
254+
211 common sendmsg sys_sendmsg compat_sys_sendmsg
255+
212 common recvmsg sys_recvmsg compat_sys_recvmsg
256+
213 common readahead sys_readahead compat_sys_readahead
257+
214 common brk sys_brk
258+
215 common munmap sys_munmap
259+
216 common mremap sys_mremap
260+
217 common add_key sys_add_key
261+
218 common request_key sys_request_key
262+
219 common keyctl sys_keyctl compat_sys_keyctl
263+
220 common clone sys_clone
264+
221 common execve sys_execve compat_sys_execve
265+
222 32 mmap2 sys_mmap2
266+
222 64 mmap sys_mmap
267+
223 32 fadvise64_64 sys_fadvise64_64 compat_sys_fadvise64_64
268+
223 64 fadvise64 sys_fadvise64_64
269+
224 common swapon sys_swapon
270+
225 common swapoff sys_swapoff
271+
226 common mprotect sys_mprotect
272+
227 common msync sys_msync
273+
228 common mlock sys_mlock
274+
229 common munlock sys_munlock
275+
230 common mlockall sys_mlockall
276+
231 common munlockall sys_munlockall
277+
232 common mincore sys_mincore
278+
233 common madvise sys_madvise
279+
234 common remap_file_pages sys_remap_file_pages
280+
235 common mbind sys_mbind
281+
236 common get_mempolicy sys_get_mempolicy
282+
237 common set_mempolicy sys_set_mempolicy
283+
238 common migrate_pages sys_migrate_pages
284+
239 common move_pages sys_move_pages
285+
240 common rt_tgsigqueueinfo sys_rt_tgsigqueueinfo compat_sys_rt_tgsigqueueinfo
286+
241 common perf_event_open sys_perf_event_open
287+
242 common accept4 sys_accept4
288+
243 time32 recvmmsg sys_recvmmsg_time32 compat_sys_recvmmsg_time32
289+
243 64 recvmmsg sys_recvmmsg
290+
# Architectures may provide up to 16 syscalls of their own between 244 and 259
291+
260 time32 wait4 sys_wait4 compat_sys_wait4
292+
260 64 wait4 sys_wait4
293+
261 common prlimit64 sys_prlimit64
294+
262 common fanotify_init sys_fanotify_init
295+
263 common fanotify_mark sys_fanotify_mark
296+
264 common name_to_handle_at sys_name_to_handle_at
297+
265 common open_by_handle_at sys_open_by_handle_at
298+
266 time32 clock_adjtime sys_clock_adjtime32
299+
266 64 clock_adjtime sys_clock_adjtime
300+
267 common syncfs sys_syncfs
301+
268 common setns sys_setns
302+
269 common sendmmsg sys_sendmmsg compat_sys_sendmmsg
303+
270 common process_vm_readv sys_process_vm_readv
304+
271 common process_vm_writev sys_process_vm_writev
305+
272 common kcmp sys_kcmp
306+
273 common finit_module sys_finit_module
307+
274 common sched_setattr sys_sched_setattr
308+
275 common sched_getattr sys_sched_getattr
309+
276 common renameat2 sys_renameat2
310+
277 common seccomp sys_seccomp
311+
278 common getrandom sys_getrandom
312+
279 common memfd_create sys_memfd_create
313+
280 common bpf sys_bpf
314+
281 common execveat sys_execveat compat_sys_execveat
315+
282 common userfaultfd sys_userfaultfd
316+
283 common membarrier sys_membarrier
317+
284 common mlock2 sys_mlock2
318+
285 common copy_file_range sys_copy_file_range
319+
286 common preadv2 sys_preadv2 compat_sys_preadv2
320+
287 common pwritev2 sys_pwritev2 compat_sys_pwritev2
321+
288 common pkey_mprotect sys_pkey_mprotect
322+
289 common pkey_alloc sys_pkey_alloc
323+
290 common pkey_free sys_pkey_free
324+
291 common statx sys_statx
325+
292 time32 io_pgetevents sys_io_pgetevents_time32 compat_sys_io_pgetevents
326+
292 64 io_pgetevents sys_io_pgetevents
327+
293 common rseq sys_rseq
328+
294 common kexec_file_load sys_kexec_file_load
329+
# 295 through 402 are unassigned to sync up with generic numbers don't use
330+
403 32 clock_gettime64 sys_clock_gettime
331+
404 32 clock_settime64 sys_clock_settime
332+
405 32 clock_adjtime64 sys_clock_adjtime
333+
406 32 clock_getres_time64 sys_clock_getres
334+
407 32 clock_nanosleep_time64 sys_clock_nanosleep
335+
408 32 timer_gettime64 sys_timer_gettime
336+
409 32 timer_settime64 sys_timer_settime
337+
410 32 timerfd_gettime64 sys_timerfd_gettime
338+
411 32 timerfd_settime64 sys_timerfd_settime
339+
412 32 utimensat_time64 sys_utimensat
340+
413 32 pselect6_time64 sys_pselect6 compat_sys_pselect6_time64
341+
414 32 ppoll_time64 sys_ppoll compat_sys_ppoll_time64
342+
416 32 io_pgetevents_time64 sys_io_pgetevents compat_sys_io_pgetevents_time64
343+
417 32 recvmmsg_time64 sys_recvmmsg compat_sys_recvmmsg_time64
344+
418 32 mq_timedsend_time64 sys_mq_timedsend
345+
419 32 mq_timedreceive_time64 sys_mq_timedreceive
346+
420 32 semtimedop_time64 sys_semtimedop
347+
421 32 rt_sigtimedwait_time64 sys_rt_sigtimedwait compat_sys_rt_sigtimedwait_time64
348+
422 32 futex_time64 sys_futex
349+
423 32 sched_rr_get_interval_time64 sys_sched_rr_get_interval
350+
424 common pidfd_send_signal sys_pidfd_send_signal
351+
425 common io_uring_setup sys_io_uring_setup
352+
426 common io_uring_enter sys_io_uring_enter
353+
427 common io_uring_register sys_io_uring_register
354+
428 common open_tree sys_open_tree
355+
429 common move_mount sys_move_mount
356+
430 common fsopen sys_fsopen
357+
431 common fsconfig sys_fsconfig
358+
432 common fsmount sys_fsmount
359+
433 common fspick sys_fspick
360+
434 common pidfd_open sys_pidfd_open
361+
435 common clone3 sys_clone3
362+
436 common close_range sys_close_range
363+
437 common openat2 sys_openat2
364+
438 common pidfd_getfd sys_pidfd_getfd
365+
439 common faccessat2 sys_faccessat2
366+
440 common process_madvise sys_process_madvise
367+
441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2
368+
442 common mount_setattr sys_mount_setattr
369+
443 common quotactl_fd sys_quotactl_fd
370+
444 common landlock_create_ruleset sys_landlock_create_ruleset
371+
445 common landlock_add_rule sys_landlock_add_rule
372+
446 common landlock_restrict_self sys_landlock_restrict_self
373+
447 memfd_secret memfd_secret sys_memfd_secret
374+
448 common process_mrelease sys_process_mrelease
375+
449 common futex_waitv sys_futex_waitv
376+
450 common set_mempolicy_home_node sys_set_mempolicy_home_node
377+
451 common cachestat sys_cachestat
378+
452 common fchmodat2 sys_fchmodat2
379+
453 common map_shadow_stack sys_map_shadow_stack
380+
454 common futex_wake sys_futex_wake
381+
455 common futex_wait sys_futex_wait
382+
456 common futex_requeue sys_futex_requeue
383+
457 common statmount sys_statmount
384+
458 common listmount sys_listmount
385+
459 common lsm_get_self_attr sys_lsm_get_self_attr
386+
460 common lsm_set_self_attr sys_lsm_set_self_attr
387+
461 common lsm_list_modules sys_lsm_list_modules
388+
462 common mseal sys_mseal

0 commit comments

Comments
 (0)