mountinfo: remove the 64 KiB limit on mountinfo entries #289
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 · 362 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.353
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #289"
general
weight: 0.35
kolyshkin
mountinfo: extend mountinfo parsing benchmarks
Extend the existing benchmark to cover unfiltered parsing, prefix
filtering, and filters that terminate parsing early.
Move filter construction outside the benchmark loop to isolate
parser performance, and use strings.NewReader directly.
These benchmarks provide a baseline for evaluating changes to the
mountinfo parser, including removing the scanner's line-size limit.
mountinfo: remove the 64 KiB limit on mountinfo entries
bufio.Scanner limits individual lines to 64 KiB by default.
Valid mountinfo entries can exceed this limit, causing parsing
of the entire mount table to fail with "bufio.Scanner: token
too long".
Linux 6.8 introduced support for specifying overlayfs lower
directories individually through the fsconfig "lowerdir+" option,
allowing mount options to exceed the traditional page-size limit.
This was reproduced with an overlayfs mount with 500 lower
directories, resulting in a 92,088-byte mountinfo entry.
Replace bufio.Scanner with bufio.Reader.ReadString to remove
the fixed line-size limit while preserving incremental parsing,
early termination through filters, and line-ending handling.
Benchmarks on linux/arm64 show comparable performance, with
unchanged allocation counts and negligible differences in
allocated memory.
mountinfo: limit test output for VFSOptions mismatches
Mount options can be quite large, particularly for overlayfs mounts
with many lower directories. Dumping the entire Info struct on a
mismatch can produce tens of kilobytes of test output, even if the
mismatch is in an unrelated field.
Compare VFSOptions separately, reporting truncated values and their
lengths instead of dumping the entire field. For example:
VFSOptions mismatch: expected "rw,invalid" (10 bytes), got "rw" (2 bytes)
The full values are still compared; only the diagnostic output is
truncated.
Also make an unexpected entry count a fatal error to prevent
subsequent comparisons from panicking, and use strings.NewReader
directly instead of converting the input to a byte slice.
mountinfo: add regression coverage for long mountinfo entries
Add a regression test for mountinfo entries exceeding 64 KiB,
using an overlayfs mount with 500 lower directories specified
through the fsconfig "lowerdir+" option.
Generate the fixture programmatically to avoid committing a
large, repetitive test fixture, and reuse it in the parsing
benchmarks.
Benchmark results on linux/arm64: