Repository navigation
Replies: 3 comments
How I would build it: OS mechanisms, in order of preferenceTarget box for my use: Linux 6.8 with BTF ( 1. Primary backend: eBPF on uprobes (
|
|
Implemented as |
How I would build it: OS mechanisms, in order of preferenceTarget box for my use: Linux 6.8 with BTF ( 1. Primary backend: eBPF on uprobes (
|
|
Implemented as |
Uh oh!
There was an error while loading. Please reload this page.
Problem
The hardest questions I get when reversing a large stripped Rust service binary are about order, not about arithmetic:
The static tools (
c,path,args) give candidates.live probeconfirms single points. Ordering across several functions in one request, though, I reconstruct by hand: probe 6–10 addresses at once, dumpfetch tslines, then sort by timestamp and thread in awk. It's slow and error-prone (fetch lines aren't tagged with their probe, timestamps from different CPUs interleave, and nothing tells me where one request ends and the next begins).What I'd like:
live traceA bounded, ordered call trace of one process, opened and closed by events:
Output: one window per triggering call, the ordered entries and returns of the listed functions on the triggering thread, with depth, the static VA of the call site, and the fetched values:
Details that matter
--start, from start until the matching return (--stop-return) or--stop VA.--callees-of FN --depth N(static callee tree, liketree); and--all-calls-in FN(every direct call site inside one function, probed at the call and the return site).--fetch-at VA "..."per function, with the same syntax aslive probe --fetch, plus--fetch-ret VA "ret=%ax:u64"on return.--start-filteruses the start probe's fetches, so I can trace only the one request I care about.--max-windowsand--max-eventskeep it bounded.--mark-file PATH --mark-regex REstamps each window with the latest matching line (for me, the batch height), so a window maps to a position in the input.live traceJSON should feedtrace diff A B, comparing the ordered call sequences of two windows, for example a case that works vs. one that doesn't.Backends
The uprobe/uretprobe pair per function is enough for depth-limited traces. Intel PT (now partly present through the AUX import in #89) would make
--all-calls-incheap and exact. Either backend is fine; I care about the CLI and the output.Why it matters
With this, "is X done before Y in request R" becomes one command instead of an hour of static reading. A real example from this week: verifying that a cancel inside a modify happens before the prepare step of the wrapper, and that a cancelled conditional order only marks the account for an end-of-batch pass.
Related: field report #93 (overall feedback); profiler requests in #78 and #92.
All reactions