Skip to content

Commit 036fe2e

Browse files
authored
Merge pull request #3553 from rusty-snake/mfd-exec
Add MFD_NOEXEC_SEAL and MFD_EXEC
2 parents adaec1d + 8b68569 commit 036fe2e

File tree

5 files changed

+12
-0
lines changed

5 files changed

+12
-0
lines changed

libc-test/build.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3786,6 +3786,10 @@ fn test_linux(target: &str) {
37863786
if name.starts_with("NI_IDN") {
37873787
return true;
37883788
}
3789+
// FIXME: Requires >= 6.3 kernel headers
3790+
if name == "MFD_NOEXEC_SEAL" || name == "MFD_EXEC" {
3791+
return true;
3792+
}
37893793
}
37903794
match name {
37913795
// These constants are not available if gnu headers have been included

libc-test/semver/android.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,9 @@ MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE
12141214
MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ
12151215
MFD_ALLOW_SEALING
12161216
MFD_CLOEXEC
1217+
MFD_EXEC
12171218
MFD_HUGETLB
1219+
MFD_NOEXEC_SEAL
12181220
MINIX2_SUPER_MAGIC
12191221
MINIX2_SUPER_MAGIC2
12201222
MINIX_SUPER_MAGIC

libc-test/semver/linux.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,9 @@ MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE
14481448
MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ
14491449
MFD_ALLOW_SEALING
14501450
MFD_CLOEXEC
1451+
MFD_EXEC
14511452
MFD_HUGETLB
1453+
MFD_NOEXEC_SEAL
14521454
MINSIGSTKSZ
14531455
MMAP_PAGE_ZERO
14541456
MNT_DETACH

src/unix/linux_like/android/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2275,6 +2275,8 @@ pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
22752275
pub const MFD_CLOEXEC: ::c_uint = 0x0001;
22762276
pub const MFD_ALLOW_SEALING: ::c_uint = 0x0002;
22772277
pub const MFD_HUGETLB: ::c_uint = 0x0004;
2278+
pub const MFD_NOEXEC_SEAL: ::c_uint = 0x0008;
2279+
pub const MFD_EXEC: ::c_uint = 0x0010;
22782280
pub const MFD_HUGE_64KB: ::c_uint = 0x40000000;
22792281
pub const MFD_HUGE_512KB: ::c_uint = 0x4c000000;
22802282
pub const MFD_HUGE_1MB: ::c_uint = 0x50000000;

src/unix/linux_like/linux/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2433,6 +2433,8 @@ pub const CMSPAR: ::tcflag_t = 0o10000000000;
24332433
pub const MFD_CLOEXEC: ::c_uint = 0x0001;
24342434
pub const MFD_ALLOW_SEALING: ::c_uint = 0x0002;
24352435
pub const MFD_HUGETLB: ::c_uint = 0x0004;
2436+
pub const MFD_NOEXEC_SEAL: ::c_uint = 0x0008;
2437+
pub const MFD_EXEC: ::c_uint = 0x0010;
24362438
pub const MFD_HUGE_64KB: ::c_uint = 0x40000000;
24372439
pub const MFD_HUGE_512KB: ::c_uint = 0x4c000000;
24382440
pub const MFD_HUGE_1MB: ::c_uint = 0x50000000;

0 commit comments

Comments
 (0)