xref: /linux/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl (revision c24999e61b2187578fe4256b7bc6190a046c4b93)
1# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
2#
3# 64-bit system call numbers and entry vectors
4#
5# The format is:
6# <number> <abi> <name> <entry point> [<compat entry point> [noreturn]]
7#
8# The __x64_sys_*() stubs are created on-the-fly for sys_*() system calls
9#
10# The abi is "common", "64" or "x32" for this file.
11#
120	common	read			sys_read
131	common	write			sys_write
142	common	open			sys_open
153	common	close			sys_close
164	common	stat			sys_newstat
175	common	fstat			sys_newfstat
186	common	lstat			sys_newlstat
197	common	poll			sys_poll
208	common	lseek			sys_lseek
219	common	mmap			sys_mmap
2210	common	mprotect		sys_mprotect
2311	common	munmap			sys_munmap
2412	common	brk			sys_brk
2513	64	rt_sigaction		sys_rt_sigaction
2614	common	rt_sigprocmask		sys_rt_sigprocmask
2715	64	rt_sigreturn		sys_rt_sigreturn
2816	64	ioctl			sys_ioctl
2917	common	pread64			sys_pread64
3018	common	pwrite64		sys_pwrite64
3119	64	readv			sys_readv
3220	64	writev			sys_writev
3321	common	access			sys_access
3422	common	pipe			sys_pipe
3523	common	select			sys_select
3624	common	sched_yield		sys_sched_yield
3725	common	mremap			sys_mremap
3826	common	msync			sys_msync
3927	common	mincore			sys_mincore
4028	common	madvise			sys_madvise
4129	common	shmget			sys_shmget
4230	common	shmat			sys_shmat
4331	common	shmctl			sys_shmctl
4432	common	dup			sys_dup
4533	common	dup2			sys_dup2
4634	common	pause			sys_pause
4735	common	nanosleep		sys_nanosleep
4836	common	getitimer		sys_getitimer
4937	common	alarm			sys_alarm
5038	common	setitimer		sys_setitimer
5139	common	getpid			sys_getpid
5240	common	sendfile		sys_sendfile64
5341	common	socket			sys_socket
5442	common	connect			sys_connect
5543	common	accept			sys_accept
5644	common	sendto			sys_sendto
5745	64	recvfrom		sys_recvfrom
5846	64	sendmsg			sys_sendmsg
5947	64	recvmsg			sys_recvmsg
6048	common	shutdown		sys_shutdown
6149	common	bind			sys_bind
6250	common	listen			sys_listen
6351	common	getsockname		sys_getsockname
6452	common	getpeername		sys_getpeername
6553	common	socketpair		sys_socketpair
6654	64	setsockopt		sys_setsockopt
6755	64	getsockopt		sys_getsockopt
6856	common	clone			sys_clone
6957	common	fork			sys_fork
7058	common	vfork			sys_vfork
7159	64	execve			sys_execve
7260	common	exit			sys_exit			-			noreturn
7361	common	wait4			sys_wait4
7462	common	kill			sys_kill
7563	common	uname			sys_newuname
7664	common	semget			sys_semget
7765	common	semop			sys_semop
7866	common	semctl			sys_semctl
7967	common	shmdt			sys_shmdt
8068	common	msgget			sys_msgget
8169	common	msgsnd			sys_msgsnd
8270	common	msgrcv			sys_msgrcv
8371	common	msgctl			sys_msgctl
8472	common	fcntl			sys_fcntl
8573	common	flock			sys_flock
8674	common	fsync			sys_fsync
8775	common	fdatasync		sys_fdatasync
8876	common	truncate		sys_truncate
8977	common	ftruncate		sys_ftruncate
9078	common	getdents		sys_getdents
9179	common	getcwd			sys_getcwd
9280	common	chdir			sys_chdir
9381	common	fchdir			sys_fchdir
9482	common	rename			sys_rename
9583	common	mkdir			sys_mkdir
9684	common	rmdir			sys_rmdir
9785	common	creat			sys_creat
9886	common	link			sys_link
9987	common	unlink			sys_unlink
10088	common	symlink			sys_symlink
10189	common	readlink		sys_readlink
10290	common	chmod			sys_chmod
10391	common	fchmod			sys_fchmod
10492	common	chown			sys_chown
10593	common	fchown			sys_fchown
10694	common	lchown			sys_lchown
10795	common	umask			sys_umask
10896	common	gettimeofday		sys_gettimeofday
10997	common	getrlimit		sys_getrlimit
11098	common	getrusage		sys_getrusage
11199	common	sysinfo			sys_sysinfo
112100	common	times			sys_times
113101	64	ptrace			sys_ptrace
114102	common	getuid			sys_getuid
115103	common	syslog			sys_syslog
116104	common	getgid			sys_getgid
117105	common	setuid			sys_setuid
118106	common	setgid			sys_setgid
119107	common	geteuid			sys_geteuid
120108	common	getegid			sys_getegid
121109	common	setpgid			sys_setpgid
122110	common	getppid			sys_getppid
123111	common	getpgrp			sys_getpgrp
124112	common	setsid			sys_setsid
125113	common	setreuid		sys_setreuid
126114	common	setregid		sys_setregid
127115	common	getgroups		sys_getgroups
128116	common	setgroups		sys_setgroups
129117	common	setresuid		sys_setresuid
130118	common	getresuid		sys_getresuid
131119	common	setresgid		sys_setresgid
132120	common	getresgid		sys_getresgid
133121	common	getpgid			sys_getpgid
134122	common	setfsuid		sys_setfsuid
135123	common	setfsgid		sys_setfsgid
136124	common	getsid			sys_getsid
137125	common	capget			sys_capget
138126	common	capset			sys_capset
139127	64	rt_sigpending		sys_rt_sigpending
140128	64	rt_sigtimedwait		sys_rt_sigtimedwait
141129	64	rt_sigqueueinfo		sys_rt_sigqueueinfo
142130	common	rt_sigsuspend		sys_rt_sigsuspend
143131	64	sigaltstack		sys_sigaltstack
144132	common	utime			sys_utime
145133	common	mknod			sys_mknod
146134	64	uselib
147135	common	personality		sys_personality
148136	common	ustat			sys_ustat
149137	common	statfs			sys_statfs
150138	common	fstatfs			sys_fstatfs
151139	common	sysfs			sys_sysfs
152140	common	getpriority		sys_getpriority
153141	common	setpriority		sys_setpriority
154142	common	sched_setparam		sys_sched_setparam
155143	common	sched_getparam		sys_sched_getparam
156144	common	sched_setscheduler	sys_sched_setscheduler
157145	common	sched_getscheduler	sys_sched_getscheduler
158146	common	sched_get_priority_max	sys_sched_get_priority_max
159147	common	sched_get_priority_min	sys_sched_get_priority_min
160148	common	sched_rr_get_interval	sys_sched_rr_get_interval
161149	common	mlock			sys_mlock
162150	common	munlock			sys_munlock
163151	common	mlockall		sys_mlockall
164152	common	munlockall		sys_munlockall
165153	common	vhangup			sys_vhangup
166154	common	modify_ldt		sys_modify_ldt
167155	common	pivot_root		sys_pivot_root
168156	64	_sysctl			sys_ni_syscall
169157	common	prctl			sys_prctl
170158	common	arch_prctl		sys_arch_prctl
171159	common	adjtimex		sys_adjtimex
172160	common	setrlimit		sys_setrlimit
173161	common	chroot			sys_chroot
174162	common	sync			sys_sync
175163	common	acct			sys_acct
176164	common	settimeofday		sys_settimeofday
177165	common	mount			sys_mount
178166	common	umount2			sys_umount
179167	common	swapon			sys_swapon
180168	common	swapoff			sys_swapoff
181169	common	reboot			sys_reboot
182170	common	sethostname		sys_sethostname
183171	common	setdomainname		sys_setdomainname
184172	common	iopl			sys_iopl
185173	common	ioperm			sys_ioperm
186174	64	create_module
187175	common	init_module		sys_init_module
188176	common	delete_module		sys_delete_module
189177	64	get_kernel_syms
190178	64	query_module
191179	common	quotactl		sys_quotactl
192180	64	nfsservctl
193181	common	getpmsg
194182	common	putpmsg
195183	common	afs_syscall
196184	common	tuxcall
197185	common	security
198186	common	gettid			sys_gettid
199187	common	readahead		sys_readahead
200188	common	setxattr		sys_setxattr
201189	common	lsetxattr		sys_lsetxattr
202190	common	fsetxattr		sys_fsetxattr
203191	common	getxattr		sys_getxattr
204192	common	lgetxattr		sys_lgetxattr
205193	common	fgetxattr		sys_fgetxattr
206194	common	listxattr		sys_listxattr
207195	common	llistxattr		sys_llistxattr
208196	common	flistxattr		sys_flistxattr
209197	common	removexattr		sys_removexattr
210198	common	lremovexattr		sys_lremovexattr
211199	common	fremovexattr		sys_fremovexattr
212200	common	tkill			sys_tkill
213201	common	time			sys_time
214202	common	futex			sys_futex
215203	common	sched_setaffinity	sys_sched_setaffinity
216204	common	sched_getaffinity	sys_sched_getaffinity
217205	64	set_thread_area
218206	64	io_setup		sys_io_setup
219207	common	io_destroy		sys_io_destroy
220208	common	io_getevents		sys_io_getevents
221209	64	io_submit		sys_io_submit
222210	common	io_cancel		sys_io_cancel
223211	64	get_thread_area
224212	common	lookup_dcookie
225213	common	epoll_create		sys_epoll_create
226214	64	epoll_ctl_old
227215	64	epoll_wait_old
228216	common	remap_file_pages	sys_remap_file_pages
229217	common	getdents64		sys_getdents64
230218	common	set_tid_address		sys_set_tid_address
231219	common	restart_syscall		sys_restart_syscall
232220	common	semtimedop		sys_semtimedop
233221	common	fadvise64		sys_fadvise64
234222	64	timer_create		sys_timer_create
235223	common	timer_settime		sys_timer_settime
236224	common	timer_gettime		sys_timer_gettime
237225	common	timer_getoverrun	sys_timer_getoverrun
238226	common	timer_delete		sys_timer_delete
239227	common	clock_settime		sys_clock_settime
240228	common	clock_gettime		sys_clock_gettime
241229	common	clock_getres		sys_clock_getres
242230	common	clock_nanosleep		sys_clock_nanosleep
243231	common	exit_group		sys_exit_group			-			noreturn
244232	common	epoll_wait		sys_epoll_wait
245233	common	epoll_ctl		sys_epoll_ctl
246234	common	tgkill			sys_tgkill
247235	common	utimes			sys_utimes
248236	64	vserver
249237	common	mbind			sys_mbind
250238	common	set_mempolicy		sys_set_mempolicy
251239	common	get_mempolicy		sys_get_mempolicy
252240	common	mq_open			sys_mq_open
253241	common	mq_unlink		sys_mq_unlink
254242	common	mq_timedsend		sys_mq_timedsend
255243	common	mq_timedreceive		sys_mq_timedreceive
256244	64	mq_notify		sys_mq_notify
257245	common	mq_getsetattr		sys_mq_getsetattr
258246	64	kexec_load		sys_kexec_load
259247	64	waitid			sys_waitid
260248	common	add_key			sys_add_key
261249	common	request_key		sys_request_key
262250	common	keyctl			sys_keyctl
263251	common	ioprio_set		sys_ioprio_set
264252	common	ioprio_get		sys_ioprio_get
265253	common	inotify_init		sys_inotify_init
266254	common	inotify_add_watch	sys_inotify_add_watch
267255	common	inotify_rm_watch	sys_inotify_rm_watch
268256	common	migrate_pages		sys_migrate_pages
269257	common	openat			sys_openat
270258	common	mkdirat			sys_mkdirat
271259	common	mknodat			sys_mknodat
272260	common	fchownat		sys_fchownat
273261	common	futimesat		sys_futimesat
274262	common	newfstatat		sys_newfstatat
275263	common	unlinkat		sys_unlinkat
276264	common	renameat		sys_renameat
277265	common	linkat			sys_linkat
278266	common	symlinkat		sys_symlinkat
279267	common	readlinkat		sys_readlinkat
280268	common	fchmodat		sys_fchmodat
281269	common	faccessat		sys_faccessat
282270	common	pselect6		sys_pselect6
283271	common	ppoll			sys_ppoll
284272	common	unshare			sys_unshare
285273	64	set_robust_list		sys_set_robust_list
286274	64	get_robust_list		sys_get_robust_list
287275	common	splice			sys_splice
288276	common	tee			sys_tee
289277	common	sync_file_range		sys_sync_file_range
290278	64	vmsplice		sys_vmsplice
291279	64	move_pages		sys_move_pages
292280	common	utimensat		sys_utimensat
293281	common	epoll_pwait		sys_epoll_pwait
294282	common	signalfd		sys_signalfd
295283	common	timerfd_create		sys_timerfd_create
296284	common	eventfd			sys_eventfd
297285	common	fallocate		sys_fallocate
298286	common	timerfd_settime		sys_timerfd_settime
299287	common	timerfd_gettime		sys_timerfd_gettime
300288	common	accept4			sys_accept4
301289	common	signalfd4		sys_signalfd4
302290	common	eventfd2		sys_eventfd2
303291	common	epoll_create1		sys_epoll_create1
304292	common	dup3			sys_dup3
305293	common	pipe2			sys_pipe2
306294	common	inotify_init1		sys_inotify_init1
307295	64	preadv			sys_preadv
308296	64	pwritev			sys_pwritev
309297	64	rt_tgsigqueueinfo	sys_rt_tgsigqueueinfo
310298	common	perf_event_open		sys_perf_event_open
311299	64	recvmmsg		sys_recvmmsg
312300	common	fanotify_init		sys_fanotify_init
313301	common	fanotify_mark		sys_fanotify_mark
314302	common	prlimit64		sys_prlimit64
315303	common	name_to_handle_at	sys_name_to_handle_at
316304	common	open_by_handle_at	sys_open_by_handle_at
317305	common	clock_adjtime		sys_clock_adjtime
318306	common	syncfs			sys_syncfs
319307	64	sendmmsg		sys_sendmmsg
320308	common	setns			sys_setns
321309	common	getcpu			sys_getcpu
322310	64	process_vm_readv	sys_process_vm_readv
323311	64	process_vm_writev	sys_process_vm_writev
324312	common	kcmp			sys_kcmp
325313	common	finit_module		sys_finit_module
326314	common	sched_setattr		sys_sched_setattr
327315	common	sched_getattr		sys_sched_getattr
328316	common	renameat2		sys_renameat2
329317	common	seccomp			sys_seccomp
330318	common	getrandom		sys_getrandom
331319	common	memfd_create		sys_memfd_create
332320	common	kexec_file_load		sys_kexec_file_load
333321	common	bpf			sys_bpf
334322	64	execveat		sys_execveat
335323	common	userfaultfd		sys_userfaultfd
336324	common	membarrier		sys_membarrier
337325	common	mlock2			sys_mlock2
338326	common	copy_file_range		sys_copy_file_range
339327	64	preadv2			sys_preadv2
340328	64	pwritev2		sys_pwritev2
341329	common	pkey_mprotect		sys_pkey_mprotect
342330	common	pkey_alloc		sys_pkey_alloc
343331	common	pkey_free		sys_pkey_free
344332	common	statx			sys_statx
345333	common	io_pgetevents		sys_io_pgetevents
346334	common	rseq			sys_rseq
347335	common	uretprobe		sys_uretprobe
348# don't use numbers 387 through 423, add new calls after the last
349# 'common' entry
350424	common	pidfd_send_signal	sys_pidfd_send_signal
351425	common	io_uring_setup		sys_io_uring_setup
352426	common	io_uring_enter		sys_io_uring_enter
353427	common	io_uring_register	sys_io_uring_register
354428	common	open_tree		sys_open_tree
355429	common	move_mount		sys_move_mount
356430	common	fsopen			sys_fsopen
357431	common	fsconfig		sys_fsconfig
358432	common	fsmount			sys_fsmount
359433	common	fspick			sys_fspick
360434	common	pidfd_open		sys_pidfd_open
361435	common	clone3			sys_clone3
362436	common	close_range		sys_close_range
363437	common	openat2			sys_openat2
364438	common	pidfd_getfd		sys_pidfd_getfd
365439	common	faccessat2		sys_faccessat2
366440	common	process_madvise		sys_process_madvise
367441	common	epoll_pwait2		sys_epoll_pwait2
368442	common	mount_setattr		sys_mount_setattr
369443	common	quotactl_fd		sys_quotactl_fd
370444	common	landlock_create_ruleset	sys_landlock_create_ruleset
371445	common	landlock_add_rule	sys_landlock_add_rule
372446	common	landlock_restrict_self	sys_landlock_restrict_self
373447	common	memfd_secret		sys_memfd_secret
374448	common	process_mrelease	sys_process_mrelease
375449	common	futex_waitv		sys_futex_waitv
376450	common	set_mempolicy_home_node	sys_set_mempolicy_home_node
377451	common	cachestat		sys_cachestat
378452	common	fchmodat2		sys_fchmodat2
379453	common	map_shadow_stack	sys_map_shadow_stack
380454	common	futex_wake		sys_futex_wake
381455	common	futex_wait		sys_futex_wait
382456	common	futex_requeue		sys_futex_requeue
383457	common	statmount		sys_statmount
384458	common	listmount		sys_listmount
385459	common	lsm_get_self_attr	sys_lsm_get_self_attr
386460	common	lsm_set_self_attr	sys_lsm_set_self_attr
387461	common	lsm_list_modules	sys_lsm_list_modules
388462 	common  mseal			sys_mseal
389
390#
391# Due to a historical design error, certain syscalls are numbered differently
392# in x32 as compared to native x86_64.  These syscalls have numbers 512-547.
393# Do not add new syscalls to this range.  Numbers 548 and above are available
394# for non-x32 use.
395#
396512	x32	rt_sigaction		compat_sys_rt_sigaction
397513	x32	rt_sigreturn		compat_sys_x32_rt_sigreturn
398514	x32	ioctl			compat_sys_ioctl
399515	x32	readv			sys_readv
400516	x32	writev			sys_writev
401517	x32	recvfrom		compat_sys_recvfrom
402518	x32	sendmsg			compat_sys_sendmsg
403519	x32	recvmsg			compat_sys_recvmsg
404520	x32	execve			compat_sys_execve
405521	x32	ptrace			compat_sys_ptrace
406522	x32	rt_sigpending		compat_sys_rt_sigpending
407523	x32	rt_sigtimedwait		compat_sys_rt_sigtimedwait_time64
408524	x32	rt_sigqueueinfo		compat_sys_rt_sigqueueinfo
409525	x32	sigaltstack		compat_sys_sigaltstack
410526	x32	timer_create		compat_sys_timer_create
411527	x32	mq_notify		compat_sys_mq_notify
412528	x32	kexec_load		compat_sys_kexec_load
413529	x32	waitid			compat_sys_waitid
414530	x32	set_robust_list		compat_sys_set_robust_list
415531	x32	get_robust_list		compat_sys_get_robust_list
416532	x32	vmsplice		sys_vmsplice
417533	x32	move_pages		sys_move_pages
418534	x32	preadv			compat_sys_preadv64
419535	x32	pwritev			compat_sys_pwritev64
420536	x32	rt_tgsigqueueinfo	compat_sys_rt_tgsigqueueinfo
421537	x32	recvmmsg		compat_sys_recvmmsg_time64
422538	x32	sendmmsg		compat_sys_sendmmsg
423539	x32	process_vm_readv	sys_process_vm_readv
424540	x32	process_vm_writev	sys_process_vm_writev
425541	x32	setsockopt		sys_setsockopt
426542	x32	getsockopt		sys_getsockopt
427543	x32	io_setup		compat_sys_io_setup
428544	x32	io_submit		compat_sys_io_submit
429545	x32	execveat		compat_sys_execveat
430546	x32	preadv2			compat_sys_preadv64v2
431547	x32	pwritev2		compat_sys_pwritev64v2
432# This is the end of the legacy x32 range.  Numbers 548 and above are
433# not special and are not to be used for x32-specific syscalls.
434