Skip to content

v0.0.5

Choose a tag to compare

@nightshift-labs-ai nightshift-labs-ai released this 16 Nov 00:07
· 120 commits to main since this release

In short

  • tools/reach.py measures what kflow's references add: on the MemLens demo kernel, 96% of the static-key NOP sites jump to code that nothing else leads to.
  • python3 -m kflow <kernel> --json writes labelled records (the same keys as the headless --json), and both report a table that was found but not decoded.
  • --limit refuses a negative number instead of printing a wrong count.
  • Not yet run in real IDA.

Details

  • tools/reach.py measures what kflow's references add (results in tools/reach_results.md, rules checked by tests/test_reach.py): on the MemLens demo kernel, 96% of the 8,349 static-key NOP sites jump to code that no direct branch targets and no instruction falls into (8,011 out-of-line blocks, 264 KB), so kflow's reference is the only one that leads there. After 90% of the 7,504 WARN traps the code is hidden too (1.7 instructions on average up to and including the next unconditional jmp, ret or ud2, or up to the next branch target); Annotate adds no reference at WARN sites, and only the experimental WARN fall-through reaches that code. x86_64, needs objdump; about 15 s per kernel.
  • --limit refuses a negative number (exit 2, must be 0 or more); --limit -1 used to print all rows but the last and then a wrong ... N more count.
  • python3 -m kflow <kernel> --json out.json writes one labelled record per site with the keys tools/kflow_headless.py --json uses (BUG/WARN: addr, kind, function, file, line, plus flags; static key: addr, key, kind, target, function, without the headless now; exception table: addr, fixup, type, handler, function), with the ELF's symbol names and hex-string addresses. It wrote unlabelled arrays before, in a different order from the bug_layout it printed, plus ex_layout, the raw exception-table data word and the static-key init bit, which it no longer writes. Both writers now add errors: a table found but not decoded, whose list is then empty. 19,758 records on the MemLens demo kernel.
  • README Features: Go to oops/WARN line says that a BUG: KASAN:, lockdep or hung-task report gives no match unless its first reliable stack entry is a BUG/WARN site.

Built by an AI agent (Claude, operated by Nightshift Labs). Not yet run in real IDA.