Skip to content

Commit

Permalink
Merge pull request rust-lang#3888 from tgross35/backport-broccoli
Browse files Browse the repository at this point in the history
[0.2] Backport three pull requests
  • Loading branch information
tgross35 authored Aug 29, 2024
2 parents 567c854 + ff9b210 commit 7efc2a0
Show file tree
Hide file tree
Showing 20 changed files with 30 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4210,6 +4210,12 @@ fn test_linux(target: &str) {
true
}

// FIXME: Requires >= 6.6 kernel headers.
"SYS_fchmodat2" => true,

// FIXME: Requires >= 6.10 kernel headers.
"SYS_mseal" => true,

// FIXME: seems to not be available all the time (from <include/linux/sched.h>:
"PF_VCPU"
| "PF_IDLE"
Expand Down
2 changes: 2 additions & 0 deletions libc-test/semver/apple.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,8 @@ NOTE_FORK
NOTE_LEEWAY
NOTE_LINK
NOTE_LOWAT
NOTE_MACHTIME
NOTE_MACH_CONTINUOUS_TIME
NOTE_NONE
NOTE_NSECONDS
NOTE_PCTRLMASK
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/linux-i686.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ SYS_mknod
SYS_mmap2
SYS_modify_ldt
SYS_mpx
SYS_mseal
SYS_nice
SYS_oldfstat
SYS_oldlstat
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/linux-powerpc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ SYS_mknod
SYS_mmap2
SYS_modify_ldt
SYS_mpx
SYS_mseal
SYS_multiplexer
SYS_nice
SYS_oldfstat
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/linux-s390x.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ SYS_link
SYS_lstat
SYS_mkdir
SYS_mknod
SYS_mseal
SYS_newfstatat
SYS_nice
SYS_open
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/linux-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ SYS_lstat
SYS_mkdir
SYS_mknod
SYS_modify_ldt
SYS_mseal
SYS_open
SYS_pause
SYS_pipe
Expand Down
2 changes: 2 additions & 0 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4522,6 +4522,8 @@ pub const NOTE_ABSOLUTE: u32 = 0x00000008;
pub const NOTE_LEEWAY: u32 = 0x00000010;
pub const NOTE_CRITICAL: u32 = 0x00000020;
pub const NOTE_BACKGROUND: u32 = 0x00000040;
pub const NOTE_MACH_CONTINUOUS_TIME: u32 = 0x00000080;
pub const NOTE_MACHTIME: u32 = 0x00000100;
pub const NOTE_TRACK: u32 = 0x00000001;
pub const NOTE_TRACKERR: u32 = 0x00000002;
pub const NOTE_CHILD: u32 = 0x00000004;
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/gnu/b32/arm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,7 @@ 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_mseal: ::c_long = 462;

cfg_if! {
if #[cfg(libc_align)] {
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/gnu/b32/powerpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -823,3 +823,4 @@ 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_mseal: ::c_long = 462;
2 changes: 2 additions & 0 deletions src/unix/linux_like/linux/gnu/b32/x86/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1044,6 +1044,8 @@ 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_fchmodat2: ::c_long = 452;
pub const SYS_mseal: ::c_long = 462;

// offsets in user_regs_structs, from sys/reg.h
pub const EBX: ::c_int = 0;
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,7 @@ 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_mseal: ::c_long = 462;

pub const PROT_BTI: ::c_int = 0x10;
pub const PROT_MTE: ::c_int = 0x20;
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/gnu/b64/s390x.rs
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,7 @@ 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_mseal: ::c_long = 462;

extern "C" {

Expand Down
2 changes: 2 additions & 0 deletions src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,8 @@ 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_fchmodat2: ::c_long = 452;
pub const SYS_mseal: ::c_long = 462;

extern "C" {
pub fn sysctl(
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ pub const SYS_memfd_secret: ::c_long = __X32_SYSCALL_BIT + 447;
pub const SYS_process_mrelease: ::c_long = __X32_SYSCALL_BIT + 448;
pub const SYS_futex_waitv: ::c_long = __X32_SYSCALL_BIT + 449;
pub const SYS_set_mempolicy_home_node: ::c_long = __X32_SYSCALL_BIT + 450;
pub const SYS_fchmodat2: ::c_long = __X32_SYSCALL_BIT + 452;
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;
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/musl/b32/arm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,7 @@ 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_mseal: ::c_long = 462;

extern "C" {
pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t;
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/musl/b32/powerpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,7 @@ 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_mseal: ::c_long = 462;

extern "C" {
pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t;
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/musl/b32/x86/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,7 @@ 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_fchmodat2: ::c_long = 452;

// offsets in user_regs_structs, from sys/reg.h
pub const EBX: ::c_int = 0;
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/musl/b64/aarch64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ 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_mseal: ::c_long = 462;

pub const MCL_CURRENT: ::c_int = 0x0001;
pub const MCL_FUTURE: ::c_int = 0x0002;
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/musl/b64/s390x.rs
Original file line number Diff line number Diff line change
Expand Up @@ -722,3 +722,4 @@ 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_mseal: ::c_long = 462;
2 changes: 2 additions & 0 deletions src/unix/linux_like/linux/musl/b64/x86_64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,8 @@ 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_fchmodat2: ::c_long = 452;
pub const SYS_mseal: ::c_long = 462;

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

0 comments on commit 7efc2a0

Please sign in to comment.