1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Sanitizers internally use some syscalls which non-SFI NaCl disallows.
6 #if !defined(ADDRESS_SANITIZER) && !defined(THREAD_SANITIZER) && \
7 !defined(MEMORY_SANITIZER) && !defined(LEAK_SANITIZER)
9 #include "components/nacl/loader/nonsfi/nonsfi_sandbox.h"
11 #include <sys/syscall.h>
14 #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h"
15 #include "sandbox/linux/seccomp-bpf/bpf_tests.h"
19 // Test cases in this file just make sure not-whitelisted syscalls
20 // are appropriately disallowed. They should raise SIGSYS regardless
21 // of arguments. We always pass five zeros not to pass uninitialized
22 // values to syscalls.
23 #define RESTRICT_SYSCALL_DEATH_TEST_IMPL(name, sysno) \
24 BPF_DEATH_TEST_C(NaClNonSfiSandboxSIGSYSTest, \
26 DEATH_MESSAGE(sandbox::GetErrorMessageContentForTests()), \
27 nacl::nonsfi::NaClNonSfiBPFSandboxPolicy) { \
28 syscall(sysno, 0, 0, 0, 0, 0, 0); \
31 #define RESTRICT_SYSCALL_DEATH_TEST(name) \
32 RESTRICT_SYSCALL_DEATH_TEST_IMPL(name, __NR_ ## name)
34 #define RESTRICT_ARM_SYSCALL_DEATH_TEST(name) \
35 RESTRICT_SYSCALL_DEATH_TEST_IMPL(ARM_ ## name, __ARM_NR_ ## name)
37 #if defined(__i386__) || defined(__arm__)
38 RESTRICT_SYSCALL_DEATH_TEST(_newselect
);
40 RESTRICT_SYSCALL_DEATH_TEST(_sysctl
);
41 #if defined(__x86_64__) || defined(__arm__)
42 RESTRICT_SYSCALL_DEATH_TEST(accept
);
44 #if defined(__x86_64__) || defined(__arm__)
45 RESTRICT_SYSCALL_DEATH_TEST(accept4
);
47 RESTRICT_SYSCALL_DEATH_TEST(access
);
48 RESTRICT_SYSCALL_DEATH_TEST(acct
);
49 RESTRICT_SYSCALL_DEATH_TEST(add_key
);
50 RESTRICT_SYSCALL_DEATH_TEST(adjtimex
);
51 #if defined(__i386__) || defined(__x86_64__)
52 RESTRICT_SYSCALL_DEATH_TEST(afs_syscall
);
54 #if defined(__i386__) || defined(__x86_64__)
55 RESTRICT_SYSCALL_DEATH_TEST(alarm
);
57 #if defined(__x86_64__)
58 RESTRICT_SYSCALL_DEATH_TEST(arch_prctl
);
61 RESTRICT_SYSCALL_DEATH_TEST(arm_fadvise64_64
);
63 #if defined(__i386__) || defined(__arm__)
64 RESTRICT_SYSCALL_DEATH_TEST(bdflush
);
66 #if defined(__x86_64__) || defined(__arm__)
67 RESTRICT_SYSCALL_DEATH_TEST(bind
);
70 RESTRICT_SYSCALL_DEATH_TEST(break);
72 RESTRICT_SYSCALL_DEATH_TEST(capget
);
73 RESTRICT_SYSCALL_DEATH_TEST(capset
);
74 RESTRICT_SYSCALL_DEATH_TEST(chdir
);
75 RESTRICT_SYSCALL_DEATH_TEST(chmod
);
76 RESTRICT_SYSCALL_DEATH_TEST(chown
);
77 #if defined(__i386__) || defined(__arm__)
78 RESTRICT_SYSCALL_DEATH_TEST(chown32
);
80 RESTRICT_SYSCALL_DEATH_TEST(chroot
);
81 RESTRICT_SYSCALL_DEATH_TEST(clock_adjtime
);
82 RESTRICT_SYSCALL_DEATH_TEST(clock_nanosleep
);
83 RESTRICT_SYSCALL_DEATH_TEST(clock_settime
);
84 #if defined(__x86_64__) || defined(__arm__)
85 RESTRICT_SYSCALL_DEATH_TEST(connect
);
87 RESTRICT_SYSCALL_DEATH_TEST(creat
);
88 #if defined(__i386__) || defined(__x86_64__)
89 RESTRICT_SYSCALL_DEATH_TEST(create_module
);
91 RESTRICT_SYSCALL_DEATH_TEST(delete_module
);
92 RESTRICT_SYSCALL_DEATH_TEST(dup3
);
93 RESTRICT_SYSCALL_DEATH_TEST(epoll_create1
);
94 RESTRICT_SYSCALL_DEATH_TEST(epoll_ctl
);
95 #if defined(__x86_64__)
96 RESTRICT_SYSCALL_DEATH_TEST(epoll_ctl_old
);
98 RESTRICT_SYSCALL_DEATH_TEST(epoll_pwait
);
99 RESTRICT_SYSCALL_DEATH_TEST(epoll_wait
);
100 #if defined(__x86_64__)
101 RESTRICT_SYSCALL_DEATH_TEST(epoll_wait_old
);
103 RESTRICT_SYSCALL_DEATH_TEST(eventfd
);
104 RESTRICT_SYSCALL_DEATH_TEST(eventfd2
);
105 RESTRICT_SYSCALL_DEATH_TEST(execve
);
106 RESTRICT_SYSCALL_DEATH_TEST(faccessat
);
107 #if defined(__i386__) || defined(__x86_64__)
108 RESTRICT_SYSCALL_DEATH_TEST(fadvise64
);
110 #if defined(__i386__)
111 RESTRICT_SYSCALL_DEATH_TEST(fadvise64_64
);
113 RESTRICT_SYSCALL_DEATH_TEST(fallocate
);
114 RESTRICT_SYSCALL_DEATH_TEST(fanotify_init
);
115 RESTRICT_SYSCALL_DEATH_TEST(fanotify_mark
);
116 RESTRICT_SYSCALL_DEATH_TEST(fchdir
);
117 RESTRICT_SYSCALL_DEATH_TEST(fchmod
);
118 RESTRICT_SYSCALL_DEATH_TEST(fchmodat
);
119 RESTRICT_SYSCALL_DEATH_TEST(fchown
);
120 #if defined(__i386__) || defined(__arm__)
121 RESTRICT_SYSCALL_DEATH_TEST(fchown32
);
123 RESTRICT_SYSCALL_DEATH_TEST(fchownat
);
124 #if defined(__i386__) || defined(__arm__)
125 RESTRICT_SYSCALL_DEATH_TEST(fcntl
);
127 RESTRICT_SYSCALL_DEATH_TEST(fdatasync
);
128 RESTRICT_SYSCALL_DEATH_TEST(fgetxattr
);
129 RESTRICT_SYSCALL_DEATH_TEST(flistxattr
);
130 RESTRICT_SYSCALL_DEATH_TEST(flock
);
131 RESTRICT_SYSCALL_DEATH_TEST(fork
);
132 RESTRICT_SYSCALL_DEATH_TEST(fremovexattr
);
133 RESTRICT_SYSCALL_DEATH_TEST(fsetxattr
);
134 #if defined(__i386__) || defined(__arm__)
135 RESTRICT_SYSCALL_DEATH_TEST(fstat
);
137 #if defined(__i386__) || defined(__arm__)
138 RESTRICT_SYSCALL_DEATH_TEST(fstatat64
);
140 RESTRICT_SYSCALL_DEATH_TEST(fstatfs
);
141 #if defined(__i386__) || defined(__arm__)
142 RESTRICT_SYSCALL_DEATH_TEST(fstatfs64
);
144 RESTRICT_SYSCALL_DEATH_TEST(fsync
);
145 #if defined(__i386__)
146 RESTRICT_SYSCALL_DEATH_TEST(ftime
);
148 RESTRICT_SYSCALL_DEATH_TEST(ftruncate
);
149 #if defined(__i386__) || defined(__arm__)
150 RESTRICT_SYSCALL_DEATH_TEST(ftruncate64
);
152 RESTRICT_SYSCALL_DEATH_TEST(futimesat
);
153 #if defined(__i386__) || defined(__x86_64__)
154 RESTRICT_SYSCALL_DEATH_TEST(get_kernel_syms
);
156 RESTRICT_SYSCALL_DEATH_TEST(get_mempolicy
);
157 RESTRICT_SYSCALL_DEATH_TEST(get_robust_list
);
158 #if defined(__i386__) || defined(__x86_64__)
159 RESTRICT_SYSCALL_DEATH_TEST(get_thread_area
);
161 RESTRICT_SYSCALL_DEATH_TEST(getcpu
);
162 RESTRICT_SYSCALL_DEATH_TEST(getcwd
);
163 RESTRICT_SYSCALL_DEATH_TEST(getdents
);
164 RESTRICT_SYSCALL_DEATH_TEST(getdents64
);
165 RESTRICT_SYSCALL_DEATH_TEST(getgroups
);
166 #if defined(__i386__) || defined(__arm__)
167 RESTRICT_SYSCALL_DEATH_TEST(getgroups32
);
169 RESTRICT_SYSCALL_DEATH_TEST(getitimer
);
170 #if defined(__x86_64__) || defined(__arm__)
171 RESTRICT_SYSCALL_DEATH_TEST(getpeername
);
173 RESTRICT_SYSCALL_DEATH_TEST(getpgid
);
174 RESTRICT_SYSCALL_DEATH_TEST(getpgrp
);
175 RESTRICT_SYSCALL_DEATH_TEST(getpid
);
176 #if defined(__i386__) || defined(__x86_64__)
177 RESTRICT_SYSCALL_DEATH_TEST(getpmsg
);
179 RESTRICT_SYSCALL_DEATH_TEST(getppid
);
180 RESTRICT_SYSCALL_DEATH_TEST(getpriority
);
181 RESTRICT_SYSCALL_DEATH_TEST(getresgid
);
182 #if defined(__i386__) || defined(__arm__)
183 RESTRICT_SYSCALL_DEATH_TEST(getresgid32
);
185 RESTRICT_SYSCALL_DEATH_TEST(getresuid
);
186 #if defined(__i386__) || defined(__arm__)
187 RESTRICT_SYSCALL_DEATH_TEST(getresuid32
);
189 #if defined(__i386__) || defined(__x86_64__)
190 RESTRICT_SYSCALL_DEATH_TEST(getrlimit
);
192 RESTRICT_SYSCALL_DEATH_TEST(getrusage
);
193 RESTRICT_SYSCALL_DEATH_TEST(getsid
);
194 #if defined(__x86_64__) || defined(__arm__)
195 RESTRICT_SYSCALL_DEATH_TEST(getsockname
);
197 #if defined(__x86_64__) || defined(__arm__)
198 RESTRICT_SYSCALL_DEATH_TEST(getsockopt
);
200 RESTRICT_SYSCALL_DEATH_TEST(getxattr
);
201 #if defined(__i386__)
202 RESTRICT_SYSCALL_DEATH_TEST(gtty
);
204 #if defined(__i386__)
205 RESTRICT_SYSCALL_DEATH_TEST(idle
);
207 RESTRICT_SYSCALL_DEATH_TEST(init_module
);
208 RESTRICT_SYSCALL_DEATH_TEST(inotify_add_watch
);
209 RESTRICT_SYSCALL_DEATH_TEST(inotify_init
);
210 RESTRICT_SYSCALL_DEATH_TEST(inotify_init1
);
211 RESTRICT_SYSCALL_DEATH_TEST(inotify_rm_watch
);
212 RESTRICT_SYSCALL_DEATH_TEST(io_cancel
);
213 RESTRICT_SYSCALL_DEATH_TEST(io_destroy
);
214 RESTRICT_SYSCALL_DEATH_TEST(io_getevents
);
215 RESTRICT_SYSCALL_DEATH_TEST(io_setup
);
216 RESTRICT_SYSCALL_DEATH_TEST(io_submit
);
217 RESTRICT_SYSCALL_DEATH_TEST(ioctl
);
218 #if defined(__i386__) || defined(__x86_64__)
219 RESTRICT_SYSCALL_DEATH_TEST(ioperm
);
221 #if defined(__i386__) || defined(__x86_64__)
222 RESTRICT_SYSCALL_DEATH_TEST(iopl
);
224 RESTRICT_SYSCALL_DEATH_TEST(ioprio_get
);
225 RESTRICT_SYSCALL_DEATH_TEST(ioprio_set
);
226 #if defined(__i386__)
227 RESTRICT_SYSCALL_DEATH_TEST(ipc
);
229 RESTRICT_SYSCALL_DEATH_TEST(kexec_load
);
230 RESTRICT_SYSCALL_DEATH_TEST(keyctl
);
231 RESTRICT_SYSCALL_DEATH_TEST(kill
);
232 RESTRICT_SYSCALL_DEATH_TEST(lchown
);
233 #if defined(__i386__) || defined(__arm__)
234 RESTRICT_SYSCALL_DEATH_TEST(lchown32
);
236 RESTRICT_SYSCALL_DEATH_TEST(lgetxattr
);
237 RESTRICT_SYSCALL_DEATH_TEST(link
);
238 RESTRICT_SYSCALL_DEATH_TEST(linkat
);
239 #if defined(__x86_64__) || defined(__arm__)
240 RESTRICT_SYSCALL_DEATH_TEST(listen
);
242 RESTRICT_SYSCALL_DEATH_TEST(listxattr
);
243 RESTRICT_SYSCALL_DEATH_TEST(llistxattr
);
244 #if defined(__i386__)
245 RESTRICT_SYSCALL_DEATH_TEST(lock
);
247 RESTRICT_SYSCALL_DEATH_TEST(lookup_dcookie
);
248 RESTRICT_SYSCALL_DEATH_TEST(lremovexattr
);
249 #if defined(__i386__) || defined(__arm__)
250 RESTRICT_SYSCALL_DEATH_TEST(lseek
);
252 RESTRICT_SYSCALL_DEATH_TEST(lsetxattr
);
253 RESTRICT_SYSCALL_DEATH_TEST(lstat
);
254 #if defined(__i386__) || defined(__arm__)
255 RESTRICT_SYSCALL_DEATH_TEST(lstat64
);
257 RESTRICT_SYSCALL_DEATH_TEST(mbind
);
258 #if defined(__i386__) || defined(__x86_64__)
259 RESTRICT_SYSCALL_DEATH_TEST(migrate_pages
);
261 RESTRICT_SYSCALL_DEATH_TEST(mincore
);
262 RESTRICT_SYSCALL_DEATH_TEST(mkdir
);
263 RESTRICT_SYSCALL_DEATH_TEST(mkdirat
);
264 RESTRICT_SYSCALL_DEATH_TEST(mknod
);
265 RESTRICT_SYSCALL_DEATH_TEST(mknodat
);
266 RESTRICT_SYSCALL_DEATH_TEST(mlock
);
267 RESTRICT_SYSCALL_DEATH_TEST(mlockall
);
268 #if defined(__i386__)
269 RESTRICT_SYSCALL_DEATH_TEST(mmap
);
271 #if defined(__i386__) || defined(__x86_64__)
272 RESTRICT_SYSCALL_DEATH_TEST(modify_ldt
);
274 RESTRICT_SYSCALL_DEATH_TEST(mount
);
275 RESTRICT_SYSCALL_DEATH_TEST(move_pages
);
276 #if defined(__i386__)
277 RESTRICT_SYSCALL_DEATH_TEST(mpx
);
279 RESTRICT_SYSCALL_DEATH_TEST(mq_getsetattr
);
280 RESTRICT_SYSCALL_DEATH_TEST(mq_notify
);
281 RESTRICT_SYSCALL_DEATH_TEST(mq_open
);
282 RESTRICT_SYSCALL_DEATH_TEST(mq_timedreceive
);
283 RESTRICT_SYSCALL_DEATH_TEST(mq_timedsend
);
284 RESTRICT_SYSCALL_DEATH_TEST(mq_unlink
);
285 RESTRICT_SYSCALL_DEATH_TEST(mremap
);
286 #if defined(__x86_64__) || defined(__arm__)
287 RESTRICT_SYSCALL_DEATH_TEST(msgctl
);
289 #if defined(__x86_64__) || defined(__arm__)
290 RESTRICT_SYSCALL_DEATH_TEST(msgget
);
292 #if defined(__x86_64__) || defined(__arm__)
293 RESTRICT_SYSCALL_DEATH_TEST(msgrcv
);
295 #if defined(__x86_64__) || defined(__arm__)
296 RESTRICT_SYSCALL_DEATH_TEST(msgsnd
);
298 RESTRICT_SYSCALL_DEATH_TEST(msync
);
299 RESTRICT_SYSCALL_DEATH_TEST(munlock
);
300 RESTRICT_SYSCALL_DEATH_TEST(munlockall
);
301 RESTRICT_SYSCALL_DEATH_TEST(name_to_handle_at
);
302 #if defined(__x86_64__)
303 RESTRICT_SYSCALL_DEATH_TEST(newfstatat
);
305 RESTRICT_SYSCALL_DEATH_TEST(nfsservctl
);
306 #if defined(__i386__) || defined(__arm__)
307 RESTRICT_SYSCALL_DEATH_TEST(nice
);
309 #if defined(__i386__)
310 RESTRICT_SYSCALL_DEATH_TEST(oldfstat
);
312 #if defined(__i386__)
313 RESTRICT_SYSCALL_DEATH_TEST(oldlstat
);
315 #if defined(__i386__)
316 RESTRICT_SYSCALL_DEATH_TEST(oldolduname
);
318 #if defined(__i386__)
319 RESTRICT_SYSCALL_DEATH_TEST(oldstat
);
321 #if defined(__i386__)
322 RESTRICT_SYSCALL_DEATH_TEST(olduname
);
324 RESTRICT_SYSCALL_DEATH_TEST(open_by_handle_at
);
325 RESTRICT_SYSCALL_DEATH_TEST(pause
);
327 RESTRICT_SYSCALL_DEATH_TEST(pciconfig_iobase
);
330 RESTRICT_SYSCALL_DEATH_TEST(pciconfig_read
);
333 RESTRICT_SYSCALL_DEATH_TEST(pciconfig_write
);
335 RESTRICT_SYSCALL_DEATH_TEST(perf_event_open
);
336 RESTRICT_SYSCALL_DEATH_TEST(personality
);
337 RESTRICT_SYSCALL_DEATH_TEST(pipe2
);
338 RESTRICT_SYSCALL_DEATH_TEST(pivot_root
);
339 RESTRICT_SYSCALL_DEATH_TEST(ppoll
);
340 RESTRICT_SYSCALL_DEATH_TEST(preadv
);
341 RESTRICT_SYSCALL_DEATH_TEST(prlimit64
);
342 RESTRICT_SYSCALL_DEATH_TEST(process_vm_readv
);
343 RESTRICT_SYSCALL_DEATH_TEST(process_vm_writev
);
344 #if defined(__i386__)
345 RESTRICT_SYSCALL_DEATH_TEST(prof
);
347 #if defined(__i386__)
348 RESTRICT_SYSCALL_DEATH_TEST(profil
);
350 RESTRICT_SYSCALL_DEATH_TEST(pselect6
);
351 #if defined(__i386__) || defined(__x86_64__)
352 RESTRICT_SYSCALL_DEATH_TEST(putpmsg
);
354 RESTRICT_SYSCALL_DEATH_TEST(pwritev
);
355 #if defined(__i386__) || defined(__x86_64__)
356 RESTRICT_SYSCALL_DEATH_TEST(query_module
);
358 RESTRICT_SYSCALL_DEATH_TEST(quotactl
);
359 RESTRICT_SYSCALL_DEATH_TEST(readahead
);
360 #if defined(__i386__)
361 RESTRICT_SYSCALL_DEATH_TEST(readdir
);
363 RESTRICT_SYSCALL_DEATH_TEST(readlink
);
364 RESTRICT_SYSCALL_DEATH_TEST(readlinkat
);
365 RESTRICT_SYSCALL_DEATH_TEST(readv
);
366 RESTRICT_SYSCALL_DEATH_TEST(reboot
);
368 RESTRICT_SYSCALL_DEATH_TEST(recv
);
370 #if defined(__x86_64__) || defined(__arm__)
371 RESTRICT_SYSCALL_DEATH_TEST(recvfrom
);
373 RESTRICT_SYSCALL_DEATH_TEST(recvmmsg
);
374 RESTRICT_SYSCALL_DEATH_TEST(remap_file_pages
);
375 RESTRICT_SYSCALL_DEATH_TEST(removexattr
);
376 RESTRICT_SYSCALL_DEATH_TEST(rename
);
377 RESTRICT_SYSCALL_DEATH_TEST(renameat
);
378 RESTRICT_SYSCALL_DEATH_TEST(request_key
);
379 RESTRICT_SYSCALL_DEATH_TEST(rmdir
);
380 RESTRICT_SYSCALL_DEATH_TEST(rt_sigaction
);
381 RESTRICT_SYSCALL_DEATH_TEST(rt_sigpending
);
382 RESTRICT_SYSCALL_DEATH_TEST(rt_sigprocmask
);
383 RESTRICT_SYSCALL_DEATH_TEST(rt_sigqueueinfo
);
384 RESTRICT_SYSCALL_DEATH_TEST(rt_sigreturn
);
385 RESTRICT_SYSCALL_DEATH_TEST(rt_sigsuspend
);
386 RESTRICT_SYSCALL_DEATH_TEST(rt_sigtimedwait
);
387 RESTRICT_SYSCALL_DEATH_TEST(rt_tgsigqueueinfo
);
388 RESTRICT_SYSCALL_DEATH_TEST(sched_get_priority_max
);
389 RESTRICT_SYSCALL_DEATH_TEST(sched_get_priority_min
);
390 RESTRICT_SYSCALL_DEATH_TEST(sched_getaffinity
);
391 RESTRICT_SYSCALL_DEATH_TEST(sched_getparam
);
392 RESTRICT_SYSCALL_DEATH_TEST(sched_getscheduler
);
393 RESTRICT_SYSCALL_DEATH_TEST(sched_rr_get_interval
);
394 RESTRICT_SYSCALL_DEATH_TEST(sched_setaffinity
);
395 RESTRICT_SYSCALL_DEATH_TEST(sched_setparam
);
396 RESTRICT_SYSCALL_DEATH_TEST(sched_setscheduler
);
397 #if defined(__x86_64__)
398 RESTRICT_SYSCALL_DEATH_TEST(security
);
400 #if defined(__i386__) || defined(__x86_64__)
401 RESTRICT_SYSCALL_DEATH_TEST(select
);
403 #if defined(__x86_64__) || defined(__arm__)
404 RESTRICT_SYSCALL_DEATH_TEST(semctl
);
406 #if defined(__x86_64__) || defined(__arm__)
407 RESTRICT_SYSCALL_DEATH_TEST(semget
);
409 #if defined(__x86_64__) || defined(__arm__)
410 RESTRICT_SYSCALL_DEATH_TEST(semop
);
412 #if defined(__x86_64__) || defined(__arm__)
413 RESTRICT_SYSCALL_DEATH_TEST(semtimedop
);
416 RESTRICT_SYSCALL_DEATH_TEST(send
);
418 RESTRICT_SYSCALL_DEATH_TEST(sendfile
);
419 #if defined(__i386__) || defined(__arm__)
420 RESTRICT_SYSCALL_DEATH_TEST(sendfile64
);
422 RESTRICT_SYSCALL_DEATH_TEST(sendmmsg
);
423 #if defined(__x86_64__) || defined(__arm__)
424 RESTRICT_SYSCALL_DEATH_TEST(sendto
);
426 RESTRICT_SYSCALL_DEATH_TEST(set_mempolicy
);
427 #if defined(__i386__) || defined(__x86_64__)
428 RESTRICT_SYSCALL_DEATH_TEST(set_thread_area
);
430 RESTRICT_SYSCALL_DEATH_TEST(set_tid_address
);
431 RESTRICT_SYSCALL_DEATH_TEST(setdomainname
);
432 RESTRICT_SYSCALL_DEATH_TEST(setfsgid
);
433 #if defined(__i386__) || defined(__arm__)
434 RESTRICT_SYSCALL_DEATH_TEST(setfsgid32
);
436 RESTRICT_SYSCALL_DEATH_TEST(setfsuid
);
437 #if defined(__i386__) || defined(__arm__)
438 RESTRICT_SYSCALL_DEATH_TEST(setfsuid32
);
440 RESTRICT_SYSCALL_DEATH_TEST(setgid
);
441 #if defined(__i386__) || defined(__arm__)
442 RESTRICT_SYSCALL_DEATH_TEST(setgid32
);
444 RESTRICT_SYSCALL_DEATH_TEST(setgroups
);
445 #if defined(__i386__) || defined(__arm__)
446 RESTRICT_SYSCALL_DEATH_TEST(setgroups32
);
448 RESTRICT_SYSCALL_DEATH_TEST(sethostname
);
449 RESTRICT_SYSCALL_DEATH_TEST(setitimer
);
450 RESTRICT_SYSCALL_DEATH_TEST(setns
);
451 RESTRICT_SYSCALL_DEATH_TEST(setpgid
);
452 RESTRICT_SYSCALL_DEATH_TEST(setpriority
);
453 RESTRICT_SYSCALL_DEATH_TEST(setregid
);
454 #if defined(__i386__) || defined(__arm__)
455 RESTRICT_SYSCALL_DEATH_TEST(setregid32
);
457 RESTRICT_SYSCALL_DEATH_TEST(setresgid
);
458 #if defined(__i386__) || defined(__arm__)
459 RESTRICT_SYSCALL_DEATH_TEST(setresgid32
);
461 RESTRICT_SYSCALL_DEATH_TEST(setresuid
);
462 #if defined(__i386__) || defined(__arm__)
463 RESTRICT_SYSCALL_DEATH_TEST(setresuid32
);
465 RESTRICT_SYSCALL_DEATH_TEST(setreuid
);
466 #if defined(__i386__) || defined(__arm__)
467 RESTRICT_SYSCALL_DEATH_TEST(setreuid32
);
469 RESTRICT_SYSCALL_DEATH_TEST(setrlimit
);
470 RESTRICT_SYSCALL_DEATH_TEST(setsid
);
471 #if defined(__x86_64__) || defined(__arm__)
472 RESTRICT_SYSCALL_DEATH_TEST(setsockopt
);
474 RESTRICT_SYSCALL_DEATH_TEST(settimeofday
);
475 RESTRICT_SYSCALL_DEATH_TEST(setuid
);
476 #if defined(__i386__) || defined(__arm__)
477 RESTRICT_SYSCALL_DEATH_TEST(setuid32
);
479 RESTRICT_SYSCALL_DEATH_TEST(setxattr
);
480 #if defined(__i386__)
481 RESTRICT_SYSCALL_DEATH_TEST(sgetmask
);
483 #if defined(__x86_64__) || defined(__arm__)
484 RESTRICT_SYSCALL_DEATH_TEST(shmat
);
486 #if defined(__x86_64__) || defined(__arm__)
487 RESTRICT_SYSCALL_DEATH_TEST(shmctl
);
489 #if defined(__x86_64__) || defined(__arm__)
490 RESTRICT_SYSCALL_DEATH_TEST(shmdt
);
492 #if defined(__x86_64__) || defined(__arm__)
493 RESTRICT_SYSCALL_DEATH_TEST(shmget
);
495 #if defined(__i386__) || defined(__arm__)
496 RESTRICT_SYSCALL_DEATH_TEST(sigaction
);
498 #if defined(__i386__)
499 RESTRICT_SYSCALL_DEATH_TEST(signal
);
501 RESTRICT_SYSCALL_DEATH_TEST(signalfd
);
502 RESTRICT_SYSCALL_DEATH_TEST(signalfd4
);
503 #if defined(__i386__) || defined(__arm__)
504 RESTRICT_SYSCALL_DEATH_TEST(sigpending
);
506 #if defined(__i386__) || defined(__arm__)
507 RESTRICT_SYSCALL_DEATH_TEST(sigprocmask
);
509 #if defined(__i386__) || defined(__arm__)
510 RESTRICT_SYSCALL_DEATH_TEST(sigreturn
);
512 #if defined(__i386__) || defined(__arm__)
513 RESTRICT_SYSCALL_DEATH_TEST(sigsuspend
);
515 #if defined(__x86_64__) || defined(__arm__)
516 RESTRICT_SYSCALL_DEATH_TEST(socket
);
518 RESTRICT_SYSCALL_DEATH_TEST(splice
);
519 #if defined(__i386__)
520 RESTRICT_SYSCALL_DEATH_TEST(ssetmask
);
522 RESTRICT_SYSCALL_DEATH_TEST(stat
);
523 #if defined(__i386__) || defined(__arm__)
524 RESTRICT_SYSCALL_DEATH_TEST(stat64
);
526 RESTRICT_SYSCALL_DEATH_TEST(statfs
);
527 #if defined(__i386__) || defined(__arm__)
528 RESTRICT_SYSCALL_DEATH_TEST(statfs64
);
530 #if defined(__i386__)
531 RESTRICT_SYSCALL_DEATH_TEST(stime
);
533 #if defined(__i386__)
534 RESTRICT_SYSCALL_DEATH_TEST(stty
);
536 RESTRICT_SYSCALL_DEATH_TEST(swapoff
);
537 RESTRICT_SYSCALL_DEATH_TEST(swapon
);
538 RESTRICT_SYSCALL_DEATH_TEST(symlink
);
539 RESTRICT_SYSCALL_DEATH_TEST(symlinkat
);
540 RESTRICT_SYSCALL_DEATH_TEST(sync
);
541 #if defined(__i386__) || defined(__x86_64__)
542 RESTRICT_SYSCALL_DEATH_TEST(sync_file_range
);
545 RESTRICT_SYSCALL_DEATH_TEST(sync_file_range2
);
547 RESTRICT_SYSCALL_DEATH_TEST(syncfs
);
548 RESTRICT_SYSCALL_DEATH_TEST(sysfs
);
549 RESTRICT_SYSCALL_DEATH_TEST(sysinfo
);
550 RESTRICT_SYSCALL_DEATH_TEST(syslog
);
551 RESTRICT_SYSCALL_DEATH_TEST(tee
);
552 RESTRICT_SYSCALL_DEATH_TEST(tgkill
);
553 RESTRICT_SYSCALL_DEATH_TEST(timer_create
);
554 RESTRICT_SYSCALL_DEATH_TEST(timer_delete
);
555 RESTRICT_SYSCALL_DEATH_TEST(timer_getoverrun
);
556 RESTRICT_SYSCALL_DEATH_TEST(timer_gettime
);
557 RESTRICT_SYSCALL_DEATH_TEST(timer_settime
);
558 RESTRICT_SYSCALL_DEATH_TEST(timerfd_create
);
559 RESTRICT_SYSCALL_DEATH_TEST(timerfd_gettime
);
560 RESTRICT_SYSCALL_DEATH_TEST(timerfd_settime
);
561 RESTRICT_SYSCALL_DEATH_TEST(tkill
);
562 RESTRICT_SYSCALL_DEATH_TEST(truncate
);
563 #if defined(__i386__) || defined(__arm__)
564 RESTRICT_SYSCALL_DEATH_TEST(truncate64
);
566 #if defined(__x86_64__)
567 RESTRICT_SYSCALL_DEATH_TEST(tuxcall
);
569 #if defined(__i386__) || defined(__arm__)
570 RESTRICT_SYSCALL_DEATH_TEST(ugetrlimit
);
572 #if defined(__i386__)
573 RESTRICT_SYSCALL_DEATH_TEST(ulimit
);
575 RESTRICT_SYSCALL_DEATH_TEST(umask
);
576 #if defined(__i386__)
577 RESTRICT_SYSCALL_DEATH_TEST(umount
);
579 RESTRICT_SYSCALL_DEATH_TEST(umount2
);
580 RESTRICT_SYSCALL_DEATH_TEST(uname
);
581 RESTRICT_SYSCALL_DEATH_TEST(unlink
);
582 RESTRICT_SYSCALL_DEATH_TEST(unlinkat
);
583 RESTRICT_SYSCALL_DEATH_TEST(unshare
);
584 RESTRICT_SYSCALL_DEATH_TEST(uselib
);
585 RESTRICT_SYSCALL_DEATH_TEST(ustat
);
586 #if defined(__i386__) || defined(__x86_64__)
587 RESTRICT_SYSCALL_DEATH_TEST(utime
);
589 RESTRICT_SYSCALL_DEATH_TEST(utimensat
);
590 RESTRICT_SYSCALL_DEATH_TEST(utimes
);
591 RESTRICT_SYSCALL_DEATH_TEST(vfork
);
592 RESTRICT_SYSCALL_DEATH_TEST(vhangup
);
593 #if defined(__i386__)
594 RESTRICT_SYSCALL_DEATH_TEST(vm86
);
596 #if defined(__i386__)
597 RESTRICT_SYSCALL_DEATH_TEST(vm86old
);
599 RESTRICT_SYSCALL_DEATH_TEST(vmsplice
);
600 RESTRICT_SYSCALL_DEATH_TEST(vserver
);
601 RESTRICT_SYSCALL_DEATH_TEST(wait4
);
602 RESTRICT_SYSCALL_DEATH_TEST(waitid
);
603 #if defined(__i386__)
604 RESTRICT_SYSCALL_DEATH_TEST(waitpid
);
606 RESTRICT_SYSCALL_DEATH_TEST(writev
);
608 // ARM specific syscalls.
610 RESTRICT_ARM_SYSCALL_DEATH_TEST(breakpoint
);
611 RESTRICT_ARM_SYSCALL_DEATH_TEST(usr26
);
612 RESTRICT_ARM_SYSCALL_DEATH_TEST(usr32
);
613 RESTRICT_ARM_SYSCALL_DEATH_TEST(set_tls
);
618 #endif // !ADDRESS_SANITIZER && !THREAD_SANITIZER &&
619 // !MEMORY_SANITIZER && !LEAK_SANITIZER