You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
api: fail a fact read that does not fit under the sysroot
kasld_resolve composes "<KASLD_SYSROOT><path>" into a KASLD_PATH_MAX
buffer and returned the bare path where the two did not fit, so a long
enough sysroot sent fact reads to the machine running the analysis while
the output still presented them as a captured tree. A 4091-byte sysroot
naming nothing read 124 facts; a short one naming nothing read 3.
The comment argued that a miss against the live tree beat a truncated
path, which weighs two options and omits the third. Nothing was
salvageable in any case: the buffer is KASLD_PATH_MAX at all five call
sites, so a prefixed path that does not fit is already longer than one
the kernel will open, and the fallback could only ever substitute a live
read for a read that had to fail.
Return NULL and fail with ENAMETOOLONG, which is what happened. The five
wrappers check it; kasld_read_file_line already propagates a null FILE,
and nothing outside the header calls kasld_resolve, so those five are all
of them. Short fact paths still resolve under an over-long root while
long ones fail, which is a decline and widens the window rather than
narrowing it.
check-sysroot-containment compares two sysroots that both name nothing,
one sized past the buffer, and requires them to read the same facts. A
live run supplies the control: a host exposing no more than the empty
sysroot does leaves nothing to detect, so the guard skips rather than
passing on an absence.
Copy file name to clipboardExpand all lines: docs/testing.md
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -209,6 +209,7 @@ stays plain, and setting `KASLD_COLOR` non-empty or empty forces either.
209
209
|`check-render-parity`| the text readout, the markdown report and JSON name the same set of resolved quantities for a given run † |
210
210
|`check-render-color`| coloured output is byte-identical to plain output once the escape sequences are removed, and markdown, JSON and oneline carry no escapes at all † |
211
211
|`check-wire-text`| a component cannot put an escape sequence on the terminal: a record whose `name`, or a disposition whose `gate` or `msg`, leaves printable ASCII is rejected, and the verbose echo of component output strips control bytes † |
212
+
|`check-sysroot-containment`| a `KASLD_SYSROOT` too long to build a fact path with fails the read instead of falling back to the analysing host's own `/proc` and `/sys` † |
212
213
|`check-guard-docs`| this table lists exactly the guards `make lint` runs — the same parity check `check-manpages` applies to flags, applied to the guard list itself |
213
214
|`check-matrix-summary`| the summary table in `docs/reproducibility.md` restates the full per-scenario matrix it precedes: same cells, same KASLR state, same `default` and `perf-open` results in both directions |
214
215
|`check-readout-docs`| documented sample output uses the renderer's current vocabulary and fits 100 columns (live output is measured separately by `check-render-width`) † |
@@ -510,6 +511,35 @@ differential against a colourless run passes while proving nothing. Determinism
510
511
comes from an empty sysroot plus stub components, which also supply the pinned
511
512
base the coloured branches need.
512
513
514
+
**`check-wire-text`** — A component's free text is data, and the fields
515
+
carrying it — a result's `name`, a disposition's `gate` and `msg` — are
516
+
rendered into the report an operator forwards. An erase-line sequence among
517
+
them redraws a line already printed, so a finding can be made to read as its
518
+
opposite by the report meant to expose it. `check-render-color` proves KASLD's
519
+
own escapes strip back to the plain rendering, which says nothing about escapes
520
+
arriving in data.
521
+
522
+
The admissible set stops at 0x7E rather than merely above 0x1F, because
523
+
0x80..0x9F is the C1 control range and a terminal in an 8-bit locale acts on it
524
+
with no ESC byte involved. Both halves are exercised. The guard also reads its
525
+
own output with `grep -a`: without it a high byte makes grep report a binary
526
+
match instead of lines, leaving the check searching nothing and passing against
0 commit comments