• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright 2014 The ChromiumOS Authors
2  * Use of this source code is governed by a BSD-style license that can be
3  * found in the LICENSE file.
4  */
5 
6 #include <asm/unistd.h>
7 
8 /* Ideally minijail is compiled against a modern libc, which has modern copies
9  * of Linux uapi for ioctls, and unistd.h for syscalls. However, sometimes this
10  * isn't possible - such as when building with the Android host toolchain - so
11  * locally define the system calls in use in active seccomp policy files.
12  * This UAPI is taken from sanitized bionic headers.
13  */
14 
15 #ifndef __NR_copy_file_range
16 #ifdef __x86_64__
17 #define __NR_copy_file_range 326
18 #elif __i386__
19 #define __NR_copy_file_range 377
20 #elif __arm64__
21 #define __NR_copy_file_range 285
22 #endif
23 #endif /* __NR_copy_file_range */
24 
25 #ifndef __NR_getrandom
26 #ifdef __x86_64__
27 #define __NR_getrandom 318
28 #elif __i386__
29 #define __NR_getrandom 355
30 #elif __arm64__
31 #define __NR_getrandom 278
32 #endif
33 #endif /* __NR_getrandom */
34 
35 #ifndef __NR_memfd_create
36 #ifdef __x86_64__
37 #define __NR_memfd_create 319
38 #elif __i386__
39 #define __NR_memfd_create 356
40 #elif __arm64__
41 #define __NR_memfd_create 279
42 #endif
43 #endif /* __NR_memfd_create */
44 
45 #ifndef __NR_renameat2
46 #ifdef __x86_64__
47 #define __NR_renameat2 316
48 #elif __i386__
49 #define __NR_renameat2 353
50 #elif __arm64__
51 #define __NR_renameat2 276
52 #endif
53 #endif /* __NR_renameat2 */
54 
55 #ifndef __NR_statx
56 #ifdef __x86_64__
57 #define __NR_statx 332
58 #elif __i386__
59 #define __NR_statx 383
60 #elif __arm64__
61 #define __NR_statx 291
62 #endif
63 #endif /* __NR_statx */
64 
65 #ifndef __NR_io_uring_enter
66 #define __NR_io_uring_enter 426
67 #endif
68 
69 #ifndef __NR_io_uring_register
70 #define __NR_io_uring_register 427
71 #endif
72 
73 #ifndef __NR_io_uring_setup
74 #define __NR_io_uring_setup 425
75 #endif
76 
77 #ifndef __NR_faccessat2
78 #define __NR_faccessat2 439
79 #endif
80 
81 #ifndef __NR_rseq
82 #ifdef __x86_64__
83 #define __NR_rseq 334
84 #elif __i386__
85 #define __NR_rseq 386
86 #elif __arm64__
87 #define __NR_rseq 293
88 #endif
89 #endif /* __NR_rseq */
90 
91 #ifndef __NR_clone3
92 #define __NR_clone3 435
93 #endif
94 
95 #ifndef __NR_userfaultfd
96 #ifdef __x86_64__
97 #define __NR_userfaultfd 323
98 #elif __i386__
99 #define __NR_userfaultfd 374
100 #elif __arm64__
101 #define __NR_userfaultfd 282
102 #endif
103 #endif /* __NR_userfaultfd */
104 
105 #ifndef __NR_membarrier
106 #ifdef __x86_64__
107 #define __NR_membarrier 324
108 #elif __i386__
109 #define __NR_membarrier 375
110 #elif __arm64__
111 #define __NR_membarrier 283
112 #endif
113 #endif /* __NR_membarrier */
114