Skip to content

Commit

Permalink
Merge pull request #3558 from yujincheng08/android
Browse files Browse the repository at this point in the history
android: add missing syscall constants
  • Loading branch information
JohnTitor authored Jan 28, 2024
2 parents bea1bcb + e89781f commit ad75ba1
Show file tree
Hide file tree
Showing 9 changed files with 104 additions and 2 deletions.
1 change: 1 addition & 0 deletions libc-test/semver/android-aarch64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ HWCAP2_SVESM4
PROT_BTI
PROT_MTE
SYS_arch_specific_syscall
SYS_memfd_secret
SYS_syscalls
SYS_fcntl
__system_property_wait
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/android-i686.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SYS_memfd_secret
__c_anonymous_uc_sigmask
__c_anonymous_uc_sigmask_with_padding
time64_t
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/android-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ SYS_arch_prctl
SYS_epoll_ctl_old
SYS_epoll_wait_old
SYS_kexec_file_load
SYS_memfd_secret
SYS_msgctl
SYS_msgget
SYS_msgrcv
Expand Down
16 changes: 16 additions & 0 deletions libc-test/semver/android.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2449,7 +2449,9 @@ SYS_clock_gettime
SYS_clock_nanosleep
SYS_clock_settime
SYS_clone
SYS_clone3
SYS_close
SYS_close_range
SYS_connect
SYS_copy_file_range
SYS_delete_module
Expand All @@ -2458,12 +2460,14 @@ SYS_dup3
SYS_epoll_create1
SYS_epoll_ctl
SYS_epoll_pwait
SYS_epoll_pwait2
SYS_eventfd2
SYS_execve
SYS_execveat
SYS_exit
SYS_exit_group
SYS_faccessat
SYS_faccessat2
SYS_fallocate
SYS_fanotify_init
SYS_fanotify_mark
Expand All @@ -2485,6 +2489,7 @@ SYS_fsopen
SYS_fspick
SYS_fsync
SYS_futex
SYS_futex_waitv
SYS_get_mempolicy
SYS_get_robust_list
SYS_getcpu
Expand Down Expand Up @@ -2530,6 +2535,9 @@ SYS_kcmp
SYS_kexec_load
SYS_keyctl
SYS_kill
SYS_landlock_add_rule
SYS_landlock_create_ruleset
SYS_landlock_restrict_self
SYS_lgetxattr
SYS_linkat
SYS_listen
Expand All @@ -2549,6 +2557,7 @@ SYS_mlock
SYS_mlock2
SYS_mlockall
SYS_mount
SYS_mount_setattr
SYS_move_mount
SYS_move_pages
SYS_mprotect
Expand All @@ -2569,8 +2578,11 @@ SYS_nfsservctl
SYS_open_by_handle_at
SYS_open_tree
SYS_openat
SYS_openat2
SYS_perf_event_open
SYS_personality
SYS_pidfd_getfd
SYS_pidfd_open
SYS_pidfd_send_signal
SYS_pipe2
SYS_pivot_root
Expand All @@ -2583,6 +2595,8 @@ SYS_pread64
SYS_preadv
SYS_preadv2
SYS_prlimit64
SYS_process_madvise
SYS_process_mrelease
SYS_process_vm_readv
SYS_process_vm_writev
SYS_pselect6
Expand All @@ -2591,6 +2605,7 @@ SYS_pwrite64
SYS_pwritev
SYS_pwritev2
SYS_quotactl
SYS_quotactl_fd
SYS_read
SYS_readahead
SYS_readlinkat
Expand Down Expand Up @@ -2630,6 +2645,7 @@ SYS_sendmmsg
SYS_sendmsg
SYS_sendto
SYS_set_mempolicy
SYS_set_mempolicy_home_node
SYS_set_robust_list
SYS_set_tid_address
SYS_setdomainname
Expand Down
16 changes: 16 additions & 0 deletions src/unix/linux_like/android/b32/arm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,22 @@ pub const SYS_fsopen: ::c_long = 430;
pub const SYS_fsconfig: ::c_long = 431;
pub const SYS_fsmount: ::c_long = 432;
pub const SYS_fspick: ::c_long = 433;
pub const SYS_pidfd_open: ::c_long = 434;
pub const SYS_clone3: ::c_long = 435;
pub const SYS_close_range: ::c_long = 436;
pub const SYS_openat2: ::c_long = 437;
pub const SYS_pidfd_getfd: ::c_long = 438;
pub const SYS_faccessat2: ::c_long = 439;
pub const SYS_process_madvise: ::c_long = 440;
pub const SYS_epoll_pwait2: ::c_long = 441;
pub const SYS_mount_setattr: ::c_long = 442;
pub const SYS_quotactl_fd: ::c_long = 443;
pub const SYS_landlock_create_ruleset: ::c_long = 444;
pub const SYS_landlock_add_rule: ::c_long = 445;
pub const SYS_landlock_restrict_self: ::c_long = 446;
pub const SYS_process_mrelease: ::c_long = 448;
pub const SYS_futex_waitv: ::c_long = 449;
pub const SYS_set_mempolicy_home_node: ::c_long = 450;

