mirror of
https://codeberg.org/dabao1955/apk-reverse.git
synced 2026-11-30 20:00:25 +08:00
Merge PR #6 "Hardware pass (stage 1)" (dabao1955/feat/ete)
Merges the hardware-layer pass onto the dexsql commit: arm64 hardware
watchpoints, ETE differential tracing, kernel-side event injection, SPE/BRBE
sampling and crash forensics, address symbolization and interpreter-trace
de-slicing. 33 files, 6 new scripts, 6 new test modules, 4 new reference
documents.
The only conflict was in evidence/capability-matrix.json: both sides appended
to the same array tail. Resolved by keeping both -- the PR's seven entries
(44 rows total now) -- and re-validated as JSON before staging.
Verified on the merged tree, not on the PR branch alone:
* check_repo.py, check_refs.py, check_commands.py, check_routing.py and
check_budget.py all pass with zero problems;
* pytest: 766 passed, 172 skipped, 25 xfailed -- the 141 tests this PR adds
all pass alongside the 625 that were already there;
* the PR's host-side claims were reproduced by hand, not taken on trust:
`hw_watch.py plan --addr 0x1004 --len 4 --access w` returns
`cr: 7701` (WCR 0x1E15) exactly as the record says, both refusals exit 2
with the documented reason strings, and the kernel scaffold's
generate/verify round trip returns RESULT=ok.
One documentation defect was found and fixed in the merge: EXTENSION-kernel-instrument.md
recorded `verified 3 kernel-side file(s)` while the same page's own generate
output lists four (kpm/src/kwatch.c, kpm/Makefile, lkm/kwatch.c, lkm/Makefile)
and the tool reports 4. The page now says 4.
Everything the PR ships that needs a device or a kernel toolchain stays
labelled unverified in the files themselves, which is the property that made
it mergeable.
This commit is contained in:
commit
e151d7d605
33 files changed
+5358
-6
No files matched your search
@@ -416,6 +416,83 @@
|
||||
"evidence_not_shipped": ["docs/tool-verification/README.md (repository root, not shipped)"],
|
||||
"limits": "Determining who owns a gate is covered; breaking an authorization the server performs is not. There is no client-side patch that reaches it, and the honest deliverable is the residual: which authority decides, and why the artifact cannot change it."
|
||||
},
|
||||
{
|
||||
"capability": "hardware-watchpoints-ptrace",
|
||||
"group": "native-dynamic",
|
||||
"status": "partial",
|
||||
"route_measured": false,
|
||||
"strength": "unverified",
|
||||
"benchmark_rows": [],
|
||||
"evidence": ["references/hardware-watchpoints.md", "scripts/hw_watch.py"],
|
||||
"evidence_not_shipped": ["docs/tool-verification/EXTENSION-hw-watchpoints.md (repository root, not shipped)"],
|
||||
"limits": "Encoders, refusals and the emitted helper's static aarch64 build are measured on the host; arming a watchpoint on a device, the slot-capacity probe and the control run were never exercised here. The ptrace route leaves TracerPid visible by design -- the ledger in the reference is the contract."
|
||||
},
|
||||
{
|
||||
"capability": "trace-differential-reduction",
|
||||
"group": "native-dynamic",
|
||||
"status": "partial",
|
||||
"route_measured": true,
|
||||
"strength": "observed",
|
||||
"benchmark_rows": [],
|
||||
"evidence": ["references/ete-diff-tracing.md", "scripts/trace_diff.py"],
|
||||
"evidence_not_shipped": ["docs/tool-verification/EXTENSION-ete-diff.md (repository root, not shipped)"],
|
||||
"limits": "The reducer/differ is host-tested on synthetic flattened-dispatcher fixtures in both raw and run_probe-wrapped Stalker grammars. No producer (Stalker pair or cs_etm decode) was ever run through it end to end on a real target."
|
||||
},
|
||||
{
|
||||
"capability": "ete-hardware-tracing",
|
||||
"group": "native-dynamic",
|
||||
"status": "blocked",
|
||||
"route_measured": false,
|
||||
"strength": "unverified",
|
||||
"benchmark_rows": [],
|
||||
"evidence": ["references/ete-diff-tracing.md", "scripts/ete_capture.py"],
|
||||
"evidence_not_shipped": ["docs/tool-verification/EXTENSION-ete-diff.md (repository root, not shipped)"],
|
||||
"limits": "Gates, recipe and capture wrapper are host-measured to the no-device boundary. No coresight capture or decode ever ran here; the reference device's kernel (4.14.186) closes the gate permanently. The --control record is the one-command check that upgrades or refutes the route on a real device."
|
||||
},
|
||||
{
|
||||
"capability": "kernel-instrument-injection",
|
||||
"group": "kernel",
|
||||
"status": "blocked",
|
||||
"route_measured": false,
|
||||
"strength": "unverified",
|
||||
"benchmark_rows": [],
|
||||
"evidence": ["references/kernel-event-injection.md", "scripts/kernel_instrument_scaffold.py"],
|
||||
"evidence_not_shipped": ["docs/tool-verification/EXTENSION-kernel-instrument.md (repository root, not shipped)"],
|
||||
"limits": "Generate/verify and the shared spec-refusal rules are measured on the host. No kernel-side file was ever compiled or loaded; the register-rewrite action is labelled experimental in the template itself. Same gate family as the syscall-mask scaffold: a userspace carrier arms nothing."
|
||||
},
|
||||
{
|
||||
"capability": "spe-brbe-crash-forensics",
|
||||
"group": "native-dynamic",
|
||||
"status": "partial",
|
||||
"route_measured": false,
|
||||
"strength": "unverified",
|
||||
"benchmark_rows": [],
|
||||
"evidence": ["references/hardware-sampling-and-crash.md"],
|
||||
"evidence_not_shipped": ["docs/tool-verification/EXTENSION-sampling-crash.md (repository root, not shipped)"],
|
||||
"limits": "SPE data-flow sampling and BRBE branch records are documented-and-gated: no sample or record was ever captured on any device this repository used. The crash loop's ordering (tombstone -> branch records -> symbolize) is the deliverable."
|
||||
},
|
||||
{
|
||||
"capability": "address-symbolization",
|
||||
"group": "native-static",
|
||||
"status": "ok",
|
||||
"route_measured": true,
|
||||
"strength": "observed",
|
||||
"benchmark_rows": [],
|
||||
"evidence": ["references/hardware-sampling-and-crash.md", "scripts/trace_addr2sym.py"],
|
||||
"evidence_not_shipped": ["docs/tool-verification/EXTENSION-sampling-crash.md (repository root, not shipped)"],
|
||||
"limits": "The zero-dependency ELF64 walker is host-verified against a real cross-compiled aarch64 .so (symbols cross-checked with readelf) and a hand-built minimal ELF. Runtime-address inputs (hits, traces) were exercised on fixtures only, never on a live device trace."
|
||||
},
|
||||
{
|
||||
"capability": "interpreter-trace-devirtualization",
|
||||
"group": "native-dynamic",
|
||||
"status": "partial",
|
||||
"route_measured": true,
|
||||
"strength": "observed",
|
||||
"benchmark_rows": [],
|
||||
"evidence": ["references/ete-diff-tracing.md", "scripts/vm_handler_slice.py"],
|
||||
"evidence_not_shipped": ["docs/tool-verification/EXTENSION-sampling-crash.md (repository root, not shipped)"],
|
||||
"limits": "Dispatcher detection, segment slicing, open-tail handling and the opcode-map trajectory are host-tested on synthetic interpreter traces. Calibration facts (vm_exec shape, opcode table, boxed args, const-materialization dispatch) are read from a public IR virtualizer's source; no hardened binary was ever traced by this repository."
|
||||
},
|
||||
{
|
||||
"capability": "dex-sql-query-layer-dexsql",
|
||||
"group": "dex",
|
||||
|
||||
@@ -36,6 +36,13 @@ mechanism's truth. It means nobody has yet put a command and its output behind i
|
||||
- **The runtime routes need a real device.** Hooking, dumping, install-then-launch verification and
|
||||
the module route all require a rooted device; several of them additionally require a framework the
|
||||
device must have active.
|
||||
- **The hardware layer is a host-verified toolkit, not a device-verified one.** The watchpoint
|
||||
encoders and the emitted helper's build (static aarch64, cross gcc) are measured, the differential
|
||||
reducer is fixture-tested, the ELF symbolizer is verified against a real cross-compiled `.so`, and
|
||||
the kernel templates generate and verify — but **no watchpoint was armed, no ETE/SPE trace
|
||||
captured, no BRBE record read, and no kernel file compiled or loaded on any device by this
|
||||
repository**. Every device-side step carries its control procedure in the reference file, and a
|
||||
control that has not run means the result is `unverified`, not working-as-intended.
|
||||
- **The evidence record and the benchmark matrix do not ship.** Their paths appear in older
|
||||
documents as if they were openable files. They resolve only in the repository they were written in.
|
||||
|
||||
|
||||
Reference in new issue
Block a user