<feed xmlns='http://www.w3.org/2005/Atom'>
<title>computeranim.git/targets, branch main</title>
<subtitle>Tracing debugger and animations of running programs (ztrace, canim)</subtitle>
<id>https://git.0x4200.cafe/computeranim.git/atom?h=main</id>
<link rel='self' href='https://git.0x4200.cafe/computeranim.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/computeranim.git/'/>
<updated>2026-11-11T23:08:07Z</updated>
<entry>
<title>trace: what push, call and ret touch; names for data; the stack's roles, sharper</title>
<updated>2026-11-11T23:08:07Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-11T23:08:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/computeranim.git/commit/?id=0ec2376cae2fdfc50e90d930ebc86c7a5b7f5594'/>
<id>urn:sha1:0ec2376cae2fdfc50e90d930ebc86c7a5b7f5594</id>
<content type='text'>
For a disassembly that points at the stack word it touched. The stack's
own instructions have touches (push, call and enter write at rsp-8; pop
and ret read at rsp; leave at rbp), and a rep string instruction its
whole range. An address a global or static object holds is named
(head+0, libc.so.6!main_arena+96). The saved rbp has its role at the
push that makes it; every local in a shared word is given; the stack
protector's copy is found by seeing its store; ztrace show labels each
stack word. Six bytes a moment and 3% slower on the list by instruction.

Co-Authored-By: Claude Fable 5.2 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
</content>
</entry>
<entry>
<title>trace: a function's basic blocks; ASan's shadow memory</title>
<updated>2026-11-11T13:38:37Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-11T13:38:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/computeranim.git/commit/?id=6a7a87b8ecb7902de5640cad00028997825024d2'/>
<id>urn:sha1:6a7a87b8ecb7902de5640cad00028997825024d2</id>
<content type='text'>
For a graph of a function's blocks: at the first stop inside it a
function's blocks are recorded once (bounds, how each ends, where its
edges go), with every instruction's text up to 2048 of them;
telescope.blocks reads them, and a branch event ties a run to the edge
it took. Stripped libraries get blocks from their unwind bounds.

For a plain build seen against an ASan one: record --asan keeps the
shadow of every region it records, the offset found from the process;
telescope.shadow gives an address's shadow byte. The report functions
are named and the chain holds from inside the report to main. Tested on
an overflowing target built plain, with gcc's ASan and with clang's.

Co-Authored-By: Claude Fable 5.2 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
</content>
</entry>
<entry>
<title>trace: names for PLT stubs and GOT slots; a call followed down; the vDSO is run through</title>
<updated>2026-11-11T03:06:30Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-11T02:55:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/computeranim.git/commit/?id=c94ade9e77a811d3ff75ffc2889a65375262ab1f'/>
<id>urn:sha1:c94ade9e77a811d3ff75ffc2889a65375262ab1f</id>
<content type='text'>
For a disassembly that follows a call into libc. A stub is open@plt and a
slot open@got, from the relocations (libc's own, IFUNC and nameless, by
the function they resolve to); telescope.got says what a slot holds and
whether it is still lazy. A library function's entry is named even when
its mapping was not known yet, by the alias the program imports. The
chain holds through the stub's jump, the callee's first instruction, the
syscall and the loader's resolver: ld.so's unwind section lacks the entry
that ends it, which lost every frame there. A syscall is tied to its
instruction's moment, and each frame's call is recorded with the row
before it. Stepped by instruction, a call into the vDSO is one moment and
its return the next: its clock loop, single-stepped, made three million
moments of three reads.

Co-Authored-By: Claude Fable 5.2 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
</content>
</entry>
<entry>
<title>trace: glibc's heap, read from a recording at any moment</title>
<updated>2026-11-11T02:25:40Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-11T02:04:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/computeranim.git/commit/?id=58643dab07a803dbb579d84f68419911f5a2a16d'/>
<id>urn:sha1:58643dab07a803dbb579d84f68419911f5a2a16d</id>
<content type='text'>
record --heap keeps the arena, the tcache and, of every chunk, its size
word and the links of those on a list: free chunks stay readable, which
--alloc dropped at the free. zt.heap.glibc gives the chunks in address
order, the tcache's and the bins' chains (safe-linking as the stored
value and the pointer it protects), the top; each with the address of
the word it was read from, each chain saying how it ended. ztrace show
prints it. Layouts for glibc 2.44 (no fastbins; a tcache made at the
first free, counting the slots left) and 2.40; the arena found by symbol
or by the struct whose next points at itself. Against pwndbg on 2.40:
the same at every stop. Three bytes a moment and a sixth slower on the
list by instruction.

Co-Authored-By: Claude Fable 5.2 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
</content>
</entry>
<entry>
<title>agent: its handlers act with the thread's protection keys and float modes, not a handler's</title>
<updated>2026-11-10T16:00:24Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-10T15:52:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/computeranim.git/commit/?id=8b28a0a5101a62fd55c2d55433e0fa899d4623f9'/>
<id>urn:sha1:8b28a0a5101a62fd55c2d55433e0fa899d4623f9</id>
<content type='text'>
The kernel starts a signal handler with default PKRU (key 0 only) and
default MXCSR and x87 control word, the thread's own saved in the frame.
The SIGSYS handler makes the thread's syscalls and clones its threads
from there, so under --syscalls:
- a pkey_alloc's new rights were undone when the handler returned;
- a thread was born with no right to keyed memory (V8's compiler
  threads fault reading the code space: d8 died of SEGV_PKUERR, and the
  35 seconds were its core dump, not a spin);
