Merge pull request #1897 from Aaron1011/feature/sys-pidfd-open-clone3
Add SYS_pidfd_open and SYS_clone3
This commit is contained in:
commit
3e9945eb04
|
@ -2650,6 +2650,13 @@ fn test_linux(target: &str) {
|
|||
// headers.
|
||||
"P_PIDFD" => true,
|
||||
|
||||
// FIXME: Not currently available in headers
|
||||
"SYS_pidfd_open" if mips => true,
|
||||
|
||||
// FIXME: Not currently available in headers on MIPS
|
||||
// Not yet implemented on sparc64
|
||||
"SYS_clone3" if mips | sparc64 => true,
|
||||
|
||||
_ => false,
|
||||
}
|
||||
});
|
||||
|
|
|
@ -868,6 +868,8 @@ pub const SYS_pkey_mprotect: ::c_long = 394;
|
|||
pub const SYS_pkey_alloc: ::c_long = 395;
|
||||
pub const SYS_pkey_free: ::c_long = 396;
|
||||
pub const SYS_statx: ::c_long = 397;
|
||||
pub const SYS_pidfd_open: ::c_long = 434;
|
||||
pub const SYS_clone3: ::c_long = 435;
|
||||
|
||||
cfg_if! {
|
||||
if #[cfg(libc_align)] {
|
||||
|
|
|
@ -527,6 +527,8 @@ pub const SYS_pkey_mprotect: ::c_long = 4000 + 363;
|
|||
pub const SYS_pkey_alloc: ::c_long = 4000 + 364;
|
||||
pub const SYS_pkey_free: ::c_long = 4000 + 365;
|
||||
pub const SYS_statx: ::c_long = 4000 + 366;
|
||||
pub const SYS_pidfd_open: ::c_long = 4000 + 434;
|
||||
pub const SYS_clone3: ::c_long = 4000 + 435;
|
||||
|
||||
pub const O_DIRECT: ::c_int = 0x8000;
|
||||
pub const O_DIRECTORY: ::c_int = 0x10000;
|
||||
|
|
|
@ -872,3 +872,5 @@ pub const SYS_preadv2: ::c_long = 380;
|
|||
pub const SYS_pwritev2: ::c_long = 381;
|
||||
pub const SYS_kexec_file_load: ::c_long = 382;
|
||||
pub const SYS_statx: ::c_long = 383;
|
||||
pub const SYS_pidfd_open: ::c_long = 434;
|
||||
pub const SYS_clone3: ::c_long = 435;
|
||||
|
|
|
@ -961,6 +961,9 @@ pub const SYS_copy_file_range: ::c_long = 357;
|
|||
pub const SYS_preadv2: ::c_long = 358;
|
||||
pub const SYS_pwritev2: ::c_long = 359;
|
||||
pub const SYS_statx: ::c_long = 360;
|
||||
pub const SYS_pidfd_open: ::c_long = 434;
|
||||
// Reserved in the kernel, but not actually implemented yet
|
||||
pub const SYS_clone3: ::c_long = 435;
|
||||
|
||||
#[link(name = "util")]
|
||||
extern "C" {
|
||||
|
|
|
@ -1103,6 +1103,8 @@ pub const SYS_pkey_mprotect: ::c_long = 380;
|
|||
pub const SYS_pkey_alloc: ::c_long = 381;
|
||||
pub const SYS_pkey_free: ::c_long = 382;
|
||||
pub const SYS_statx: ::c_long = 383;
|
||||
pub const SYS_pidfd_open: ::c_long = 434;
|
||||
pub const SYS_clone3: ::c_long = 435;
|
||||
|
||||
// offsets in user_regs_structs, from sys/reg.h
|
||||
pub const EBX: ::c_int = 0;
|
||||
|
|
|
@ -993,6 +993,8 @@ pub const SYS_pkey_mprotect: ::c_long = 288;
|
|||
pub const SYS_pkey_alloc: ::c_long = 289;
|
||||
pub const SYS_pkey_free: ::c_long = 290;
|
||||
pub const SYS_statx: ::c_long = 291;
|
||||
pub const SYS_pidfd_open: ::c_long = 434;
|
||||
pub const SYS_clone3: ::c_long = 435;
|
||||
|
||||
#[link(name = "util")]
|
||||
extern "C" {
|
||||
|
|
|
@ -577,6 +577,8 @@ pub const SYS_pkey_mprotect: ::c_long = 5000 + 323;
|
|||
pub const SYS_pkey_alloc: ::c_long = 5000 + 324;
|
||||
pub const SYS_pkey_free: ::c_long = 5000 + 325;
|
||||
pub const SYS_statx: ::c_long = 5000 + 326;
|
||||
pub const SYS_pidfd_open: ::c_long = 5000 + 434;
|
||||
pub const SYS_clone3: ::c_long = 5000 + 435;
|
||||
|
||||
pub const SFD_CLOEXEC: ::c_int = 0x080000;
|
||||
|
||||
|
|
|
@ -1043,6 +1043,8 @@ pub const SYS_preadv2: ::c_long = 380;
|
|||
pub const SYS_pwritev2: ::c_long = 381;
|
||||
pub const SYS_kexec_file_load: ::c_long = 382;
|
||||
pub const SYS_statx: ::c_long = 383;
|
||||
pub const SYS_pidfd_open: ::c_long = 434;
|
||||
pub const SYS_clone3: ::c_long = 435;
|
||||
|
||||
#[link(name = "util")]
|
||||
extern "C" {
|
||||
|
|
|
@ -863,3 +863,5 @@ pub const SYS_pkey_mprotect: ::c_long = 288;
|
|||
pub const SYS_pkey_alloc: ::c_long = 289;
|
||||
pub const SYS_pkey_free: ::c_long = 290;
|
||||
pub const SYS_statx: ::c_long = 291;
|
||||
pub const SYS_pidfd_open: ::c_long = 434;
|
||||
pub const SYS_clone3: ::c_long = 435;
|
||||
|
|
|
@ -1007,6 +1007,8 @@ pub const SYS_setfsuid: ::c_long = 215;
|
|||
pub const SYS_setfsgid: ::c_long = 216;
|
||||
pub const SYS_newfstatat: ::c_long = 293;
|
||||
pub const SYS_statx: ::c_long = 379;
|
||||
pub const SYS_pidfd_open: ::c_long = 434;
|
||||
pub const SYS_clone3: ::c_long = 435;
|
||||
|
||||
#[link(name = "util")]
|
||||
extern "C" {
|
||||
|
|
|
@ -973,6 +973,9 @@ pub const SYS_copy_file_range: ::c_long = 357;
|
|||
pub const SYS_preadv2: ::c_long = 358;
|
||||
pub const SYS_pwritev2: ::c_long = 359;
|
||||
pub const SYS_statx: ::c_long = 360;
|
||||
pub const SYS_pidfd_open: ::c_long = 434;
|
||||
// Reserved in the kernel, but not actually implemented yet
|
||||
pub const SYS_clone3: ::c_long = 435;
|
||||
|
||||
#[link(name = "util")]
|
||||
extern "C" {
|
||||
|
|
|
@ -409,6 +409,8 @@ pub const SYS_pkey_mprotect: ::c_long = 329;
|
|||
pub const SYS_pkey_alloc: ::c_long = 330;
|
||||
pub const SYS_pkey_free: ::c_long = 331;
|
||||
pub const SYS_statx: ::c_long = 332;
|
||||
pub const SYS_pidfd_open: ::c_long = 434;
|
||||
pub const SYS_clone3: ::c_long = 435;
|
||||
|
||||
extern "C" {
|
||||
pub fn sysctl(
|
||||
|
|
|
@ -337,6 +337,8 @@ pub const SYS_pkey_mprotect: ::c_long = __X32_SYSCALL_BIT + 329;
|
|||
pub const SYS_pkey_alloc: ::c_long = __X32_SYSCALL_BIT + 330;
|
||||
pub const SYS_pkey_free: ::c_long = __X32_SYSCALL_BIT + 331;
|
||||
pub const SYS_statx: ::c_long = __X32_SYSCALL_BIT + 332;
|
||||
pub const SYS_pidfd_open: ::c_long = __X32_SYSCALL_BIT + 434;
|
||||
pub const SYS_clone3: ::c_long = __X32_SYSCALL_BIT + 435;
|
||||
pub const SYS_rt_sigaction: ::c_long = __X32_SYSCALL_BIT + 512;
|
||||
pub const SYS_rt_sigreturn: ::c_long = __X32_SYSCALL_BIT + 513;
|
||||
pub const SYS_ioctl: ::c_long = __X32_SYSCALL_BIT + 514;
|
||||
|
|
Loading…
Reference in New Issue