Commit 1268488
committed
orchestrator: resolve the engine at the caller, not in the summary builder
compute_kaslr_info() called engine_resolve() and the sync itself, so a function
named for building a summary also owned when the engine ran. Its five
KASLD_TESTING blocks all hung off that: they reached file-static engine globals
the testing translation unit does not link, so 202 of the function's 382 lines -
53% - were cut out of the very binary that tests it, and each quantity gaining a
render sink widened the gap further.
Take the two resolutions as PARAMETERS instead. struct engine was already in a
header and struct engine_resolution is plain data, so the types are universal
even where the instances are not; the gates become runtime `if (auth)` /
`if (likely)`, and the resolution moves to emit_summary(), the single caller.
compute_kaslr_info() now carries zero KASLD_TESTING blocks and compiles whole in
every build.
Not merely tidier: test_compute_kaslr_info_engine_pin_overrides_raw_anchor
constructs a snapshot with a pinned estimate and asserts it beats the
verdict-blind anchor scan. That test could not have been written before, because
the code it exercises did not exist in this binary. Disabling the reconcile
fails it.
One hazard the move introduced and closed: a block dereferenced the likely
snapshot under the auth guard. kasld_reconcile_concrete_base reads the likely
edges only under have_likely, so a zeroed stand-in is sound; every auth-> and
likely-> use was then audited against the guard it sits under.1 parent 1525c71 commit 1268488
3 files changed
Lines changed: 258 additions & 151 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
887 | 887 | | |
888 | 888 | | |
889 | 889 | | |
890 | | - | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
891 | 903 | | |
892 | 904 | | |
893 | 905 | | |
| |||
0 commit comments