2021-02-04 03:35:24 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
|
|
|
#
|
|
|
|
# system call numbers and entry vectors for mips
|
|
|
|
#
|
|
|
|
# The format is:
|
|
|
|
# <number> <abi> <name> <entry point>
|
|
|
|
#
|
|
|
|
# The <abi> is always "n64" for this file.
|
|
|
|
#
|
|
|
|
0 n64 read sys_read
|
|
|
|
1 n64 write sys_write
|
|
|
|
2 n64 open sys_open
|
|
|
|
3 n64 close sys_close
|
|
|
|
4 n64 stat sys_newstat
|
|
|
|
5 n64 fstat sys_newfstat
|
|
|
|
6 n64 lstat sys_newlstat
|
|
|
|
7 n64 poll sys_poll
|
|
|
|
8 n64 lseek sys_lseek
|
|
|
|
9 n64 mmap sys_mips_mmap
|
|
|
|
10 n64 mprotect sys_mprotect
|
|
|
|
11 n64 munmap sys_munmap
|
|
|
|
12 n64 brk sys_brk
|
|
|
|
13 n64 rt_sigaction sys_rt_sigaction
|
|
|
|
14 n64 rt_sigprocmask sys_rt_sigprocmask
|
|
|
|
15 n64 ioctl sys_ioctl
|
|
|
|
16 n64 pread64 sys_pread64
|
|
|
|
17 n64 pwrite64 sys_pwrite64
|
|
|
|
18 n64 readv sys_readv
|
|
|
|
19 n64 writev sys_writev
|
|
|
|
20 n64 access sys_access
|
|
|
|
21 n64 pipe sysm_pipe
|
|
|
|
22 n64 _newselect sys_select
|
|
|
|
23 n64 sched_yield sys_sched_yield
|
|
|
|
24 n64 mremap sys_mremap
|
|
|
|
25 n64 msync sys_msync
|
|
|
|
26 n64 mincore sys_mincore
|
|
|
|
27 n64 madvise sys_madvise
|
|
|
|
28 n64 shmget sys_shmget
|
|
|
|
29 n64 shmat sys_shmat
|
|
|
|
30 n64 shmctl sys_old_shmctl
|
|
|
|
31 n64 dup sys_dup
|
|
|
|
32 n64 dup2 sys_dup2
|
|
|
|
33 n64 pause sys_pause
|
|
|
|
34 n64 nanosleep sys_nanosleep
|
|
|
|
35 n64 getitimer sys_getitimer
|
|
|
|
36 n64 setitimer sys_setitimer
|
|
|
|
37 n64 alarm sys_alarm
|
|
|
|
38 n64 getpid sys_getpid
|
|
|
|
39 n64 sendfile sys_sendfile64
|
|
|
|
40 n64 socket sys_socket
|
|
|
|
41 n64 connect sys_connect
|
|
|
|
42 n64 accept sys_accept
|
|
|
|
43 n64 sendto sys_sendto
|
|
|
|
44 n64 recvfrom sys_recvfrom
|
|
|
|
45 n64 sendmsg sys_sendmsg
|
|
|
|
46 n64 recvmsg sys_recvmsg
|
|
|
|
47 n64 shutdown sys_shutdown
|
|
|
|
48 n64 bind sys_bind
|
|
|
|
49 n64 listen sys_listen
|
|
|
|
50 n64 getsockname sys_getsockname
|
|
|
|
51 n64 getpeername sys_getpeername
|
|
|
|
52 n64 socketpair sys_socketpair
|
|
|
|
53 n64 setsockopt sys_setsockopt
|
|
|
|
54 n64 getsockopt sys_getsockopt
|
|
|
|
55 n64 clone __sys_clone
|
|
|
|
56 n64 fork __sys_fork
|
|
|
|
57 n64 execve sys_execve
|
|
|
|
58 n64 exit sys_exit
|
|
|
|
59 n64 wait4 sys_wait4
|
|
|
|
60 n64 kill sys_kill
|
|
|
|
61 n64 uname sys_newuname
|
|
|
|
62 n64 semget sys_semget
|
|
|
|
63 n64 semop sys_semop
|
|
|
|
64 n64 semctl sys_old_semctl
|
|
|
|
65 n64 shmdt sys_shmdt
|
|
|
|
66 n64 msgget sys_msgget
|
|
|
|
67 n64 msgsnd sys_msgsnd
|
|
|
|
68 n64 msgrcv sys_msgrcv
|
|
|
|
69 n64 msgctl sys_old_msgctl
|
|
|
|
70 n64 fcntl sys_fcntl
|
|
|
|
71 n64 flock sys_flock
|
|
|
|
72 n64 fsync sys_fsync
|
|
|
|
73 n64 fdatasync sys_fdatasync
|
|
|
|
74 n64 truncate sys_truncate
|
|
|
|
75 n64 ftruncate sys_ftruncate
|
|
|
|
76 n64 getdents sys_getdents
|
|
|
|
77 n64 getcwd sys_getcwd
|
|
|
|
78 n64 chdir sys_chdir
|
|
|
|
79 n64 fchdir sys_fchdir
|
|
|
|
80 n64 rename sys_rename
|
|
|
|
81 n64 mkdir sys_mkdir
|
|
|
|
82 n64 rmdir sys_rmdir
|
|
|
|
83 n64 creat sys_creat
|
|
|
|
84 n64 link sys_link
|
|
|
|
85 n64 unlink sys_unlink
|
|
|
|
86 n64 symlink sys_symlink
|
|
|
|
87 n64 readlink sys_readlink
|
|
|
|
88 n64 chmod sys_chmod
|
|
|
|
89 n64 fchmod sys_fchmod
|
|
|
|
90 n64 chown sys_chown
|
|
|
|
91 n64 fchown sys_fchown
|
|
|
|
92 n64 lchown sys_lchown
|
|
|
|
93 n64 umask sys_umask
|
|
|
|
94 n64 gettimeofday sys_gettimeofday
|
|
|
|
95 n64 getrlimit sys_getrlimit
|
|
|
|
96 n64 getrusage sys_getrusage
|
|
|
|
97 n64 sysinfo sys_sysinfo
|
|
|
|
98 n64 times sys_times
|
|
|
|
99 n64 ptrace sys_ptrace
|
|
|
|
100 n64 getuid sys_getuid
|
|
|
|
101 n64 syslog sys_syslog
|
|
|
|
102 n64 getgid sys_getgid
|
|
|
|
103 n64 setuid sys_setuid
|
|
|
|
104 n64 setgid sys_setgid
|
|
|
|
105 n64 geteuid sys_geteuid
|
|
|
|
106 n64 getegid sys_getegid
|
|
|
|
107 n64 setpgid sys_setpgid
|
|
|
|
108 n64 getppid sys_getppid
|
|
|
|
109 n64 getpgrp sys_getpgrp
|
|
|
|
110 n64 setsid sys_setsid
|
|
|
|
111 n64 setreuid sys_setreuid
|
|
|
|
112 n64 setregid sys_setregid
|
|
|
|
113 n64 getgroups sys_getgroups
|
|
|
|
114 n64 setgroups sys_setgroups
|
|
|
|
115 n64 setresuid sys_setresuid
|
|
|
|
116 n64 getresuid sys_getresuid
|
|
|
|
117 n64 setresgid sys_setresgid
|
|
|
|
118 n64 getresgid sys_getresgid
|
|
|
|
119 n64 getpgid sys_getpgid
|
|
|
|
120 n64 setfsuid sys_setfsuid
|
|
|
|
121 n64 setfsgid sys_setfsgid
|
|
|
|
122 n64 getsid sys_getsid
|
|
|
|
123 n64 capget sys_capget
|
|
|
|
124 n64 capset sys_capset
|
|
|
|
125 n64 rt_sigpending sys_rt_sigpending
|
|
|
|
126 n64 rt_sigtimedwait sys_rt_sigtimedwait
|
|
|
|
127 n64 rt_sigqueueinfo sys_rt_sigqueueinfo
|
|
|
|
128 n64 rt_sigsuspend sys_rt_sigsuspend
|
|
|
|
129 n64 sigaltstack sys_sigaltstack
|
|
|
|
130 n64 utime sys_utime
|
|
|
|
131 n64 mknod sys_mknod
|
|
|
|
132 n64 personality sys_personality
|
|
|
|
133 n64 ustat sys_ustat
|
|
|
|
134 n64 statfs sys_statfs
|
|
|
|
135 n64 fstatfs sys_fstatfs
|
|
|
|
136 n64 sysfs sys_sysfs
|
|
|
|
137 n64 getpriority sys_getpriority
|
|
|
|
138 n64 setpriority sys_setpriority
|
|
|
|
139 n64 sched_setparam sys_sched_setparam
|
|
|
|
140 n64 sched_getparam sys_sched_getparam
|
|
|
|
141 n64 sched_setscheduler sys_sched_setscheduler
|
|
|
|
142 n64 sched_getscheduler sys_sched_getscheduler
|
|
|
|
143 n64 sched_get_priority_max sys_sched_get_priority_max
|
|
|
|
144 n64 sched_get_priority_min sys_sched_get_priority_min
|
|
|
|
145 n64 sched_rr_get_interval sys_sched_rr_get_interval
|
|
|
|
146 n64 mlock sys_mlock
|
|
|
|
147 n64 munlock sys_munlock
|
|
|
|
148 n64 mlockall sys_mlockall
|
|
|
|
149 n64 munlockall sys_munlockall
|
|
|
|
150 n64 vhangup sys_vhangup
|
|
|
|
151 n64 pivot_root sys_pivot_root
|
|
|
|
152 n64 _sysctl sys_ni_syscall
|
|
|
|
153 n64 prctl sys_prctl
|
|
|
|
154 n64 adjtimex sys_adjtimex
|
|
|
|
155 n64 setrlimit sys_setrlimit
|
|
|
|
156 n64 chroot sys_chroot
|
|
|
|
157 n64 sync sys_sync
|
|
|
|
158 n64 acct sys_acct
|
|
|
|
159 n64 settimeofday sys_settimeofday
|
|
|
|
160 n64 mount sys_mount
|
|
|
|
161 n64 umount2 sys_umount
|
|
|
|
162 n64 swapon sys_swapon
|
|
|
|
163 n64 swapoff sys_swapoff
|
|
|
|
164 n64 reboot sys_reboot
|
|
|
|
165 n64 sethostname sys_sethostname
|
|
|
|
166 n64 setdomainname sys_setdomainname
|
|
|
|
167 n64 create_module sys_ni_syscall
|
|
|
|
168 n64 init_module sys_init_module
|
|
|
|
169 n64 delete_module sys_delete_module
|
|
|
|
170 n64 get_kernel_syms sys_ni_syscall
|
|
|
|
171 n64 query_module sys_ni_syscall
|
|
|
|
172 n64 quotactl sys_quotactl
|
|
|
|
173 n64 nfsservctl sys_ni_syscall
|
|
|
|
174 n64 getpmsg sys_ni_syscall
|
|
|
|
175 n64 putpmsg sys_ni_syscall
|
|
|
|
176 n64 afs_syscall sys_ni_syscall
|
|
|
|
# 177 reserved for security
|
|
|
|
177 n64 reserved177 sys_ni_syscall
|
|
|
|
178 n64 gettid sys_gettid
|
|
|
|
179 n64 readahead sys_readahead
|
|
|
|
180 n64 setxattr sys_setxattr
|
|
|
|
181 n64 lsetxattr sys_lsetxattr
|
|
|
|
182 n64 fsetxattr sys_fsetxattr
|
|
|
|
183 n64 getxattr sys_getxattr
|
|
|
|
184 n64 lgetxattr sys_lgetxattr
|
|
|
|
185 n64 fgetxattr sys_fgetxattr
|
|
|
|
186 n64 listxattr sys_listxattr
|
|
|
|
187 n64 llistxattr sys_llistxattr
|
|
|
|
188 n64 flistxattr sys_flistxattr
|
|
|
|
189 n64 removexattr sys_removexattr
|
|
|
|
190 n64 lremovexattr sys_lremovexattr
|
|
|
|
191 n64 fremovexattr sys_fremovexattr
|
|
|
|
192 n64 tkill sys_tkill
|
|
|
|
193 n64 reserved193 sys_ni_syscall
|
|
|
|
194 n64 futex sys_futex
|
|
|
|
195 n64 sched_setaffinity sys_sched_setaffinity
|
|
|
|
196 n64 sched_getaffinity sys_sched_getaffinity
|
|
|
|
197 n64 cacheflush sys_cacheflush
|
|
|
|
198 n64 cachectl sys_cachectl
|
|
|
|
199 n64 sysmips __sys_sysmips
|
|
|
|
200 n64 io_setup sys_io_setup
|
|
|
|
201 n64 io_destroy sys_io_destroy
|
|
|
|
202 n64 io_getevents sys_io_getevents
|
|
|
|
203 n64 io_submit sys_io_submit
|
|
|
|
204 n64 io_cancel sys_io_cancel
|
|
|
|
205 n64 exit_group sys_exit_group
|
2023-07-10 18:51:24 +00:00
|
|
|
206 n64 lookup_dcookie sys_ni_syscall
|
2021-02-04 03:35:24 +00:00
|
|
|
207 n64 epoll_create sys_epoll_create
|
|
|
|
208 n64 epoll_ctl sys_epoll_ctl
|
|
|
|
209 n64 epoll_wait sys_epoll_wait
|
|
|
|
210 n64 remap_file_pages sys_remap_file_pages
|
|
|
|
211 n64 rt_sigreturn sys_rt_sigreturn
|
|
|
|
212 n64 set_tid_address sys_set_tid_address
|
|
|
|
213 n64 restart_syscall sys_restart_syscall
|
|
|
|
214 n64 semtimedop sys_semtimedop
|
|
|
|
215 n64 fadvise64 sys_fadvise64_64
|
|
|
|
216 n64 timer_create sys_timer_create
|
|
|
|
217 n64 timer_settime sys_timer_settime
|
|
|
|
218 n64 timer_gettime sys_timer_gettime
|
|
|
|
219 n64 timer_getoverrun sys_timer_getoverrun
|
|
|
|
220 n64 timer_delete sys_timer_delete
|
|
|
|
221 n64 clock_settime sys_clock_settime
|
|
|
|
222 n64 clock_gettime sys_clock_gettime
|
|
|
|
223 n64 clock_getres sys_clock_getres
|
|
|
|
224 n64 clock_nanosleep sys_clock_nanosleep
|
|
|
|
225 n64 tgkill sys_tgkill
|
|
|
|
226 n64 utimes sys_utimes
|
|
|
|
227 n64 mbind sys_mbind
|
|
|
|
228 n64 get_mempolicy sys_get_mempolicy
|
|
|
|
229 n64 set_mempolicy sys_set_mempolicy
|
|
|
|
230 n64 mq_open sys_mq_open
|
|
|
|
231 n64 mq_unlink sys_mq_unlink
|
|
|
|
232 n64 mq_timedsend sys_mq_timedsend
|
|
|
|
233 n64 mq_timedreceive sys_mq_timedreceive
|
|
|
|
234 n64 mq_notify sys_mq_notify
|
|
|
|
235 n64 mq_getsetattr sys_mq_getsetattr
|
|
|
|
236 n64 vserver sys_ni_syscall
|
|
|
|
237 n64 waitid sys_waitid
|
|
|
|
# 238 was sys_setaltroot
|
|
|
|
239 n64 add_key sys_add_key
|
|
|
|
240 n64 request_key sys_request_key
|
|
|
|
241 n64 keyctl sys_keyctl
|
|
|
|
242 n64 set_thread_area sys_set_thread_area
|
|
|
|
243 n64 inotify_init sys_inotify_init
|
|
|
|
244 n64 inotify_add_watch sys_inotify_add_watch
|
|
|
|
245 n64 inotify_rm_watch sys_inotify_rm_watch
|
|
|
|
246 n64 migrate_pages sys_migrate_pages
|
|
|
|
247 n64 openat sys_openat
|
|
|
|
248 n64 mkdirat sys_mkdirat
|
|
|
|
249 n64 mknodat sys_mknodat
|
|
|
|
250 n64 fchownat sys_fchownat
|
|
|
|
251 n64 futimesat sys_futimesat
|
|
|
|
252 n64 newfstatat sys_newfstatat
|
|
|
|
253 n64 unlinkat sys_unlinkat
|
|
|
|
254 n64 renameat sys_renameat
|
|
|
|
255 n64 linkat sys_linkat
|
|
|
|
256 n64 symlinkat sys_symlinkat
|
|
|
|
257 n64 readlinkat sys_readlinkat
|
|
|
|
258 n64 fchmodat sys_fchmodat
|
|
|
|
259 n64 faccessat sys_faccessat
|
|
|
|
260 n64 pselect6 sys_pselect6
|
|
|
|
261 n64 ppoll sys_ppoll
|
|
|
|
262 n64 unshare sys_unshare
|
|
|
|
263 n64 splice sys_splice
|
|
|
|
264 n64 sync_file_range sys_sync_file_range
|
|
|
|
265 n64 tee sys_tee
|
|
|
|
266 n64 vmsplice sys_vmsplice
|
|
|
|
267 n64 move_pages sys_move_pages
|
|
|
|
268 n64 set_robust_list sys_set_robust_list
|
|
|
|
269 n64 get_robust_list sys_get_robust_list
|
|
|
|
270 n64 kexec_load sys_kexec_load
|
|
|
|
271 n64 getcpu sys_getcpu
|
|
|
|
272 n64 epoll_pwait sys_epoll_pwait
|
|
|
|
273 n64 ioprio_set sys_ioprio_set
|
|
|
|
274 n64 ioprio_get sys_ioprio_get
|
|
|
|
275 n64 utimensat sys_utimensat
|
|
|
|
276 n64 signalfd sys_signalfd
|
|
|
|
277 n64 timerfd sys_ni_syscall
|
|
|
|
278 n64 eventfd sys_eventfd
|
|
|
|
279 n64 fallocate sys_fallocate
|
|
|
|
280 n64 timerfd_create sys_timerfd_create
|
|
|
|
281 n64 timerfd_gettime sys_timerfd_gettime
|
|
|
|
282 n64 timerfd_settime sys_timerfd_settime
|
|
|
|
283 n64 signalfd4 sys_signalfd4
|
|
|
|
284 n64 eventfd2 sys_eventfd2
|
|
|
|
285 n64 epoll_create1 sys_epoll_create1
|
|
|
|
286 n64 dup3 sys_dup3
|
|
|
|
287 n64 pipe2 sys_pipe2
|
|
|
|
288 n64 inotify_init1 sys_inotify_init1
|
|
|
|
289 n64 preadv sys_preadv
|
|
|
|
290 n64 pwritev sys_pwritev
|
|
|
|
291 n64 rt_tgsigqueueinfo sys_rt_tgsigqueueinfo
|
|
|
|
292 n64 perf_event_open sys_perf_event_open
|
|
|
|
293 n64 accept4 sys_accept4
|
|
|
|
294 n64 recvmmsg sys_recvmmsg
|
|
|
|
295 n64 fanotify_init sys_fanotify_init
|
|
|
|
296 n64 fanotify_mark sys_fanotify_mark
|
|
|
|
297 n64 prlimit64 sys_prlimit64
|
|
|
|
298 n64 name_to_handle_at sys_name_to_handle_at
|
|
|
|
299 n64 open_by_handle_at sys_open_by_handle_at
|
|
|
|
300 n64 clock_adjtime sys_clock_adjtime
|
|
|
|
301 n64 syncfs sys_syncfs
|
|
|
|
302 n64 sendmmsg sys_sendmmsg
|
|
|
|
303 n64 setns sys_setns
|
|
|
|
304 n64 process_vm_readv sys_process_vm_readv
|
|
|
|
305 n64 process_vm_writev sys_process_vm_writev
|
|
|
|
306 n64 kcmp sys_kcmp
|
|
|
|
307 n64 finit_module sys_finit_module
|
|
|
|
308 n64 getdents64 sys_getdents64
|
|
|
|
309 n64 sched_setattr sys_sched_setattr
|
|
|
|
310 n64 sched_getattr sys_sched_getattr
|
|
|
|
311 n64 renameat2 sys_renameat2
|
|
|
|
312 n64 seccomp sys_seccomp
|
|
|
|
313 n64 getrandom sys_getrandom
|
|
|
|
314 n64 memfd_create sys_memfd_create
|
|
|
|
315 n64 bpf sys_bpf
|
|
|
|
316 n64 execveat sys_execveat
|
|
|
|
317 n64 userfaultfd sys_userfaultfd
|
|
|
|
318 n64 membarrier sys_membarrier
|
|
|
|
319 n64 mlock2 sys_mlock2
|
|
|
|
320 n64 copy_file_range sys_copy_file_range
|
|
|
|
321 n64 preadv2 sys_preadv2
|
|
|
|
322 n64 pwritev2 sys_pwritev2
|
|
|
|
323 n64 pkey_mprotect sys_pkey_mprotect
|
|
|
|
324 n64 pkey_alloc sys_pkey_alloc
|
|
|
|
325 n64 pkey_free sys_pkey_free
|
|
|
|
326 n64 statx sys_statx
|
|
|
|
327 n64 rseq sys_rseq
|
|
|
|
328 n64 io_pgetevents sys_io_pgetevents
|
|
|
|
# 329 through 423 are reserved to sync up with other architectures
|
|
|
|
424 n64 pidfd_send_signal sys_pidfd_send_signal
|
|
|
|
425 n64 io_uring_setup sys_io_uring_setup
|
|
|
|
426 n64 io_uring_enter sys_io_uring_enter
|
|
|
|
427 n64 io_uring_register sys_io_uring_register
|
|
|
|
428 n64 open_tree sys_open_tree
|
|
|
|
429 n64 move_mount sys_move_mount
|
|
|
|
430 n64 fsopen sys_fsopen
|
|
|
|
431 n64 fsconfig sys_fsconfig
|
|
|
|
432 n64 fsmount sys_fsmount
|
|
|
|
433 n64 fspick sys_fspick
|
|
|
|
434 n64 pidfd_open sys_pidfd_open
|
|
|
|
435 n64 clone3 __sys_clone3
|
|
|
|
436 n64 close_range sys_close_range
|
|
|
|
437 n64 openat2 sys_openat2
|
|
|
|
438 n64 pidfd_getfd sys_pidfd_getfd
|
|
|
|
439 n64 faccessat2 sys_faccessat2
|
|
|
|
440 n64 process_madvise sys_process_madvise
|
|
|
|
441 n64 epoll_pwait2 sys_epoll_pwait2
|
2021-05-09 12:55:30 +00:00
|
|
|
442 n64 mount_setattr sys_mount_setattr
|
2021-05-09 12:55:30 +00:00
|
|
|
443 n64 quotactl_fd sys_quotactl_fd
|
2021-05-09 12:55:30 +00:00
|
|
|
444 n64 landlock_create_ruleset sys_landlock_create_ruleset
|
|
|
|
445 n64 landlock_add_rule sys_landlock_add_rule
|
|
|
|
446 n64 landlock_restrict_self sys_landlock_restrict_self
|
2021-09-08 19:09:08 +00:00
|
|
|
# 447 reserved for memfd_secret
|
|
|
|
448 n64 process_mrelease sys_process_mrelease
|
tools headers UAPI: Sync MIPS syscall table file changed by new futex_waitv syscall
To pick the changes in these csets:
b3ff2881ba18b852 ("MIPS: syscalls: Wire up futex_waitv syscall")
That add support for this new syscall in tools such as 'perf trace'.
For instance, this is now possible (adapted from the x86_64 test output):
# perf trace -e futex_waitv
^C#
# perf trace -v -e futex_waitv
event qualifier tracepoint filter: (common_pid != 807333 && common_pid != 3564) && (id == 449)
^C#
# perf trace -v -e futex* --max-events 10
event qualifier tracepoint filter: (common_pid != 812168 && common_pid != 3564) && (id == 202 || id == 449)
mmap size 528384B
? ( ): Timer/219310 ... [continued]: futex()) = -1 ETIMEDOUT (Connection timed out)
0.012 ( 0.002 ms): Timer/219310 futex(uaddr: 0x7fd0b152d3c8, op: WAKE|PRIVATE_FLAG, val: 1) = 0
0.024 ( 0.060 ms): Timer/219310 futex(uaddr: 0x7fd0b152d420, op: WAIT_BITSET|PRIVATE_FLAG, utime: 0x7fd0b1657840, val3: MATCH_ANY) = 0
0.086 ( 0.001 ms): Timer/219310 futex(uaddr: 0x7fd0b152d3c8, op: WAKE|PRIVATE_FLAG, val: 1) = 0
0.088 ( ): Timer/219310 futex(uaddr: 0x7fd0b152d424, op: WAIT_BITSET|PRIVATE_FLAG, utime: 0x7fd0b1657840, val3: MATCH_ANY) ...
0.075 ( 0.005 ms): Web Content/219299 futex(uaddr: 0x7fd0b152d420, op: WAKE|PRIVATE_FLAG, val: 1) = 1
0.169 ( 0.004 ms): Web Content/219299 futex(uaddr: 0x7fd0b152d424, op: WAKE|PRIVATE_FLAG, val: 1) = 1
0.088 ( 0.089 ms): Timer/219310 ... [continued]: futex()) = 0
0.179 ( 0.001 ms): Timer/219310 futex(uaddr: 0x7fd0b152d3c8, op: WAKE|PRIVATE_FLAG, val: 1) = 0
0.181 ( ): Timer/219310 futex(uaddr: 0x7fd0b152d420, op: WAIT_BITSET|PRIVATE_FLAG, utime: 0x7fd0b1657840, val3: MATCH_ANY) ...
#
That is the filter expression attached to the raw_syscalls:sys_{enter,exit}
tracepoints.
$ grep futex_waitv tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl
449 n64 futex_waitv sys_futex_waitv
$
This addresses these perf build warnings:
Warning: Kernel ABI header at 'tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl' differs from latest version at 'arch/mips/kernel/syscalls/syscall_n64.tbl'
diff -u tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl arch/mips/kernel/syscalls/syscall_n64.tbl
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Wang Haojun <jiangliuer01@gmail.com>
Link: https://lore.kernel.org/lkml/YZZRxuIyvSGLZhM4@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-09-08 19:09:08 +00:00
|
|
|
449 n64 futex_waitv sys_futex_waitv
|
2021-09-08 19:09:08 +00:00
|
|
|
450 common set_mempolicy_home_node sys_set_mempolicy_home_node
|
tools headers UAPI: Sync files changed by new cachestat syscall with the kernel sources
To pick the changes in these csets:
cf264e1329fb0307 ("cachestat: implement cachestat syscall")
That add support for this new syscall in tools such as 'perf trace'.
For instance, this is now possible:
# perf trace -e cachestat
^C[root@five ~]#
# perf trace -v -e cachestat
Using CPUID AuthenticAMD-25-21-0
event qualifier tracepoint filter: (common_pid != 3163687 && common_pid != 3147) && (id == 451)
mmap size 528384B
^C[root@five ~]
# perf trace -v -e *stat* --max-events=10
Using CPUID AuthenticAMD-25-21-0
event qualifier tracepoint filter: (common_pid != 3163713 && common_pid != 3147) && (id == 4 || id == 5 || id == 6 || id == 136 || id == 137 || id == 138 || id == 262 || id == 332 || id == 451)
mmap size 528384B
0.000 ( 0.009 ms): Cache2 I/O/4544 statfs(pathname: 0x45635288, buf: 0x7f8745725b60) = 0
0.012 ( 0.003 ms): Cache2 I/O/4544 newfstatat(dfd: CWD, filename: 0x45635288, statbuf: 0x7f874569d250) = 0
0.036 ( 0.002 ms): Cache2 I/O/4544 newfstatat(dfd: 138, filename: 0x541b7093, statbuf: 0x7f87457256f0, flag: 4096) = 0
0.372 ( 0.006 ms): Cache2 I/O/4544 statfs(pathname: 0x45635288, buf: 0x7f8745725b10) = 0
0.379 ( 0.003 ms): Cache2 I/O/4544 newfstatat(dfd: CWD, filename: 0x45635288, statbuf: 0x7f874569d250) = 0
0.390 ( 0.002 ms): Cache2 I/O/4544 newfstatat(dfd: 138, filename: 0x541b7093, statbuf: 0x7f87457256a0, flag: 4096) = 0
0.609 ( 0.005 ms): Cache2 I/O/4544 statfs(pathname: 0x45635288, buf: 0x7f8745725b60) = 0
0.615 ( 0.003 ms): Cache2 I/O/4544 newfstatat(dfd: CWD, filename: 0x45635288, statbuf: 0x7f874569d250) = 0
0.625 ( 0.002 ms): Cache2 I/O/4544 newfstatat(dfd: 138, filename: 0x541b7093, statbuf: 0x7f87457256f0, flag: 4096) = 0
0.826 ( 0.005 ms): Cache2 I/O/4544 statfs(pathname: 0x45635288, buf: 0x7f8745725b10) = 0
#
That is the filter expression attached to the raw_syscalls:sys_{enter,exit}
tracepoints.
$ find tools/perf/arch/ -name "syscall*tbl" | xargs grep -w sys_cachestat
tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl:451 n64 cachestat sys_cachestat
tools/perf/arch/powerpc/entry/syscalls/syscall.tbl:451 common cachestat sys_cachestat
tools/perf/arch/s390/entry/syscalls/syscall.tbl:451 common cachestat sys_cachestat sys_cachestat
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl:451 common cachestat sys_cachestat
$
$ grep -w cachestat /tmp/build/perf-tools/arch/x86/include/generated/asm/syscalls_64.c
[451] = "cachestat",
$
This addresses these perf build warnings:
Warning: Kernel ABI header differences:
diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h
diff -u tools/include/uapi/linux/mman.h include/uapi/linux/mman.h
diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl
diff -u tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl
diff -u tools/perf/arch/s390/entry/syscalls/syscall.tbl arch/s390/kernel/syscalls/syscall.tbl
diff -u tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl arch/mips/kernel/syscalls/syscall_n64.tbl
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Nhat Pham <nphamcs@gmail.com>
Link: https://lore.kernel.org/lkml/ZK1pVBJpbjujJNJW@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2023-07-11 13:11:12 +00:00
|
|
|
451 n64 cachestat sys_cachestat
|
tools headers UAPI: Sync files changed by new fchmodat2 and map_shadow_stack syscalls with the kernel sources
To pick the changes in these csets:
c35559f94ebc3e3b ("x86/shstk: Introduce map_shadow_stack syscall")
78252deb023cf087 ("arch: Register fchmodat2, usually as syscall 452")
That add support for this new syscall in tools such as 'perf trace'.
For instance, this is now possible:
# perf trace -v -e fchmodat*,map_shadow_stack --max-events=4
Using CPUID AuthenticAMD-25-21-0
Reusing "openat" BPF sys_enter augmenter for "fchmodat"
event qualifier tracepoint filter: (common_pid != 3499340 && common_pid != 11259) && (id == 268 || id == 452 || id == 453)
^C#
And it'll work as with other syscalls, for instance openat:
# perf trace -e openat* --max-events=4
0.000 ( 0.015 ms): systemd-oomd/1150 openat(dfd: CWD, filename: "/proc/meminfo", flags: RDONLY|CLOEXEC) = 11
0.068 ( 0.019 ms): systemd-oomd/1150 openat(dfd: CWD, filename: "/sys/fs/cgroup/user.slice/user-1001.slice/user@1001.service/memory.pressure", flags: RDONLY|CLOEXEC) = 11
0.119 ( 0.008 ms): systemd-oomd/1150 openat(dfd: CWD, filename: "/sys/fs/cgroup/user.slice/user-1001.slice/user@1001.service/memory.current", flags: RDONLY|CLOEXEC) = 11
0.138 ( 0.006 ms): systemd-oomd/1150 openat(dfd: CWD, filename: "/sys/fs/cgroup/user.slice/user-1001.slice/user@1001.service/memory.min", flags: RDONLY|CLOEXEC) = 11
#
That is the filter expression attached to the raw_syscalls:sys_{enter,exit}
tracepoints.
$ find tools/perf/arch/ -name "syscall*tbl" | xargs grep -E fchmodat\|sys_map_shadow_stack
tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl:258 n64 fchmodat sys_fchmodat
tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl:452 n64 fchmodat2 sys_fchmodat2
tools/perf/arch/powerpc/entry/syscalls/syscall.tbl:297 common fchmodat sys_fchmodat
tools/perf/arch/powerpc/entry/syscalls/syscall.tbl:452 common fchmodat2 sys_fchmodat2
tools/perf/arch/s390/entry/syscalls/syscall.tbl:299 common fchmodat sys_fchmodat sys_fchmodat
tools/perf/arch/s390/entry/syscalls/syscall.tbl:452 common fchmodat2 sys_fchmodat2 sys_fchmodat2
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl:268 common fchmodat sys_fchmodat
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl:452 common fchmodat2 sys_fchmodat2
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl:453 64 map_shadow_stack sys_map_shadow_stack
$
$ grep -Ew map_shadow_stack\|fchmodat2 /tmp/build/perf-tools/arch/x86/include/generated/asm/syscalls_64.c
[452] = "fchmodat2",
[453] = "map_shadow_stack",
$
This addresses these perf build warnings:
Warning: Kernel ABI header differences:
diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h
diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl
diff -u tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl
diff -u tools/perf/arch/s390/entry/syscalls/syscall.tbl arch/s390/kernel/syscalls/syscall.tbl
diff -u tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl arch/mips/kernel/syscalls/syscall_n64.tbl
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Rick Edgecombe <rick.p.edgecombe@intel.com>
Link: https://lore.kernel.org/lkml/ZP8bE7aXDBu%2Fdrak@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2023-09-11 13:34:00 +00:00
|
|
|
452 n64 fchmodat2 sys_fchmodat2
|
tools/perf: Update tools's copy of mips syscall table
tldr; Just FYI, I'm carrying this on the perf tools tree.
Full explanation:
There used to be no copies, with tools/ code using kernel headers
directly. From time to time tools/perf/ broke due to legitimate kernel
hacking. At some point Linus complained about such direct usage. Then we
adopted the current model.
The way these headers are used in perf are not restricted to just
including them to compile something.
There are sometimes used in scripts that convert defines into string
tables, etc, so some change may break one of these scripts, or new MSRs
may use some different #define pattern, etc.
E.g.:
$ ls -1 tools/perf/trace/beauty/*.sh | head -5
tools/perf/trace/beauty/arch_errno_names.sh
tools/perf/trace/beauty/drm_ioctl.sh
tools/perf/trace/beauty/fadvise.sh
tools/perf/trace/beauty/fsconfig.sh
tools/perf/trace/beauty/fsmount.sh
$
$ tools/perf/trace/beauty/fadvise.sh
static const char *fadvise_advices[] = {
[0] = "NORMAL",
[1] = "RANDOM",
[2] = "SEQUENTIAL",
[3] = "WILLNEED",
[4] = "DONTNEED",
[5] = "NOREUSE",
};
$
The tools/perf/check-headers.sh script, part of the tools/ build
process, points out changes in the original files.
So its important not to touch the copies in tools/ when doing changes in
the original kernel headers, that will be done later, when
check-headers.sh inform about the change to the perf tools hackers.
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-mips@vger.kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20231121225650.390246-14-namhyung@kernel.org
2023-11-21 22:56:49 +00:00
|
|
|
453 n64 map_shadow_stack sys_map_shadow_stack
|
|
|
|
454 n64 futex_wake sys_futex_wake
|
|
|
|
455 n64 futex_wait sys_futex_wait
|
|
|
|
456 n64 futex_requeue sys_futex_requeue
|
lsm/stable-6.8 PR 20240105
-----BEGIN PGP SIGNATURE-----
iQJIBAABCAAyFiEES0KozwfymdVUl37v6iDy2pc3iXMFAmWYKUIUHHBhdWxAcGF1
bC1tb29yZS5jb20ACgkQ6iDy2pc3iXNyHw/+IKnqL1MZ5QS+/HtSzi4jCL47N9yZ
OHLol6XswyEGHH9myKPPGnT5lVA93v98v4ty2mws7EJUSGZQQUntYBPbU9Gi40+B
XDzYSRocoj96sdlKeOJMgaWo3NBRD9HYSoGPDNWZixy6m+bLPk/Dqhn3FabKf1lo
2qQSmstvChFRmVNkmgaQnBCAtWVqla4EJEL0EKX6cspHbuzRNTeJdTPn6Q/zOUVL
O2znOZuEtSVpYS7yg3uJT0hHD8H0GnIciAcDAhyPSBL5Uk5l6gwJiACcdRfLRbgp
QM5Z4qUFdKljV5XBCzYnfhhrx1df08h1SG84El8UK8HgTTfOZfYmawByJRWNJSQE
TdCmtyyvEbfb61CKBFVwD7Tzb9/y8WgcY5N3Un8uCQqRzFIO+6cghHri5NrVhifp
nPFlP4klxLHh3d7ZVekLmCMHbpaacRyJKwLy+f/nwbBEID47jpPkvZFIpbalat+r
QaKRBNWdTeV+GZ+Yu0uWsI029aQnpcO1kAnGg09fl6b/dsmxeKOVWebir25AzQ++
a702S8HRmj80X+VnXHU9a64XeGtBH7Nq0vu0lGHQPgwhSx/9P6/qICEPwsIriRjR
I9OulWt4OBPDtlsonHFgDs+lbnd0Z0GJUwYT8e9pjRDMxijVO9lhAXyglVRmuNR8
to2ByKP5BO+Vh8Y=
=Py+n
-----END PGP SIGNATURE-----
Merge tag 'lsm-pr-20240105' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm
Pull security module updates from Paul Moore:
- Add three new syscalls: lsm_list_modules(), lsm_get_self_attr(), and
lsm_set_self_attr().
The first syscall simply lists the LSMs enabled, while the second and
third get and set the current process' LSM attributes. Yes, these
syscalls may provide similar functionality to what can be found under
/proc or /sys, but they were designed to support multiple,
simultaneaous (stacked) LSMs from the start as opposed to the current
/proc based solutions which were created at a time when only one LSM
was allowed to be active at a given time.
We have spent considerable time discussing ways to extend the
existing /proc interfaces to support multiple, simultaneaous LSMs and
even our best ideas have been far too ugly to support as a kernel
API; after +20 years in the kernel, I felt the LSM layer had
established itself enough to justify a handful of syscalls.
Support amongst the individual LSM developers has been nearly
unanimous, with a single objection coming from Tetsuo (TOMOYO) as he
is worried that the LSM_ID_XXX token concept will make it more
difficult for out-of-tree LSMs to survive. Several members of the LSM
community have demonstrated the ability for out-of-tree LSMs to
continue to exist by picking high/unused LSM_ID values as well as
pointing out that many kernel APIs rely on integer identifiers, e.g.
syscalls (!), but unfortunately Tetsuo's objections remain.
My personal opinion is that while I have no interest in penalizing
out-of-tree LSMs, I'm not going to penalize in-tree development to
support out-of-tree development, and I view this as a necessary step
forward to support the push for expanded LSM stacking and reduce our
reliance on /proc and /sys which has occassionally been problematic
for some container users. Finally, we have included the linux-api
folks on (all?) recent revisions of the patchset and addressed all of
their concerns.
- Add a new security_file_ioctl_compat() LSM hook to handle the 32-bit
ioctls on 64-bit systems problem.
This patch includes support for all of the existing LSMs which
provide ioctl hooks, although it turns out only SELinux actually
cares about the individual ioctls. It is worth noting that while
Casey (Smack) and Tetsuo (TOMOYO) did not give explicit ACKs to this
patch, they did both indicate they are okay with the changes.
- Fix a potential memory leak in the CALIPSO code when IPv6 is disabled
at boot.
While it's good that we are fixing this, I doubt this is something
users are seeing in the wild as you need to both disable IPv6 and
then attempt to configure IPv6 labeled networking via
NetLabel/CALIPSO; that just doesn't make much sense.
Normally this would go through netdev, but Jakub asked me to take
this patch and of all the trees I maintain, the LSM tree seemed like
the best fit.
- Update the LSM MAINTAINERS entry with additional information about
our process docs, patchwork, bug reporting, etc.
I also noticed that the Lockdown LSM is missing a dedicated
MAINTAINERS entry so I've added that to the pull request. I've been
working with one of the major Lockdown authors/contributors to see if
they are willing to step up and assume a Lockdown maintainer role;
hopefully that will happen soon, but in the meantime I'll continue to
look after it.
- Add a handful of mailmap entries for Serge Hallyn and myself.
* tag 'lsm-pr-20240105' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm: (27 commits)
lsm: new security_file_ioctl_compat() hook
lsm: Add a __counted_by() annotation to lsm_ctx.ctx
calipso: fix memory leak in netlbl_calipso_add_pass()
selftests: remove the LSM_ID_IMA check in lsm/lsm_list_modules_test
MAINTAINERS: add an entry for the lockdown LSM
MAINTAINERS: update the LSM entry
mailmap: add entries for Serge Hallyn's dead accounts
mailmap: update/replace my old email addresses
lsm: mark the lsm_id variables are marked as static
lsm: convert security_setselfattr() to use memdup_user()
lsm: align based on pointer length in lsm_fill_user_ctx()
lsm: consolidate buffer size handling into lsm_fill_user_ctx()
lsm: correct error codes in security_getselfattr()
lsm: cleanup the size counters in security_getselfattr()
lsm: don't yet account for IMA in LSM_CONFIG_COUNT calculation
lsm: drop LSM_ID_IMA
LSM: selftests for Linux Security Module syscalls
SELinux: Add selfattr hooks
AppArmor: Add selfattr hooks
Smack: implement setselfattr and getselfattr hooks
...
2024-01-09 20:57:46 +00:00
|
|
|
457 n64 statmount sys_statmount
|
|
|
|
458 n64 listmount sys_listmount
|
|
|
|
459 n64 lsm_get_self_attr sys_lsm_get_self_attr
|
|
|
|
460 n64 lsm_set_self_attr sys_lsm_set_self_attr
|
|
|
|
461 n64 lsm_list_modules sys_lsm_list_modules
|