Repository navigation
Replies: 7 comments 3 replies
|
Thank you for the detailed field report and concrete feedback! Here is the comprehensive technical roadmap and systems design addressing each "Still hard" and "Wished next" item, detailing the exact Linux kernel subsystems, virtual memory management primitives, hardware performance counters, and static binary analysis algorithms required to implement them. 1. Field Writers Reached via Returned Pointers (#76)OS & Kernel Realities: Linux Virtual Memory Layout, Calling Conventions, and Heap ManagementIn production x86-64 Rust binaries executing on Linux:
Implementation & Architecture Plan in
|
|
Update after a day on main 31c6fec. Concrete items are in #76 and #92; ideas below are new. What worked today
A mistake xref could have prevented Ideas
Happy to provide sanitized repros for any of these. |
|
Thank you for the field update and the 5 new practical proposals! We agree completely with the protocol: high-level feedback and workflows stay in Discussion #93, while concrete features are tracked in dedicated issues cross-referenced with commit hashes. Here is the breakdown of the new proposals, the corresponding issues created, and our implementation plan grounded in Linux kernel primitives, uprobe/ptrace mechanics, and static CFG reachability: 1. Caller Argument Analysis & Probe Filter Preflight (#96)
2. Group Probe Hits by Return Address (
|
|
Worked example from today, with the exact commands, followed by what I'd like from the sampler. The binary is the same stripped Rust x86-64 PIE (44 MB of code). Question: why does one deposit of 1 unit never happen?1. This proved that the periodic job never reaches the user-action entry, so I could drop half of the candidate code. Excellent command. 2. The result: interior label 0x5649130 is reached only with op 0. My static reading had assigned that branch to another op, and the probe corrected it in one run. This is the most valuable loop in the tool: 3. Friction hit along the way, in order of cost:
The sampler I'd likeTwo modes, both over the existing A. Continuous whole-process sampling with function and line attribution (like today's B. Event-triggered windows, to profile rare work (a once-a-day job, an hourly rebalance): Start sampling when the probe fires, stop after the window, and keep the windows separate in the file, so What matters most to me is (B) together with |
|
Priority 1 (#76) is done in #118. Field writers reached through a pointer returned by a call are ranked, and |
|
Everything requested in this thread is now released in v0.4.0 (
Release notes: docs/releases/v0.4.0.md. Closing this thread as done; please open a new issue or discussion for anything that does not work as described. |
Uh oh!
There was an error while loading. Please reload this page.
Feedback thread from using xref daily for about two days to reverse a large stripped Rust x86-64 service binary (44 MB of code, 65k functions): deriving exact arithmetic, state-transition rules and field layouts, and verifying them against a model, including live uprobes on an offline copy of the process. Concrete bugs and requests stay in issues; this thread is for the overall picture and priorities.
Most useful so far
asmannotations,tree,callers,args,find --imm/--disp,src/where: fast and reliable on every question.c(Lift scalar SSE double arithmetic and .rodata double constants in pseudo-C #66, SSE2 lifting: movapd copies untracked, so expressions use the wrong operand #70): float formulas are now readable as expressions, with.rodatadoubles as literals. This was decisive for recovering two reward formulas.live probe --regs/--fetch/--filter/--until-hits(live probe: memory fetch args, value filters and hit limits #73): a conditional uprobe on one function proved an off-by-one round label and a constant argument within minutes.symbolize(symbolize --format perf parses 0 samples from standard perf script output #71) and the newprofile import/report(Feature request: built-in sampling profiler (live profile / report / annotate / diff) #78): perf data maps onto stripped functions without manual awk.Still hard
field --write, field --keys: one-letter sibling key set not found (c,m,e), no reason reported #76): the layout is found, but the real writer, reached through a pointer returned by a map-lookup call, is not ranked or found at all.sliceis the right idea, but it still keeps half the function. Slicing by memory location or struct field (--to-field +0x10 of rax@0x...) would help.profile report --within FNand event-triggered windows are the missing piece.Wished next, in order
profile report --within, per-functionannotate%, base from MMAP2.slice.All reactions