Skip to content

Commit 89e23be

Browse files
committed
android: add missing syscall constants
This adds all syscall constants that are available in NDK `r21d` but were so far missing in this library. See `semver/android.txt` changes for the complete list. Refs: * https://android.googlesource.com/platform/bionic/+/refs/tags/ndk-r21d/libc/kernel/uapi/asm-generic/unistd.h * https://android.googlesource.com/platform/bionic/+/refs/tags/ndk-r21d/libc/include/bits/glibc-syscalls.h
1 parent 68ad935 commit 89e23be

File tree

6 files changed

+54
-0
lines changed

6 files changed

+54
-0
lines changed

libc-test/semver/android.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2303,7 +2303,11 @@ SYS_finit_module
23032303
SYS_flistxattr
23042304
SYS_flock
23052305
SYS_fremovexattr
2306+
SYS_fsconfig
23062307
SYS_fsetxattr
2308+
SYS_fsmount
2309+
SYS_fsopen
2310+
SYS_fspick
23072311
SYS_fsync
23082312
SYS_futex
23092313
SYS_get_mempolicy
@@ -2341,6 +2345,9 @@ SYS_io_destroy
23412345
SYS_io_getevents
23422346
SYS_io_setup
23432347
SYS_io_submit
2348+
SYS_io_uring_enter
2349+
SYS_io_uring_register
2350+
SYS_io_uring_setup
23442351
SYS_ioctl
23452352
SYS_ioprio_get
23462353
SYS_ioprio_set
@@ -2367,6 +2374,7 @@ SYS_mlock
23672374
SYS_mlock2
23682375
SYS_mlockall
23692376
SYS_mount
2377+
SYS_move_mount
23702378
SYS_move_pages
23712379
SYS_mprotect
23722380
SYS_mq_getsetattr
@@ -2384,9 +2392,11 @@ SYS_name_to_handle_at
23842392
SYS_nanosleep
23852393
SYS_nfsservctl
23862394
SYS_open_by_handle_at
2395+
SYS_open_tree
23872396
SYS_openat
23882397
SYS_perf_event_open
23892398
SYS_personality
2399+
SYS_pidfd_send_signal
23902400
SYS_pipe2
23912401
SYS_pivot_root
23922402
SYS_pkey_alloc
@@ -2473,6 +2483,7 @@ SYS_signalfd4
24732483
SYS_socket
24742484
SYS_socketpair
24752485
SYS_splice
2486+
SYS_statx
24762487
SYS_swapoff
24772488
SYS_swapon
24782489
SYS_symlinkat

src/unix/linux_like/android/b32/arm.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,9 +501,17 @@ pub const SYS_pwritev2: ::c_long = 393;
501501
pub const SYS_pkey_mprotect: ::c_long = 394;
502502
pub const SYS_pkey_alloc: ::c_long = 395;
503503
pub const SYS_pkey_free: ::c_long = 396;
504+
pub const SYS_statx: ::c_long = 397;
505+
pub const SYS_pidfd_send_signal: ::c_long = 424;
504506
pub const SYS_io_uring_setup: ::c_long = 425;
505507
pub const SYS_io_uring_enter: ::c_long = 426;
506508
pub const SYS_io_uring_register: ::c_long = 427;
509+
pub const SYS_open_tree: ::c_long = 428;
510+
pub const SYS_move_mount: ::c_long = 429;
511+
pub const SYS_fsopen: ::c_long = 430;
512+
pub const SYS_fsconfig: ::c_long = 431;
513+
pub const SYS_fsmount: ::c_long = 432;
514+
pub const SYS_fspick: ::c_long = 433;
507515

508516
// offsets in mcontext_t.gregs from sys/ucontext.h
509517
pub const REG_R0: ::c_int = 0;

