@@ -4037,9 +4037,6 @@ fn test_linux(target: &str) {
40374037 // FIXME(linux): Requires >= 6.12 kernel headers.
40384038 "mnt_ns_info" => true ,
40394039
4040- // FIXME(linux): Requires >= 6.4 kernel headers.
4041- "ptrace_sud_config" => true ,
4042-
40434040 // Struct has changed for new musl versions
40444041 "tcp_info" if old_musl => true ,
40454042
@@ -4095,20 +4092,6 @@ fn test_linux(target: &str) {
40954092 if name. starts_with ( "NI_IDN" ) {
40964093 return true ;
40974094 }
4098- // FIXME: Requires >= 6.3 kernel headers
4099- if loongarch64 && ( name == "MFD_NOEXEC_SEAL" || name == "MFD_EXEC" ) {
4100- return true ;
4101- }
4102- // FIXME: Requires >= 6.3 (6.6) kernel headers
4103- if name == "PR_GET_MDWE" || name == "PR_MDWE_NO_INHERIT" || name == "PR_MDWE_REFUSE_EXEC_GAIN" || name == "PR_SET_MDWE" {
4104- return true ;
4105- }
4106- // Requires musl >= 1.2
4107- if old_musl && ( name == "SO_PREFER_BUSY_POLL"
4108- || name == "SO_BUSY_POLL_BUDGET" )
4109- {
4110- return true ;
4111- }
41124095 // FIXME(musl): Not in musl yet
41134096 if name == "SO_NETNS_COOKIE"
41144097 || name == "SO_BUF_LOCK"
@@ -4129,20 +4112,45 @@ fn test_linux(target: &str) {
41294112 {
41304113 return true ;
41314114 }
4132- // Values changed in newer musl versions on these arches
4133- if old_musl && ( riscv64 || x86_64) && name == "O_LARGEFILE" {
4134- return true ;
4135- }
4136- // Values changed in newer musl versions
4137- if old_musl && name == "RLIM_NLIMITS" {
4138- return true ;
4139- }
41404115 // FIXME: Does not exist on non-x86 architectures, slated for removal
41414116 // in libc in 1.0
41424117 if ppc64 && name == "MAP_32BIT" {
41434118 return true ;
41444119 }
41454120 }
4121+ if old_musl {
4122+ // Constants that don't exist on the old version of musl we test with, but do exist
4123+ // on newer versions.
4124+ match name {
4125+ | "FAN_EVENT_INFO_TYPE_ERROR"
4126+ | "FAN_EVENT_INFO_TYPE_NEW_DFID_NAME"
4127+ | "FAN_EVENT_INFO_TYPE_OLD_DFID_NAME"
4128+ | "FAN_FS_ERROR"
4129+ | "FAN_INFO"
4130+ | "FAN_MARK_EVICTABLE"
4131+ | "FAN_MARK_IGNORE"
4132+ | "FAN_MARK_IGNORE_SURV"
4133+ | "FAN_RENAME"
4134+ | "FAN_REPORT_DFID_NAME_TARGET"
4135+ | "FAN_REPORT_TARGET_FID"
4136+ | "FAN_RESPONSE_INFO_AUDIT_RULE"
4137+ | "FAN_RESPONSE_INFO_NONE"
4138+ | "IPPROTO_ETHERNET"
4139+ | "IPPROTO_MPTCP"
4140+ | "PR_GET_MDWE"
4141+ | "PR_MDWE_NO_INHERIT"
4142+ | "PR_MDWE_REFUSE_EXEC_GAIN"
4143+ | "PR_SET_MDWE"
4144+ | "RLIM_NLIMITS"
4145+ | "SI_DETHREAD"
4146+ | "SO_BUSY_POLL_BUDGET"
4147+ | "SO_PREFER_BUSY_POLL"
4148+ => return true ,
4149+ // Values changed in newer musl versions on these arches
4150+ "O_LARGEFILE" if riscv64 || x86_64 => return true ,
4151+ _ => ( ) ,
4152+ }
4153+ }
41464154 match name {
41474155 // These constants are not available if gnu headers have been included
41484156 // and can therefore not be tested here
@@ -4195,43 +4203,17 @@ fn test_linux(target: &str) {
41954203 // deprecated: not available from Linux kernel 5.6:
41964204 "VMADDR_CID_RESERVED" => true ,
41974205
4198- // IPPROTO_MAX was increased in 5.6 for IPPROTO_MPTCP:
4199- | "IPPROTO_MAX"
4200- | "IPPROTO_ETHERNET"
4201- | "IPPROTO_MPTCP" => true ,
4206+ // FIXME(value): IPPROTO_MAX was increased in 5.6 for IPPROTO_MPTCP:
4207+ "IPPROTO_MAX" => true ,
42024208
42034209 // FIXME(linux): Not yet implemented on sparc64
42044210 "SYS_clone3" if sparc64 => true ,
42054211
42064212 // FIXME(linux): Not defined on ARM, gnueabihf, mips, musl, PowerPC, riscv64, s390x, and sparc64.
42074213 "SYS_memfd_secret" if arm | gnueabihf | mips | musl | ppc | riscv64 | s390x | sparc64 => true ,
42084214
4209- // FIXME(linux): Added in Linux 5.16
4210- // https://github.com/torvalds/linux/commit/039c0ec9bb77446d7ada7f55f90af9299b28ca49
4211- "SYS_futex_waitv" => true ,
4212-
4213- // FIXME(linux): Added in Linux 5.17
4214- // https://github.com/torvalds/linux/commit/c6018b4b254971863bd0ad36bb5e7d0fa0f0ddb0
4215- "SYS_set_mempolicy_home_node" => true ,
4216-
4217- // FIXME(linux): Added in Linux 5.18
4218- // https://github.com/torvalds/linux/commit/8b5413647262dda8d8d0e07e14ea1de9ac7cf0b2
4219- "NFQA_PRIORITY" => true ,
4220-
4221- // FIXME(linux): requires more recent kernel headers on CI
4222- | "UINPUT_VERSION"
4223- | "SW_MAX"
4224- | "SW_CNT"
4225- if ppc64 || riscv64 => true ,
4226-
4227- // FIXME(linux): requires more recent kernel headers on CI
4228- "SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV" if sparc64 => true ,
4229-
4230- // FIXME(linux): Not currently available in headers on ARM and musl.
4231- "NETLINK_GET_STRICT_CHK" if arm => true ,
4232-
42334215 // Skip as this signal codes and trap reasons need newer headers
4234- "SI_DETHREAD" | " TRAP_PERF" => true ,
4216+ "TRAP_PERF" => true ,
42354217
42364218 // kernel constants not available in uclibc 1.0.34
42374219 | "EXTPROC"
@@ -4305,15 +4287,6 @@ fn test_linux(target: &str) {
43054287 // value changed
43064288 "NF_NETDEV_NUMHOOKS" if sparc64 => true ,
43074289
4308- // FIXME(linux): Requires >= 6.3 kernel headers
4309- "MFD_EXEC" | "MFD_NOEXEC_SEAL" if sparc64 => true ,
4310-
4311- // kernel 6.1 minimum
4312- "MADV_COLLAPSE" => true ,
4313-
4314- // kernel 6.2 minimum
4315- "TUN_F_USO4" | "TUN_F_USO6" | "IFF_NO_CARRIER" => true ,
4316-
43174290 // kernel 6.9 minimum
43184291 "RWF_NOAPPEND" => true ,
43194292
@@ -4323,38 +4296,6 @@ fn test_linux(target: &str) {
43234296 // kernel 6.14 minimum
43244297 "RWF_DONTCACHE" => true ,
43254298
4326- // FIXME(linux): Requires more recent kernel headers
4327- | "IFLA_PARENT_DEV_NAME" // linux v5.13+
4328- | "IFLA_PARENT_DEV_BUS_NAME" // linux v5.13+
4329- | "IFLA_GRO_MAX_SIZE" // linux v5.16+
4330- | "IFLA_TSO_MAX_SIZE" // linux v5.18+
4331- | "IFLA_TSO_MAX_SEGS" // linux v5.18+
4332- | "IFLA_ALLMULTI" // linux v6.0+
4333- | "MADV_DONTNEED_LOCKED" // linux v5.18+
4334- => true ,
4335- "SCTP_FUTURE_ASSOC" | "SCTP_CURRENT_ASSOC" | "SCTP_ALL_ASSOC" | "SCTP_PEER_ADDR_THLDS_V2" => true , // linux 5.5+
4336-
4337- // kernel 6.5 minimum
4338- "MOVE_MOUNT_BENEATH" => true ,
4339- // FIXME(linux): Requires linux 6.1
4340- "ALG_SET_KEY_BY_KEY_SERIAL" | "ALG_SET_DRBG_ENTROPY" => true ,
4341-
4342- // FIXME(linux): Requires more recent kernel headers
4343- | "FAN_FS_ERROR" // linux v5.16+
4344- | "FAN_RENAME" // linux v5.17+
4345- | "FAN_REPORT_TARGET_FID" // linux v5.17+
4346- | "FAN_REPORT_DFID_NAME_TARGET" // linux v5.17+
4347- | "FAN_MARK_EVICTABLE" // linux v5.19+
4348- | "FAN_MARK_IGNORE" // linux v6.0+
4349- | "FAN_MARK_IGNORE_SURV" // linux v6.0+
4350- | "FAN_EVENT_INFO_TYPE_ERROR" // linux v5.16+
4351- | "FAN_EVENT_INFO_TYPE_OLD_DFID_NAME" // linux v5.17+
4352- | "FAN_EVENT_INFO_TYPE_NEW_DFID_NAME" // linux v5.17+
4353- | "FAN_RESPONSE_INFO_NONE" // linux v5.16+
4354- | "FAN_RESPONSE_INFO_AUDIT_RULE" // linux v5.16+
4355- | "FAN_INFO" // linux v5.16+
4356- => true ,
4357-
43584299 // musl doesn't use <linux/fanotify.h> in <sys/fanotify.h>
43594300 "FAN_REPORT_PIDFD"
43604301 | "FAN_REPORT_DIR_FID"
@@ -4367,36 +4308,24 @@ fn test_linux(target: &str) {
43674308 | "FAN_EPIDFD"
43684309 if musl => true ,
43694310
4370- // FIXME(linux ): Requires linux 6.5
4311+ // FIXME(value ): value needs update
43714312 "NFT_MSG_MAX" => true ,
43724313
43734314 // FIXME(linux): Requires >= 6.6 kernel headers.
4374- "XDP_USE_SG"
4375- | "XDP_PKT_CONTD"
4376- =>
4377- {
4378- true
4379- }
4315+ "XDP_USE_SG" | "XDP_PKT_CONTD" => true ,
43804316
4381- // FIXME(linux): Requires >= 6.6 kernel headers.
4382- "PR_MDWE_NO_INHERIT" => true ,
4317+ // FIXME(linux): Missing only on this platform for some reason
4318+ "PR_MDWE_NO_INHERIT" if gnueabihf => true ,
43834319
43844320 // FIXME(linux): Requires >= 6.8 kernel headers.
43854321 "XDP_UMEM_TX_SW_CSUM"
43864322 | "XDP_TXMD_FLAGS_TIMESTAMP"
43874323 | "XDP_TXMD_FLAGS_CHECKSUM"
43884324 | "XDP_TX_METADATA"
4389- =>
4390- {
4391- true
4392- }
4325+ => true ,
43934326
43944327 // FIXME(linux): Requires >= 6.11 kernel headers.
4395- "XDP_UMEM_TX_METADATA_LEN"
4396- =>
4397- {
4398- true
4399- }
4328+ "XDP_UMEM_TX_METADATA_LEN" => true ,
44004329
44014330 // FIXME(linux): Requires >= 6.11 kernel headers.
44024331 "NS_GET_MNTNS_ID" | "NS_GET_PID_FROM_PIDNS" | "NS_GET_TGID_FROM_PIDNS" | "NS_GET_PID_IN_PIDNS" | "NS_GET_TGID_IN_PIDNS" => true ,
@@ -4439,15 +4368,11 @@ fn test_linux(target: &str) {
44394368 | "PF_SUSPEND_TASK" => true ,
44404369
44414370 // FIXME(linux): Requires >= 6.9 kernel headers.
4442- "EPIOCSPARAMS"
4443- | "EPIOCGPARAMS" => true ,
4371+ "EPIOCSPARAMS" | "EPIOCGPARAMS" => true ,
44444372
44454373 // FIXME(linux): Requires >= 6.11 kernel headers.
44464374 "MAP_DROPPABLE" => true ,
44474375
4448- // FIXME(linux): Requires >= 6.2 kernel headers.
4449- "SOF_TIMESTAMPING_OPT_ID_TCP" => true ,
4450-
44514376 // FIXME(linux): Requires >= 6.12 kernel headers.
44524377 "SOF_TIMESTAMPING_OPT_RX_FILTER" => true ,
44534378
@@ -4457,12 +4382,10 @@ fn test_linux(target: &str) {
44574382 | "SO_DEVMEM_DONTNEED"
44584383 | "SCM_DEVMEM_LINEAR"
44594384 | "SCM_DEVMEM_DMABUF" => true ,
4385+
44604386 // FIXME(linux): Requires >= 6.4 kernel headers.
44614387 "PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG" | "PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG" => true ,
44624388
4463- // FIXME(linux): Requires >= 6.6 kernel headers.
4464- "PROC_EVENT_NONZERO_EXIT" => true ,
4465-
44664389 // FIXME(linux): Requires >= 6.14 kernel headers.
44674390 "SECBIT_EXEC_DENY_INTERACTIVE"
44684391 | "SECBIT_EXEC_DENY_INTERACTIVE_LOCKED"
0 commit comments