syscalls: compare filesystem types as u64s #426
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.43) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 380 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.356
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #426"
general
weight: 0.35
cyphar
libpathrs does not compile on s390x with musl:
error[E0308]: mismatched types
--> src/procfs.rs:982:19
|
982 | if fs_type != rustix_fs::PROC_SUPER_MAGIC {
| ------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected
u32, foundu64The type of "struct statfs"'s f_type field is not always the same as
rustix::fs::FsWord. s390x uses rustix's libc backend, where FsWord is a
u64 for musl, but the libc crate declares statfs.f_type as a c_uint on
s390x-musl -- so the two cannot be compared. (This only happens on musl;
on s390x-gnu both types are u32s, which is why nobody noticed.)
Rather than relying on those two types matching, add a fstatfs_type()
wrapper that widens statfs.f_type to a u64 and use our own u64 constants
for the filesystem magic numbers, so that the comparisons compile
regardless of which architecture and rustix backend we are built for.
Our check-cross matrix only contained s390x-unknown-linux-gnu, so it
could never have caught this -- add s390x-unknown-linux-musl as well.
rustup does not distribute a pre-built libstd for that target (it is
tier 3), so that matrix entry uses nightly Rust and -Zbuild-std to build
libstd itself.
Fixes #425
Test:
docker build --platform amd64,arm64,ppc64le,s390x,riscv64,linux/arm/v6,linux/arm/v7 .