]>
Commit | Line | Data |
---|---|---|
bed09c9c CB |
1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
2 | #ifndef __LXC_SYSCALL_NUMBERS_H | |
3 | #define __LXC_SYSCALL_NUMBERS_H | |
4 | ||
5 | #ifndef _GNU_SOURCE | |
6 | #define _GNU_SOURCE 1 | |
7 | #endif | |
8 | #include <asm/unistd.h> | |
9 | #include <errno.h> | |
10 | #include <linux/keyctl.h> | |
11 | #include <sched.h> | |
12 | #include <stdint.h> | |
13 | #include <sys/syscall.h> | |
14 | #include <sys/types.h> | |
15 | #include <unistd.h> | |
16 | ||
17 | #ifdef HAVE_LINUX_MEMFD_H | |
18 | #include <linux/memfd.h> | |
19 | #endif | |
20 | ||
21 | #ifdef HAVE_SYS_SIGNALFD_H | |
22 | #include <sys/signalfd.h> | |
23 | #endif | |
24 | ||
25 | #ifndef __NR_keyctl | |
26 | #if defined __i386__ | |
27 | #define __NR_keyctl 288 | |
28 | #elif defined __x86_64__ | |
29 | #define __NR_keyctl 250 | |
30 | #elif defined __arm__ | |
31 | #define __NR_keyctl 311 | |
32 | #elif defined __aarch64__ | |
33 | #define __NR_keyctl 311 | |
34 | #elif defined __s390__ | |
35 | #define __NR_keyctl 280 | |
36 | #elif defined __powerpc__ | |
37 | #define __NR_keyctl 271 | |
1b21a48c CB |
38 | #elif defined __riscv |
39 | #define __NR_keyctl 219 | |
bed09c9c CB |
40 | #elif defined __sparc__ |
41 | #define __NR_keyctl 283 | |
42 | #elif defined __ia64__ | |
78ae61d8 | 43 | #define __NR_keyctl (249 + 1024) |
bed09c9c CB |
44 | #elif defined _MIPS_SIM |
45 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
46 | #define __NR_keyctl 4282 | |
47 | #endif | |
48 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
49 | #define __NR_keyctl 6245 | |
50 | #endif | |
51 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
52 | #define __NR_keyctl 5241 | |
53 | #endif | |
54 | #else | |
55 | #define -1 | |
56 | #warning "__NR_keyctl not defined for your architecture" | |
57 | #endif | |
58 | #endif | |
59 | ||
60 | #ifndef __NR_memfd_create | |
61 | #if defined __i386__ | |
62 | #define __NR_memfd_create 356 | |
63 | #elif defined __x86_64__ | |
64 | #define __NR_memfd_create 319 | |
65 | #elif defined __arm__ | |
66 | #define __NR_memfd_create 385 | |
67 | #elif defined __aarch64__ | |
68 | #define __NR_memfd_create 279 | |
69 | #elif defined __s390__ | |
70 | #define __NR_memfd_create 350 | |
71 | #elif defined __powerpc__ | |
72 | #define __NR_memfd_create 360 | |
1b21a48c CB |
73 | #elif defined __riscv |
74 | #define __NR_memfd_create 279 | |
bed09c9c CB |
75 | #elif defined __sparc__ |
76 | #define __NR_memfd_create 348 | |
77 | #elif defined __blackfin__ | |
78 | #define __NR_memfd_create 390 | |
79 | #elif defined __ia64__ | |
80 | #define __NR_memfd_create 1340 | |
81 | #elif defined _MIPS_SIM | |
82 | #if _MIPS_SIM == _MIPS_SIM_ABI32 | |
83 | #define __NR_memfd_create 4354 | |
84 | #endif | |
85 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | |
86 | #define __NR_memfd_create 6318 | |
87 | #endif | |
88 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | |
89 | #define __NR_memfd_create 5314 | |
90 | #endif | |
91 | #else | |
92 | #define -1 | |
93 | #warning "__NR_memfd_create not defined for your architecture" | |
94 | #endif | |
95 | #endif | |
96 | ||
97 | #ifndef __NR_pivot_root | |
98 | #if defined __i386__ | |
99 | #define __NR_pivot_root 217 | |
100 | #elif defined __x86_64__ | |
101 | #define __NR_pivot_root 155 | |
102 | #elif defined __arm__ | |
103 | #define __NR_pivot_root 218 | |
104 | #elif defined __aarch64__ | |
105 | #define __NR_pivot_root 218 | |
106 | #elif defined __s390__ | |
107 | #define __NR_pivot_root 217 | |
108 | #elif defined __powerpc__ | |
109 | #define __NR_pivot_root 203 | |
1b21a48c CB |
110 | #elif defined __riscv |
111 | #define __NR_pivot_root 41 | |
bed09c9c CB |
112 | #elif defined __sparc__ |
113 | #define __NR_pivot_root 146 | |
114 | #elif defined __ia64__ | |
78ae61d8 | 115 | #define __NR_pivot_root (183 + 1024) |
bed09c9c CB |
116 | #elif defined _MIPS_SIM |
117 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
118 | #define __NR_pivot_root 4216 | |
119 | #endif | |
120 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
121 | #define __NR_pivot_root 6151 | |
122 | #endif | |
123 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
124 | #define __NR_pivot_root 5151 | |
125 | #endif | |
126 | #else | |
127 | #define -1 | |
128 | #warning "__NR_pivot_root not defined for your architecture" | |
129 | #endif | |
130 | #endif | |
131 | ||
132 | #ifndef __NR_setns | |
133 | #if defined __i386__ | |
134 | #define __NR_setns 346 | |
135 | #elif defined __x86_64__ | |
136 | #define __NR_setns 308 | |
137 | #elif defined __arm__ | |
138 | #define __NR_setns 375 | |
139 | #elif defined __aarch64__ | |
140 | #define __NR_setns 375 | |
141 | #elif defined __s390__ | |
142 | #define __NR_setns 339 | |
143 | #elif defined __powerpc__ | |
144 | #define __NR_setns 350 | |
1b21a48c CB |
145 | #elif defined __riscv |
146 | #define __NR_setns 268 | |
bed09c9c CB |
147 | #elif defined __sparc__ |
148 | #define __NR_setns 337 | |
149 | #elif defined __ia64__ | |
78ae61d8 | 150 | #define __NR_setns (306 + 1024) |
bed09c9c CB |
151 | #elif defined _MIPS_SIM |
152 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
153 | #define __NR_setns 4344 | |
154 | #endif | |
155 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
156 | #define __NR_setns 6308 | |
157 | #endif | |
158 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
159 | #define __NR_setns 5303 | |
160 | #endif | |
161 | #else | |
162 | #define -1 | |
163 | #warning "__NR_setns not defined for your architecture" | |
164 | #endif | |
165 | #endif | |
166 | ||
167 | #ifndef __NR_sethostname | |
168 | #if defined __i386__ | |
169 | #define __NR_sethostname 74 | |
170 | #elif defined __x86_64__ | |
171 | #define __NR_sethostname 170 | |
172 | #elif defined __arm__ | |
173 | #define __NR_sethostname 74 | |
174 | #elif defined __aarch64__ | |
175 | #define __NR_sethostname 74 | |
176 | #elif defined __s390__ | |
177 | #define __NR_sethostname 74 | |
178 | #elif defined __powerpc__ | |
179 | #define __NR_sethostname 74 | |
1b21a48c CB |
180 | #elif defined __riscv |
181 | #define __NR_sethostname 161 | |
bed09c9c CB |
182 | #elif defined __sparc__ |
183 | #define __NR_sethostname 88 | |
184 | #elif defined __ia64__ | |
78ae61d8 | 185 | #define __NR_sethostname (59 + 1024) |
bed09c9c CB |
186 | #elif defined _MIPS_SIM |
187 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
188 | #define __NR_sethostname 474 | |
189 | #endif | |
190 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
191 | #define __NR_sethostname 6165 | |
192 | #endif | |
193 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
194 | #define __NR_sethostname 5165 | |
195 | #endif | |
196 | #else | |
197 | #define -1 | |
198 | #warning "__NR_sethostname not defined for your architecture" | |
199 | #endif | |
200 | #endif | |
201 | ||
202 | #ifndef __NR_signalfd | |
203 | #if defined __i386__ | |
204 | #define __NR_signalfd 321 | |
205 | #elif defined __x86_64__ | |
206 | #define __NR_signalfd 282 | |
207 | #elif defined __arm__ | |
208 | #define __NR_signalfd 349 | |
209 | #elif defined __aarch64__ | |
210 | #define __NR_signalfd 349 | |
211 | #elif defined __s390__ | |
212 | #define __NR_signalfd 316 | |
213 | #elif defined __powerpc__ | |
214 | #define __NR_signalfd 305 | |
1b21a48c CB |
215 | #elif defined __riscv |
216 | #define __NR_signalfd 74 | |
bed09c9c CB |
217 | #elif defined __sparc__ |
218 | #define __NR_signalfd 311 | |
219 | #elif defined __ia64__ | |
78ae61d8 | 220 | #define __NR_signalfd (283 + 1024) |
bed09c9c CB |
221 | #elif defined _MIPS_SIM |
222 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
223 | #define __NR_signalfd 4317 | |
224 | #endif | |
225 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
226 | #define __NR_signalfd 6280 | |
227 | #endif | |
228 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
229 | #define __NR_signalfd 5276 | |
230 | #endif | |
bed09c9c CB |
231 | #endif |
232 | #endif | |
233 | ||
234 | #ifndef __NR_signalfd4 | |
235 | #if defined __i386__ | |
236 | #define __NR_signalfd4 327 | |
237 | #elif defined __x86_64__ | |
238 | #define __NR_signalfd4 289 | |
239 | #elif defined __arm__ | |
240 | #define __NR_signalfd4 355 | |
241 | #elif defined __aarch64__ | |
242 | #define __NR_signalfd4 355 | |
243 | #elif defined __s390__ | |
244 | #define __NR_signalfd4 322 | |
245 | #elif defined __powerpc__ | |
246 | #define __NR_signalfd4 313 | |
1b21a48c CB |
247 | #elif defined __riscv |
248 | #define __NR_signalfd4 74 | |
bed09c9c CB |
249 | #elif defined __sparc__ |
250 | #define __NR_signalfd4 317 | |
251 | #elif defined __ia64__ | |
78ae61d8 | 252 | #define __NR_signalfd4 (289 + 1024) |
bed09c9c CB |
253 | #elif defined _MIPS_SIM |
254 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
255 | #define __NR_signalfd4 4324 | |
256 | #endif | |
257 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
258 | #define __NR_signalfd4 6287 | |
259 | #endif | |
260 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
261 | #define __NR_signalfd4 5283 | |
262 | #endif | |
263 | #else | |
264 | #define -1 | |
265 | #warning "__NR_signalfd4 not defined for your architecture" | |
266 | #endif | |
267 | #endif | |
268 | ||
269 | #ifndef __NR_unshare | |
270 | #if defined __i386__ | |
271 | #define __NR_unshare 310 | |
272 | #elif defined __x86_64__ | |
273 | #define __NR_unshare 272 | |
274 | #elif defined __arm__ | |
275 | #define __NR_unshare 337 | |
276 | #elif defined __aarch64__ | |
277 | #define __NR_unshare 337 | |
278 | #elif defined __s390__ | |
279 | #define __NR_unshare 303 | |
280 | #elif defined __powerpc__ | |
281 | #define __NR_unshare 282 | |
1b21a48c CB |
282 | #elif defined __riscv |
283 | #define __NR_unshare 97 | |
bed09c9c CB |
284 | #elif defined __sparc__ |
285 | #define __NR_unshare 299 | |
286 | #elif defined __ia64__ | |
78ae61d8 | 287 | #define __NR_unshare (272 + 1024) |
bed09c9c CB |
288 | #elif defined _MIPS_SIM |
289 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
290 | #define __NR_unshare 4303 | |
291 | #endif | |
292 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
293 | #define __NR_unshare 6266 | |
294 | #endif | |
295 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
296 | #define __NR_unshare 5262 | |
297 | #endif | |
298 | #else | |
299 | #define -1 | |
300 | #warning "__NR_unshare not defined for your architecture" | |
301 | #endif | |
302 | #endif | |
303 | ||
304 | #ifndef __NR_bpf | |
305 | #if defined __i386__ | |
306 | #define __NR_bpf 357 | |
307 | #elif defined __x86_64__ | |
308 | #define __NR_bpf 321 | |
309 | #elif defined __arm__ | |
310 | #define __NR_bpf 386 | |
311 | #elif defined __aarch64__ | |
312 | #define __NR_bpf 386 | |
313 | #elif defined __s390__ | |
314 | #define __NR_bpf 351 | |
315 | #elif defined __powerpc__ | |
316 | #define __NR_bpf 361 | |
1b21a48c CB |
317 | #elif defined __riscv |
318 | #define __NR_bpf 280 | |
bed09c9c CB |
319 | #elif defined __sparc__ |
320 | #define __NR_bpf 349 | |
321 | #elif defined __ia64__ | |
78ae61d8 | 322 | #define __NR_bpf (317 + 1024) |
bed09c9c CB |
323 | #elif defined _MIPS_SIM |
324 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
325 | #define __NR_bpf 4355 | |
326 | #endif | |
327 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
328 | #define __NR_bpf 6319 | |
329 | #endif | |
330 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
331 | #define __NR_bpf 5315 | |
332 | #endif | |
333 | #else | |
334 | #define -1 | |
335 | #warning "__NR_bpf not defined for your architecture" | |
336 | #endif | |
337 | #endif | |
338 | ||
339 | #ifndef __NR_faccessat | |
340 | #if defined __i386__ | |
341 | #define __NR_faccessat 307 | |
342 | #elif defined __x86_64__ | |
343 | #define __NR_faccessat 269 | |
344 | #elif defined __arm__ | |
345 | #define __NR_faccessat 334 | |
346 | #elif defined __aarch64__ | |
347 | #define __NR_faccessat 334 | |
348 | #elif defined __s390__ | |
349 | #define __NR_faccessat 300 | |
350 | #elif defined __powerpc__ | |
351 | #define __NR_faccessat 298 | |
1b21a48c CB |
352 | #elif defined __riscv |
353 | #define __NR_faccessat 48 | |
bed09c9c CB |
354 | #elif defined __sparc__ |
355 | #define __NR_faccessat 296 | |
356 | #elif defined __ia64__ | |
78ae61d8 | 357 | #define __NR_faccessat (269 + 1024) |
bed09c9c CB |
358 | #elif defined _MIPS_SIM |
359 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
360 | #define __NR_faccessat 4300 | |
361 | #endif | |
362 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
363 | #define __NR_faccessat 6263 | |
364 | #endif | |
365 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
366 | #define __NR_faccessat 5259 | |
367 | #endif | |
368 | #else | |
369 | #define -1 | |
370 | #warning "__NR_faccessat not defined for your architecture" | |
371 | #endif | |
372 | #endif | |
373 | ||
374 | #ifndef __NR_pidfd_send_signal | |
375 | #if defined __alpha__ | |
376 | #define __NR_pidfd_send_signal 534 | |
377 | #elif defined _MIPS_SIM | |
378 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
379 | #define __NR_pidfd_send_signal 4424 | |
380 | #endif | |
381 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
382 | #define __NR_pidfd_send_signal 6424 | |
383 | #endif | |
384 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
385 | #define __NR_pidfd_send_signal 5424 | |
386 | #endif | |
78ae61d8 CB |
387 | #elif defined __ia64__ |
388 | #define __NR_pidfd_send_signal (424 + 1024) | |
bed09c9c CB |
389 | #else |
390 | #define __NR_pidfd_send_signal 424 | |
391 | #endif | |
392 | #endif | |
393 | ||
394 | #ifndef __NR_seccomp | |
395 | #if defined __i386__ | |
396 | #define __NR_seccomp 354 | |
397 | #elif defined __x86_64__ | |
398 | #define __NR_seccomp 317 | |
399 | #elif defined __arm__ | |
400 | #define __NR_seccomp 383 | |
401 | #elif defined __aarch64__ | |
402 | #define __NR_seccomp 383 | |
403 | #elif defined __s390__ | |
404 | #define __NR_seccomp 348 | |
405 | #elif defined __powerpc__ | |
406 | #define __NR_seccomp 358 | |
1b21a48c CB |
407 | #elif defined __riscv |
408 | #define __NR_seccomp 277 | |
bed09c9c CB |
409 | #elif defined __sparc__ |
410 | #define __NR_seccomp 346 | |
411 | #elif defined __ia64__ | |
78ae61d8 | 412 | #define __NR_seccomp (329 + 1024) |
bed09c9c CB |
413 | #elif defined _MIPS_SIM |
414 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
415 | #define __NR_seccomp 4352 | |
416 | #endif | |
417 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
418 | #define __NR_seccomp 6316 | |
419 | #endif | |
420 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
421 | #define __NR_seccomp 5312 | |
422 | #endif | |
423 | #else | |
424 | #define -1 | |
425 | #warning "__NR_seccomp not defined for your architecture" | |
426 | #endif | |
427 | #endif | |
428 | ||
429 | #ifndef __NR_gettid | |
430 | #if defined __i386__ | |
431 | #define __NR_gettid 224 | |
432 | #elif defined __x86_64__ | |
433 | #define __NR_gettid 186 | |
434 | #elif defined __arm__ | |
435 | #define __NR_gettid 224 | |
436 | #elif defined __aarch64__ | |
437 | #define __NR_gettid 224 | |
438 | #elif defined __s390__ | |
439 | #define __NR_gettid 236 | |
440 | #elif defined __powerpc__ | |
441 | #define __NR_gettid 207 | |
1b21a48c CB |
442 | #elif defined __riscv |
443 | #define __NR_gettid 178 | |
bed09c9c CB |
444 | #elif defined __sparc__ |
445 | #define __NR_gettid 143 | |
446 | #elif defined __ia64__ | |
78ae61d8 | 447 | #define __NR_gettid (81 + 1024) |
bed09c9c CB |
448 | #elif defined _MIPS_SIM |
449 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
450 | #define __NR_gettid 4222 | |
451 | #endif | |
452 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
453 | #define __NR_gettid 6178 | |
454 | #endif | |
455 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
456 | #define __NR_gettid 5178 | |
457 | #endif | |
458 | #else | |
459 | #define -1 | |
460 | #warning "__NR_gettid not defined for your architecture" | |
461 | #endif | |
462 | #endif | |
463 | ||
464 | #ifndef __NR_execveat | |
465 | #if defined __i386__ | |
466 | #define __NR_execveat 358 | |
467 | #elif defined __x86_64__ | |
468 | #ifdef __ILP32__ /* x32 */ | |
469 | #define __NR_execveat 545 | |
470 | #else | |
471 | #define __NR_execveat 322 | |
472 | #endif | |
473 | #elif defined __arm__ | |
474 | #define __NR_execveat 387 | |
475 | #elif defined __aarch64__ | |
476 | #define __NR_execveat 387 | |
477 | #elif defined __s390__ | |
478 | #define __NR_execveat 354 | |
479 | #elif defined __powerpc__ | |
480 | #define __NR_execveat 362 | |
1b21a48c CB |
481 | #elif defined __riscv |
482 | #define __NR_execveat 281 | |
bed09c9c CB |
483 | #elif defined __sparc__ |
484 | #define __NR_execveat 350 | |
485 | #elif defined __ia64__ | |
78ae61d8 | 486 | #define __NR_execveat (318 + 1024) |
bed09c9c CB |
487 | #elif defined _MIPS_SIM |
488 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
489 | #define __NR_execveat 4356 | |
490 | #endif | |
491 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
492 | #define __NR_execveat 6320 | |
493 | #endif | |
494 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
495 | #define __NR_execveat 5316 | |
496 | #endif | |
497 | #else | |
498 | #define -1 | |
499 | #warning "__NR_execveat not defined for your architecture" | |
500 | #endif | |
501 | #endif | |
502 | ||
cf68ffd9 CB |
503 | #ifndef __NR_move_mount |
504 | #if defined __alpha__ | |
505 | #define __NR_move_mount 539 | |
506 | #elif defined _MIPS_SIM | |
507 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
508 | #define __NR_move_mount 4429 | |
509 | #endif | |
510 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
511 | #define __NR_move_mount 6429 | |
512 | #endif | |
513 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
514 | #define __NR_move_mount 5429 | |
515 | #endif | |
78ae61d8 CB |
516 | #elif defined __ia64__ |
517 | #define __NR_move_mount (428 + 1024) | |
cf68ffd9 CB |
518 | #else |
519 | #define __NR_move_mount 429 | |
520 | #endif | |
521 | #endif | |
522 | ||
523 | #ifndef __NR_open_tree | |
524 | #if defined __alpha__ | |
525 | #define __NR_open_tree 538 | |
526 | #elif defined _MIPS_SIM | |
527 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
528 | #define __NR_open_tree 4428 | |
529 | #endif | |
530 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
531 | #define __NR_open_tree 6428 | |
532 | #endif | |
533 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
534 | #define __NR_open_tree 5428 | |
535 | #endif | |
78ae61d8 CB |
536 | #elif defined __ia64__ |
537 | #define __NR_open_tree (428 + 1024) | |
cf68ffd9 CB |
538 | #else |
539 | #define __NR_open_tree 428 | |
540 | #endif | |
541 | #endif | |
542 | ||
923d3a2d CB |
543 | #ifndef __NR_clone3 |
544 | #if defined __alpha__ | |
545 | #define __NR_clone3 545 | |
546 | #elif defined _MIPS_SIM | |
547 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
548 | #define __NR_clone3 4435 | |
549 | #endif | |
550 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
551 | #define __NR_clone3 6435 | |
552 | #endif | |
553 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
554 | #define __NR_clone3 5435 | |
555 | #endif | |
556 | #elif defined __ia64__ | |
557 | #define __NR_clone3 (435 + 1024) | |
558 | #else | |
559 | #define __NR_clone3 435 | |
560 | #endif | |
561 | #endif | |
562 | ||
49b21cd7 CB |
563 | #ifndef __NR_fsopen |
564 | #if defined __alpha__ | |
565 | #define __NR_fsopen 540 | |
566 | #elif defined _MIPS_SIM | |
567 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
568 | #define __NR_fsopen 4430 | |
569 | #endif | |
570 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
571 | #define __NR_fsopen 6430 | |
572 | #endif | |
573 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
574 | #define __NR_fsopen 5430 | |
575 | #endif | |
576 | #elif defined __ia64__ | |
577 | #define __NR_fsopen (430 + 1024) | |
578 | #else | |
579 | #define __NR_fsopen 430 | |
580 | #endif | |
581 | #endif | |
582 | ||
749bc404 CB |
583 | #ifndef __NR_fspick |
584 | #if defined __alpha__ | |
585 | #define __NR_fspick 543 | |
586 | #elif defined _MIPS_SIM | |
587 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
588 | #define __NR_fspick 4433 | |
589 | #endif | |
590 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
591 | #define __NR_fspick 6433 | |
592 | #endif | |
593 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
594 | #define __NR_fspick 5433 | |
595 | #endif | |
596 | #elif defined __ia64__ | |
597 | #define __NR_fspick (433 + 1024) | |
598 | #else | |
599 | #define __NR_fspick 433 | |
600 | #endif | |
601 | #endif | |
602 | ||
9edfcaa8 CB |
603 | #ifndef __NR_fsconfig |
604 | #if defined __alpha__ | |
605 | #define __NR_fsconfig 541 | |
606 | #elif defined _MIPS_SIM | |
607 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
608 | #define __NR_fsconfig 4431 | |
609 | #endif | |
610 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
611 | #define __NR_fsconfig 6431 | |
612 | #endif | |
613 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
614 | #define __NR_fsconfig 5431 | |
615 | #endif | |
616 | #elif defined __ia64__ | |
617 | #define __NR_fsconfig (431 + 1024) | |
618 | #else | |
619 | #define __NR_fsconfig 431 | |
620 | #endif | |
621 | #endif | |
622 | ||
7f1d397b CB |
623 | #ifndef __NR_fsmount |
624 | #if defined __alpha__ | |
625 | #define __NR_fsmount 542 | |
626 | #elif defined _MIPS_SIM | |
627 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
628 | #define __NR_fsmount 4432 | |
629 | #endif | |
630 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
631 | #define __NR_fsmount 6432 | |
632 | #endif | |
633 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
634 | #define __NR_fsmount 5432 | |
635 | #endif | |
636 | #elif defined __ia64__ | |
637 | #define __NR_fsmount (432 + 1024) | |
638 | #else | |
639 | #define __NR_fsmount 432 | |
640 | #endif | |
641 | #endif | |
642 | ||
2b0c8106 CB |
643 | #ifndef __NR_openat2 |
644 | #if defined __alpha__ | |
645 | #define __NR_openat2 547 | |
646 | #elif defined _MIPS_SIM | |
647 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
648 | #define __NR_openat2 4437 | |
649 | #endif | |
650 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
651 | #define __NR_openat2 6437 | |
652 | #endif | |
653 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
654 | #define __NR_openat2 5437 | |
655 | #endif | |
656 | #elif defined __ia64__ | |
657 | #define __NR_openat2 (437 + 1024) | |
658 | #else | |
659 | #define __NR_openat2 437 | |
660 | #endif | |
661 | #endif | |
662 | ||
e8aaef81 CB |
663 | #ifndef __NR_close_range |
664 | #if defined __alpha__ | |
665 | #define __NR_close_range 546 | |
666 | #elif defined _MIPS_SIM | |
667 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
668 | #define __NR_close_range (436 + 4000) | |
669 | #endif | |
670 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
671 | #define __NR_close_range (436 + 6000) | |
672 | #endif | |
673 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
674 | #define __NR_close_range (436 + 5000) | |
675 | #endif | |
676 | #elif defined __ia64__ | |
677 | #define __NR_close_range (436 + 1024) | |
678 | #else | |
679 | #define __NR_close_range 436 | |
680 | #endif | |
681 | #endif | |
682 | ||
031e0285 CB |
683 | #ifndef __NR_mount_setattr |
684 | #if defined __alpha__ | |
685 | #define __NR_mount_setattr 552 | |
686 | #elif defined _MIPS_SIM | |
687 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
688 | #define __NR_mount_setattr (442 + 4000) | |
689 | #endif | |
690 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
691 | #define __NR_mount_setattr (442 + 6000) | |
692 | #endif | |
693 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
694 | #define __NR_mount_setattr (442 + 5000) | |
695 | #endif | |
696 | #elif defined __ia64__ | |
697 | #define __NR_mount_setattr (442 + 1024) | |
698 | #else | |
699 | #define __NR_mount_setattr 442 | |
700 | #endif | |
701 | #endif | |
702 | ||
3857c4eb CB |
703 | #ifndef __NR_personality |
704 | #if defined __alpha__ | |
705 | #define __NR_personality 324 | |
706 | #elif defined __m68k__ | |
707 | #define __NR_personality 136 | |
708 | #elif defined __i386__ | |
709 | #define __NR_personality 136 | |
710 | #elif defined __x86_64__ | |
711 | #define __NR_personality 135 | |
712 | #elif defined __arm__ | |
713 | #define __NR_personality 136 | |
714 | #elif defined __aarch64__ | |
715 | #define __NR_personality 92 | |
716 | #elif defined __s390__ | |
717 | #define __NR_personality 136 | |
718 | #elif defined __powerpc__ | |
719 | #define __NR_personality 136 | |
720 | #elif defined __riscv | |
721 | #define __NR_personality -1 | |
722 | #elif defined __sparc__ | |
723 | #define __NR_personality 191 | |
724 | #elif defined __ia64__ | |
725 | #define __NR_personality (116 + 1024) | |
726 | #elif defined _MIPS_SIM | |
727 | #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ | |
728 | #define __NR_personality (136 + 4000) | |
729 | #endif | |
730 | #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ | |
731 | #define __NR_personality (132 + 6000) | |
732 | #endif | |
733 | #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ | |
734 | #define __NR_personality (132 + 5000) | |
735 | #endif | |
736 | #else | |
737 | #define -1 | |
738 | #warning "__NR_personality not defined for your architecture" | |
739 | #endif | |
740 | #endif | |
741 | ||
bed09c9c | 742 | #endif /* __LXC_SYSCALL_NUMBERS_H */ |