// offsets in mcontext_t.gregs from sys/ucontext.h
pub const REG_R0: ::c_int = 0;
Expand Down
17 changes: 17 additions & 0 deletions src/unix/linux_like/android/b32/x86/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,23 @@ pub const SYS_fsopen: ::c_long = 430;
pub const SYS_fsconfig: ::c_long = 431;
pub const SYS_fsmount: ::c_long = 432;
pub const SYS_fspick: ::c_long = 433;
pub const SYS_pidfd_open: ::c_long = 434;
pub const SYS_clone3: ::c_long = 435;
pub const SYS_close_range: ::c_long = 436;
pub const SYS_openat2: ::c_long = 437;
pub const SYS_pidfd_getfd: ::c_long = 438;
pub const SYS_faccessat2: ::c_long = 439;
pub const SYS_process_madvise: ::c_long = 440;
pub const SYS_epoll_pwait2: ::c_long = 441;
pub const SYS_mount_setattr: ::c_long = 442;
pub const SYS_quotactl_fd: ::c_long = 443;
pub const SYS_landlock_create_ruleset: ::c_long = 444;
pub const SYS_landlock_add_rule: ::c_long = 445;
pub const SYS_landlock_restrict_self: ::c_long = 446;
pub const SYS_memfd_secret: ::c_long = 447;
pub const SYS_process_mrelease: ::c_long = 448;
pub const SYS_futex_waitv: ::c_long = 449;
pub const SYS_set_mempolicy_home_node: ::c_long = 450;

// offsets in user_regs_structs, from sys/reg.h
pub const EBX: ::c_int = 0;
Expand Down
19 changes: 18 additions & 1 deletion src/unix/linux_like/android/b64/aarch64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,24 @@ pub const SYS_fsopen: ::c_long = 430;
pub const SYS_fsconfig: ::c_long = 431;
pub const SYS_fsmount: ::c_long = 432;
pub const SYS_fspick: ::c_long = 433;
pub const SYS_syscalls: ::c_long = 436;
pub const SYS_pidfd_open: ::c_long = 434;
pub const SYS_clone3: ::c_long = 435;
pub const SYS_close_range: ::c_long = 436;
pub const SYS_openat2: ::c_long = 437;
pub const SYS_pidfd_getfd: ::c_long = 438;
pub const SYS_faccessat2: ::c_long = 439;
pub const SYS_process_madvise: ::c_long = 440;
pub const SYS_epoll_pwait2: ::c_long = 441;
pub const SYS_mount_setattr: ::c_long = 442;
pub const SYS_quotactl_fd: ::c_long = 443;
pub const SYS_landlock_create_ruleset: ::c_long = 444;
pub const SYS_landlock_add_rule: ::c_long = 445;
pub const SYS_landlock_restrict_self: ::c_long = 446;
pub const SYS_memfd_secret: ::c_long = 447;
pub const SYS_process_mrelease: ::c_long = 448;
pub const SYS_futex_waitv: ::c_long = 449;
pub const SYS_set_mempolicy_home_node: ::c_long = 450;
pub const SYS_syscalls: ::c_long = 451;

pub const PROT_BTI: ::c_int = 0x10;
pub const PROT_MTE: ::c_int = 0x20;
Expand Down
18 changes: 17 additions & 1 deletion src/unix/linux_like/android/b64/riscv64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,23 @@ pub const SYS_fsopen: ::c_long = 430;
pub const SYS_fsconfig: ::c_long = 431;
pub const SYS_fsmount: ::c_long = 432;
pub const SYS_fspick: ::c_long = 433;
pub const SYS_syscalls: ::c_long = 436;
pub const SYS_pidfd_open: ::c_long = 434;
pub const SYS_clone3: ::c_long = 435;
pub const SYS_close_range: ::c_long = 436;
pub const SYS_openat2: ::c_long = 437;
pub const SYS_pidfd_getfd: ::c_long = 438;
pub const SYS_faccessat2: ::c_long = 439;
pub const SYS_process_madvise: ::c_long = 440;
pub const SYS_epoll_pwait2: ::c_long = 441;
pub const SYS_mount_setattr: ::c_long = 442;
pub const SYS_quotactl_fd: ::c_long = 443;
pub const SYS_landlock_create_ruleset: ::c_long = 444;
pub const SYS_landlock_add_rule: ::c_long = 445;
pub const SYS_landlock_restrict_self: ::c_long = 446;
pub const SYS_memfd_secret: ::c_long = 447;
pub const SYS_process_mrelease: ::c_long = 448;
pub const SYS_futex_waitv: ::c_long = 449;
pub const SYS_set_mempolicy_home_node: ::c_long = 450;

mod align;
pub use self::align::*;
17 changes: 17 additions & 0 deletions src/unix/linux_like/android/b64/x86_64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,23 @@ pub const SYS_fsopen: ::c_long = 430;
pub const SYS_fsconfig: ::c_long = 431;
pub const SYS_fsmount: ::c_long = 432;
pub const SYS_fspick: ::c_long = 433;
pub const SYS_pidfd_open: ::c_long = 434;
pub const SYS_clone3: ::c_long = 435;
pub const SYS_close_range: ::c_long = 436;
pub const SYS_openat2: ::c_long = 437;
pub const SYS_pidfd_getfd: ::c_long = 438;
pub const SYS_faccessat2: ::c_long = 439;
pub const SYS_process_madvise: ::c_long = 440;
pub const SYS_epoll_pwait2: ::c_long = 441;
pub const SYS_mount_setattr: ::c_long = 442;
pub const SYS_quotactl_fd: ::c_long = 443;
pub const SYS_landlock_create_ruleset: ::c_long = 444;
pub const SYS_landlock_add_rule: ::c_long = 445;
pub const SYS_landlock_restrict_self: ::c_long = 446;
pub const SYS_memfd_secret: ::c_long = 447;
pub const SYS_process_mrelease: ::c_long = 448;
pub const SYS_futex_waitv: ::c_long = 449;
pub const SYS_set_mempolicy_home_node: ::c_long = 450;

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

0 comments on commit ad75ba1

Please sign in to comment.