Repository navigation
In short
- Static keys get a class (
hardening,feature,tracepointordebug, read from the binary): List static-key sites has a Class column with hardening and feature keys first, Annotate's summary names the hardening keys and their build default (cr_pinning off (on in this file)on the MemLens demo kernel, a memory image), and--list jump --class <class>keeps one class. - More dynamic-debug sites read as
pr_debug file:line "format"instead ofdescriptor.13+0x28: on the MemLens demo kernel 2,198 pr_debug sites (was 1,941). - The decompile check's wait can be cancelled: the comments and references stay and the summary says how to run the check later. Tested only with fake
ida_*modules; not yet run in IDA.
Details
-
Decompile check (menu): you can cancel its wait for IDA to analyse the new references. Prompted by a judge-style review: the wait has no time limit, so on a whole vmlinux it can be long, and it had no Cancel button. The wait has a box of its own with a Cancel button; writing the comments and references, decompiling again and counting for the summary keep their boxes without one. On Cancel (
ida_auto.auto_wait()returns false, as its IDA 9.1-9.5 stubs document) the second decompile pass is skipped, the comments and references Annotate wrote stay, and the summary window still opens, withdecompile check cancelled: IDA goes on analysing; when it has finished, Remove annotations and Annotate again to run the check. The WARN fall-through waits keep no Cancel button: they read the reanalysed sites right after each wait. Tested only with fakeida_*modules (anauto_wait()that returns false); not yet run in IDA.tests/check_ida_api.pyalso checks the wait-box andauto_wait()documentation it relies on (replace_wait_boxis no longer used). -
Static keys get a class:
hardening(a fixed list of 11 key names such asinit_on_alloc,randomize_kstack_offset,cr_pinning,switch_mm_cond_ibpb, arm64'sdynamic_scs_enabled),feature,tracepointordebug(dynamic debug), all read from the binary. kflow: List static-key sites has a Class column and lists hardening and feature keys first; Annotate's summary window has one line with the hardening keys and their build default, only when there are any (at most 3 names, keys whose state in the file differs from the default picked first, then+N more); the command line prints the sites per class and the defaults, and--list jump --class <class>keeps one class (or says that it has no sites, or that the__jump_tablewas not found or not decoded);--jsonstatic-key records, also the headless runner's, have aclassfield. The build default is bit 0 (JUMP_TYPE_TRUE) of the key'sstruct static_keytype word, notlikely/unlikely(switch_mm_cond_ibpbis tested withstatic_branch_likelybut is off by default); where the key's state in the file differs (a memory image), the line says so:cr_pinning off (on in this file)on the MemLens demo kernel (the window in the fake-IDA test:init_on_alloc on, randomize_kstack_offset on, cr_pinning off (on in this file), +7 more);bypass_usercopy_checksadds(checks on)/(checks off).python3 -m kflow <file>, re-run on this branch: MemLens demo kernel hardening 82, feature 5,229, tracepoint 1,728, debug 2,198 sites,init_on_allocandrandomize_kstack_offseton, the other 8 off; GKI 6.1 hardening 40, feature 7,906, tracepoint 2,683, debug 0,init_on_allocon,init_on_freeandrandomize_kstack_offsetoff, as its embedded config says; try moduledm-mod.kofeature 12, tracepoint 3, debug 7. In IDA a key in aSEG_BSSsegment is off; the new IDA calls are covered bytests/check_ida_api.pyandtests/check_ida_names.py(IDA 9.1-9.4 stubs). README: one sentence on the chooser line (1,906 -> 1,943 words,wc -w). -
Dynamic-debug keys of
pr_debug_ratelimited,dev_dbg_ratelimitedandnet_dbg_ratelimited(astruct _ddebugcalleddescriptor.N) and_ddebugrecords without a symbol of their own now readpr_debug file:line "format"like the others, instead ofdescriptor.13+0x28or__UNIQUE_ID_ddebug514+0x60(the struct must read as one: a source-file name and a line).python3 -m kflow <file>, re-run: try moduledm-mod.ko5 of its 22 keys (pr_debug sites 2 -> 7, symbol+offset 5 -> 0); MemLens demo kernel pr_debug sites 1,941 -> 2,198 (68descriptor*and 189 unnamed records), symbol+offset 439 -> 182, so the debug class is 257 sites larger than the 1,941 the summary used to print; Ubuntu 6.8 amd64 3,313 -> 3,382; GKI 6.1 has none. -
Current totals in docs/VERIFICATION.md: 235 checks (
tests/check_ida_api.py, IDA stubs 0.0.11; v0.0.7 said 232) and 96ida_*names.
Built by an AI agent (Claude, operated by Nightshift Labs). Not yet run in real IDA.