Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux: add a new syscall SYS_mseal #3798

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4144,6 +4144,9 @@ fn test_linux(target: &str) {
// 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
1 change: 1 addition & 0 deletions libc-test/semver/linux-i686.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,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 @@ -109,6 +109,7 @@ SYS_lstat
SYS_mkdir
SYS_mknod
SYS_modify_ldt
SYS_mseal
SYS_open
SYS_pause
SYS_pipe
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 @@ -856,6 +856,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;

mod align;
pub use self::align::*;
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 @@ -824,3 +824,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;
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/gnu/b32/x86/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,7 @@ 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 @@ -941,6 +941,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
1 change: 1 addition & 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 @@ -431,6 +431,7 @@ 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/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/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;
1 change: 1 addition & 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 @@ -609,6 +609,7 @@ 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