- a buffer in keyed memory was EFAULT to the kernel, and a fault to the
  agent reading it for the event;
- a thread started without its maker's float modes (flush-to-zero).
Both handlers now take the thread's PKRU and control words from the frame
first (signal.adopt), and the SIGSYS one writes PKRU back to the frame
after the syscall. Watched memory is read, and hooked code patched, with
every key open, so a key the thread itself cannot use hides nothing.

test-agent: agent_pkey (a keyed page read, given to syscalls, watched,
read by a later thread; skips itself without keys), and agent_sys's
thread checks its MXCSR. README: --alloc and programs with their own
malloc; the core dump.

Co-Authored-By: Claude Fable 5.2 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>ztrace probe: BPF on syscalls, scheduling, kprobes, uprobes and USDT</title>
<updated>2026-11-10T15:19:06Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-10T14:49:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/computeranim.git/commit/?id=297943b01e18bb3d1dd41a8d3e220811de25228b'/>
<id>urn:sha1:297943b01e18bb3d1dd41a8d3e220811de25228b</id>
<content type='text'>
Programs built as instruction arrays for one process (no compiler, no
libbpf), writing Events into a BPF ring buffer; a drop counter in a map;
task_struct offsets from the kernel's BTF; a USDT probe's arguments read
in the kernel at the probe. Without CAP_BPF and CAP_PERFMON it says so;
--dry-run builds and lists everything. Tested offline by running the
programs in a small BPF machine, and for real by test-kernel-vm, which
boots this kernel in QEMU where we are root.

ztrace perf: moments are no longer cut per event unless --cut;
--max-size, and a full recording stops the target and says so.
perf.Sorted merges two backends' events by time.

Co-Authored-By: Claude Fable 5.2 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>ztrace perf: the kernel's view of a program, unprivileged</title>
<updated>2026-11-10T15:19:06Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-10T14:39:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/computeranim.git/commit/?id=db923fa823354270217362db06356f2b1a41315e'/>
<id>urn:sha1:db923fa823354270217362db06356f2b1a41315e</id>
<content type='text'>
perf_event_open on a held child: counters, a sampling profile, every
page fault with its registers, maps, threads, context switches, every
syscall (the per-syscall tracepoints, the only ones open to a user),
and the debug registers as watchpoints and breakpoints that do not stop
the target. One time-ordered stream of Events into a Sink; --threads
follows with a ring per CPU. usdt.zig: the notes of &lt;sys/sdt.h&gt; and
their arguments from a Regs and a memory reader, independent of BPF.
test-kernel runs all of it on targets/kernel_*.

Co-Authored-By: Claude Fable 5.2 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>agent_list: the page is read through a volatile pointer</title>
<updated>2026-11-10T15:10:48Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-10T15:10:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/computeranim.git/commit/?id=937b6314c4cd6fa73daeac308fbfcf69b89add56'/>
<id>urn:sha1:937b6314c4cd6fa73daeac308fbfcf69b89add56</id>
<content type='text'>
Without UBSan the compiler at -O1 folds the read and deletes
aligned_alloc with it, and the list check counts one allocation short.
</content>
</entry>
<entry>
<title>agent: bench-agent and its numbers, hooks with names, an archive cc can link</title>
<updated>2026-11-10T15:09:56Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-10T15:07:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/computeranim.git/commit/?id=a10e1691dbe5b944812dc8761a450636bc247e3d'/>
<id>urn:sha1:a10e1691dbe5b944812dc8761a450636bc247e3d</id>
<content type='text'>
zig build bench-agent runs each capability against its native loop and
prints what it costs and writes; README has the table. ztrace run looks
at the ring a little longer before sleeping (a target that finds the
tracer asleep pays a futex wake an event). A hooked function's name is
defined as the string of its address, so the recorder's call stack reads
fib. A static link without libc's malloc says which -u to add. The
archive carries no stack probes, so cc links it in debug builds too.
Tests for --wrap (musl, zig cc) and for a recording that fills.

Co-Authored-By: Claude Fable 5.2 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>agent: the in-process backend, and ztrace run's options for it</title>
<updated>2026-11-10T15:09:34Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-10T14:44:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/computeranim.git/commit/?id=ce7c0abf14e7ab056d5479adc3f05df9976e94e4'/>
<id>urn:sha1:ce7c0abf14e7ab056d5479adc3f05df9976e94e4</id>
<content type='text'>
libztrace-agent.so (preloaded) and libztrace-agent.a (linked in), one
source: map and thread_start at startup; alloc/free from the interposed
allocator; syscall_enter/exit through Syscall User Dispatch; call/ret
from int3 hooks; mem_write from watched regions diffed in-process; the
target-side API (include/ztrace.h, and the ztrace-agent module for Zig).
ztrace run turns each on (--alloc --syscalls --hook --watch), chooses the
moments (--cut), and stops the target at event kinds without ptrace
(--stop-at, --read, -i). test-agent records real targets and checks the
recordings.

Co-Authored-By: Claude Fable 5.2 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