src/unix/linux_like/android/b32/x86/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,9 +533,17 @@ pub const SYS_pwritev2: ::c_long = 379;
533533
pub const SYS_pkey_mprotect: ::c_long = 380;
534534
pub const SYS_pkey_alloc: ::c_long = 381;
535535
pub const SYS_pkey_free: ::c_long = 382;
536+
pub const SYS_statx: ::c_long = 383;
537+
pub const SYS_pidfd_send_signal: ::c_long = 424;
536538
pub const SYS_io_uring_setup: ::c_long = 425;
537539
pub const SYS_io_uring_enter: ::c_long = 426;
538540
pub const SYS_io_uring_register: ::c_long = 427;
541+
pub const SYS_open_tree: ::c_long = 428;
542+
pub const SYS_move_mount: ::c_long = 429;
543+
pub const SYS_fsopen: ::c_long = 430;
544+
pub const SYS_fsconfig: ::c_long = 431;
545+
pub const SYS_fsmount: ::c_long = 432;
546+
pub const SYS_fspick: ::c_long = 433;
539547

540548
// offsets in user_regs_structs, from sys/reg.h
541549
pub const EBX: ::c_int = 0;

src/unix/linux_like/android/b64/aarch64/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,17 @@ pub const SYS_pwritev2: ::c_long = 287;
374374
pub const SYS_pkey_mprotect: ::c_long = 288;
375375
pub const SYS_pkey_alloc: ::c_long = 289;
376376
pub const SYS_pkey_free: ::c_long = 290;
377+
pub const SYS_statx: ::c_long = 291;
378+
pub const SYS_pidfd_send_signal: ::c_long = 424;
377379
pub const SYS_io_uring_setup: ::c_long = 425;
378380
pub const SYS_io_uring_enter: ::c_long = 426;
379381
pub const SYS_io_uring_register: ::c_long = 427;
382+
pub const SYS_open_tree: ::c_long = 428;
383+
pub const SYS_move_mount: ::c_long = 429;
384+
pub const SYS_fsopen: ::c_long = 430;
385+
pub const SYS_fsconfig: ::c_long = 431;
386+
pub const SYS_fsmount: ::c_long = 432;
387+
pub const SYS_fspick: ::c_long = 433;
380388
pub const SYS_syscalls: ::c_long = 436;
381389

382390
cfg_if! {

src/unix/linux_like/android/b64/riscv64/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,17 @@ pub const SYS_pwritev2: ::c_long = 287;
332332
pub const SYS_pkey_mprotect: ::c_long = 288;
333333
pub const SYS_pkey_alloc: ::c_long = 289;
334334
pub const SYS_pkey_free: ::c_long = 290;
335+
pub const SYS_statx: ::c_long = 291;
336+
pub const SYS_pidfd_send_signal: ::c_long = 424;
337+
pub const SYS_io_uring_setup: ::c_long = 425;
338+
pub const SYS_io_uring_enter: ::c_long = 426;
339+
pub const SYS_io_uring_register: ::c_long = 427;
340+
pub const SYS_open_tree: ::c_long = 428;
341+
pub const SYS_move_mount: ::c_long = 429;
342+
pub const SYS_fsopen: ::c_long = 430;
343+
pub const SYS_fsconfig: ::c_long = 431;
344+
pub const SYS_fsmount: ::c_long = 432;
345+
pub const SYS_fspick: ::c_long = 433;
335346
pub const SYS_syscalls: ::c_long = 436;
336347

337348
cfg_if! {

src/unix/linux_like/android/b64/x86_64/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,9 +728,17 @@ pub const SYS_pwritev2: ::c_long = 328;
728728
pub const SYS_pkey_mprotect: ::c_long = 329;
729729
pub const SYS_pkey_alloc: ::c_long = 330;
730730
pub const SYS_pkey_free: ::c_long = 331;
731+
pub const SYS_statx: ::c_long = 332;
732+
pub const SYS_pidfd_send_signal: ::c_long = 424;
731733
pub const SYS_io_uring_setup: ::c_long = 425;
732734
pub const SYS_io_uring_enter: ::c_long = 426;
733735
pub const SYS_io_uring_register: ::c_long = 427;
736+
pub const SYS_open_tree: ::c_long = 428;
737+
pub const SYS_move_mount: ::c_long = 429;
738+
pub const SYS_fsopen: ::c_long = 430;
739+
pub const SYS_fsconfig: ::c_long = 431;
740+
pub const SYS_fsmount: ::c_long = 432;
741+
pub const SYS_fspick: ::c_long = 433;
734742

735743
// offsets in user_regs_structs, from sys/reg.h
736744
pub const R15: ::c_int = 0;

0 commit comments

Comments
 (0)