From 479d4914ecd8c7bfea68f9357ace1a4a6d0006ab Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 11 Nov 2026 21:45:12 -0300 Subject: design: the column as a form of the language; the ASan pair and the introduction storyboarded From the user: the column style is a tool a scene's author can use. It is a standard form beside the working frame (which stays the default): for stories of rows going down and back. A scene changes form in a rest, in a fixed order, about 70 frames each way. Bubbles fit their reading in their lead and steps; panes change only when the subject moves. The ASan pair (112 s) uses the pair, then the column while plain runs on alone, then the pair for the fault; the introduction (123 s) mixes the frame at x2, the column for the address space and the stack, and text above the aligned code. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa --- design/mock/49-column-call-480.png | Bin 28172 -> 27010 bytes design/mock/49-column-call.png | Bin 191880 -> 184799 bytes design/mock/49-column-call.svg | 9 ++++---- design/mock/50-column-stub-480.png | Bin 29831 -> 27462 bytes design/mock/50-column-stub.png | Bin 196916 -> 187159 bytes design/mock/50-column-stub.svg | 11 +++++----- design/mock/51-column-args-480.png | Bin 27318 -> 25766 bytes design/mock/51-column-args.png | Bin 154753 -> 146051 bytes design/mock/51-column-args.svg | 12 +++++------ design/mock/52-column-cross-480.png | Bin 26759 -> 24836 bytes design/mock/52-column-cross.png | Bin 166439 -> 158837 bytes design/mock/52-column-cross.svg | 12 +++++------ design/mock/53-column-back-480.png | Bin 28740 -> 28013 bytes design/mock/53-column-back.png | Bin 190377 -> 186572 bytes design/mock/53-column-back.svg | 5 ++--- design/mock/54-column-present.png | Bin 419583 -> 410915 bytes design/mock/column.py | 41 ++++++++++++++++-------------------- 17 files changed, 39 insertions(+), 51 deletions(-) (limited to 'design/mock') diff --git a/design/mock/49-column-call-480.png b/design/mock/49-column-call-480.png index aa6899a..0916509 100644 Binary files a/design/mock/49-column-call-480.png and b/design/mock/49-column-call-480.png differ diff --git a/design/mock/49-column-call.png b/design/mock/49-column-call.png index d856574..067f8f2 100644 Binary files a/design/mock/49-column-call.png and b/design/mock/49-column-call.png differ diff --git a/design/mock/49-column-call.svg b/design/mock/49-column-call.svg index 7fdb518..af8b8e7 100644 --- a/design/mock/49-column-call.svg +++ b/design/mock/49-column-call.svg @@ -300,12 +300,11 @@ -main puts open's arguments where the -convention says: "note" in rdi, 0 -(O_RDONLY) in rsi. +main puts open's arguments in registers: +"note" in rdi, O_RDONLY in rsi. -The call pushes where to come back to, -main+45, and goes down to open's stub. +The call pushes the way back, main+45, +and goes down to the stub. moment 7 of 46 diff --git a/design/mock/50-column-stub-480.png b/design/mock/50-column-stub-480.png index e5e4657..360c41a 100644 Binary files a/design/mock/50-column-stub-480.png and b/design/mock/50-column-stub-480.png differ diff --git a/design/mock/50-column-stub.png b/design/mock/50-column-stub.png index 60c3187..d873481 100644 Binary files a/design/mock/50-column-stub.png and b/design/mock/50-column-stub.png differ diff --git a/design/mock/50-column-stub.svg b/design/mock/50-column-stub.svg index 886dd88..8e2058f 100644 --- a/design/mock/50-column-stub.svg +++ b/design/mock/50-column-stub.svg @@ -302,12 +302,11 @@ -The call pushes where to come back to, -main+45, and goes down to open's stub. - -The stub in the PLT is one jump: it reads -open@got, where the loader wrote libc's -open. It pushes nothing. +The call pushes the way back, main+45, +and goes down to the stub. + +The stub is one jump through open@got: it +pushes nothing. diff --git a/design/mock/51-column-args-480.png b/design/mock/51-column-args-480.png index 193a0e7..7207706 100644 Binary files a/design/mock/51-column-args-480.png and b/design/mock/51-column-args-480.png differ diff --git a/design/mock/51-column-args.png b/design/mock/51-column-args.png index cc51162..dc5e7a2 100644 Binary files a/design/mock/51-column-args.png and b/design/mock/51-column-args.png differ diff --git a/design/mock/51-column-args.svg b/design/mock/51-column-args.svg index 276d047..6aaf57d 100644 --- a/design/mock/51-column-args.svg +++ b/design/mock/51-column-args.svg @@ -231,13 +231,11 @@ -The stub in the PLT is one jump. It reads -open@got, where the loader wrote libc's -open. - -Its last three set the kernel's arguments: -AT_FDCWD in rdi, and 257, openat's -number, in rax. +The stub is one jump through open@got: it +pushes nothing. + +Its last three set the kernel's arguments, +and openat's number, 257, in rax. moment 31 of 46 diff --git a/design/mock/52-column-cross-480.png b/design/mock/52-column-cross-480.png index ef5f705..7dc0380 100644 Binary files a/design/mock/52-column-cross-480.png and b/design/mock/52-column-cross-480.png differ diff --git a/design/mock/52-column-cross.png b/design/mock/52-column-cross.png index c79b82b..eebe049 100644 Binary files a/design/mock/52-column-cross.png and b/design/mock/52-column-cross.png differ diff --git a/design/mock/52-column-cross.svg b/design/mock/52-column-cross.svg index cd9cef3..6e0a753 100644 --- a/design/mock/52-column-cross.svg +++ b/design/mock/52-column-cross.svg @@ -201,13 +201,11 @@ -Its last three set the kernel's arguments: -AT_FDCWD in rdi, and 257, openat's -number, in rax. - -syscall crosses down. The kernel opens -"note" and answers 3: the file's descriptor, -in rax. +Its last three set the kernel's arguments, +and openat's number, 257, in rax. + +syscall crosses down; the kernel opens +"note" and answers 3 in rax. moment 35 of 46 diff --git a/design/mock/53-column-back-480.png b/design/mock/53-column-back-480.png index 294b7cd..4ca4faa 100644 Binary files a/design/mock/53-column-back-480.png and b/design/mock/53-column-back-480.png differ diff --git a/design/mock/53-column-back.png b/design/mock/53-column-back.png index aae5ff1..ffc3719 100644 Binary files a/design/mock/53-column-back.png and b/design/mock/53-column-back.png differ diff --git a/design/mock/53-column-back.svg b/design/mock/53-column-back.svg index 7292e57..3759984 100644 --- a/design/mock/53-column-back.svg +++ b/design/mock/53-column-back.svg @@ -289,9 +289,8 @@ -syscall crosses down. The kernel opens -"note" and answers 3: the file's descriptor, -in rax. +syscall crosses down; the kernel opens +"note" and answers 3 in rax. open's ret comes straight back to main: the stub was a jump, not a call. main keeps the diff --git a/design/mock/54-column-present.png b/design/mock/54-column-present.png index e9421e9..91a6f6e 100644 Binary files a/design/mock/54-column-present.png and b/design/mock/54-column-present.png differ diff --git a/design/mock/column.py b/design/mock/column.py index de00e6f..cf0b8d1 100644 --- a/design/mock/column.py +++ b/design/mock/column.py @@ -361,11 +361,10 @@ def beat_call(g): # the touch, in the column: out of the call row's right rule, down the gutter, onto the stack's rule at its word gen.arrow(g, [(944, at[0x4011a8] + 12), (956, at[0x4011a8] + 12), (956, sy[0] + 12), (946, sy[0] + 12)], VERM, 2, r=6, hl=7, hw=8) - say(g, [(at[0x40119c] + 12, [("main puts open's arguments where the convention says: ", "sans"), ('"note"', "mono"), - (" in ", "sans"), ("rdi", "mono"), (", 0 (O_RDONLY) in ", "sans"), ("rsi", "mono"), - (".", "sans")], None), - (at[0x4011a8] + 12, [("The call pushes where to come back to, ", "sans"), ("main+45", "mono"), - (", and goes down to open's stub.", "sans")], None)]) + say(g, [(at[0x40119c] + 12, [("main puts open's arguments in registers: ", "sans"), ('"note"', "mono"), (" in ", "sans"), + ("rdi", "mono"), (", O_RDONLY in ", "sans"), ("rsi", "mono"), (".", "sans")], None), + (at[0x4011a8] + 12, [("The call pushes the way back, ", "sans"), ("main+45", "mono"), + (", and goes down to the stub.", "sans")], None)]) column_clock(g, 7, 46) @@ -406,11 +405,10 @@ def beat_stub(g): stack_panel(g, ys_, n, 38, 0x7fffffffeca8, 0x7fffffffeca8, 0x7fffffffed00, {0x7fffffffeca8: {1: "tick"}}, [("open@plt", 0x7fffffffeca8)], base=("rsp", 0x7fffffffeca8)) C.thread(g, ys, [(at[0x40119c], at[0x4011a8] + ROW)], VELLUM, 2) - say(g, [(at[0x4011a8] + 12, [("The call pushes where to come back to, ", "sans"), ("main+45", "mono"), - (", and goes down to open's stub.", "sans")], None), - (at[0x401070] + 12, [("The stub in the PLT is one jump: it reads ", "sans"), ("open@got", "mono"), - (", where the loader wrote libc's ", "sans"), ("open", "mono"), - (". It pushes nothing.", "sans")], at[0x401070])]) + say(g, [(at[0x4011a8] + 12, [("The call pushes the way back, ", "sans"), ("main+45", "mono"), + (", and goes down to the stub.", "sans")], None), + (at[0x401070] + 12, [("The stub is one jump through ", "sans"), ("open@got", "mono"), + (": it pushes nothing.", "sans")], at[0x401070])]) column_clock(g, 8, 46) @@ -443,10 +441,10 @@ def beat_args(g): "rsi": {0: "tick"}}, QUIET) M.strip(False) C.thread(g, ys, [(at[0x4011a8], at[0x4011a8] + ROW)], VELLUM, 2) - say(g, [(at["open@plt"] + 12, [("The stub in the PLT is one jump. It reads ", "sans"), ("open@got", "mono"), - (", where the loader wrote libc's ", "sans"), ("open", "mono"), (".", "sans")], None), - (at[L + 0x110fb6] + 12, [("Its last three set the kernel's arguments: AT_FDCWD in ", "sans"), ("rdi", "mono"), - (", and 257, openat's number, in ", "sans"), ("rax", "mono"), (".", "sans")], None)]) + say(g, [(at["open@plt"] + 12, [("The stub is one jump through ", "sans"), ("open@got", "mono"), + (": it pushes nothing.", "sans")], None), + (at[L + 0x110fb6] + 12, [("Its last three set the kernel's arguments, and openat's number, 257, in ", "sans"), + ("rax", "mono"), (".", "sans")], None)]) column_clock(g, 31, 46) @@ -482,12 +480,10 @@ def beat_cross(g, bubbles=True): M.strip(False) C.thread(g, ys, [(at[0x4011a8], at[0x4011a8] + ROW)], VELLUM, 2) if bubbles: - say(g, [(at[L + 0x110fb6] + 12, [("Its last three set the kernel's arguments: AT_FDCWD in ", "sans"), - ("rdi", "mono"), (", and 257, openat's number, in ", "sans"), ("rax", "mono"), - (".", "sans")], None), - (at["kernel"] + 12, [("syscall", "mono"), (" crosses down. The kernel opens ", "sans"), ('"note"', "mono"), - (" and answers 3: the file's descriptor, in ", "sans"), ("rax", "mono"), - (".", "sans")], None)]) + say(g, [(at[L + 0x110fb6] + 12, [("Its last three set the kernel's arguments, and openat's number, 257, in ", "sans"), + ("rax", "mono"), (".", "sans")], None), + (at["kernel"] + 12, [("syscall", "mono"), (" crosses down; the kernel opens ", "sans"), ('"note"', "mono"), + (" and answers 3 in ", "sans"), ("rax", "mono"), (".", "sans")], None)]) column_clock(g, 35, 46) return at @@ -514,9 +510,8 @@ def beat_back(g): C.thread(g, ys, [(at[0x40119c], at[0x4011ad] + ROW)]) gen.arrow(g, [(944, at[0x4011ad] + 12), (956, at[0x4011ad] + 12), (956, sy[3] + 12), (946, sy[3] + 12)], VERM, 2, r=6, hl=7, hw=8) - say(g, [(at[0x4011ad] + 12 + 400, [("syscall", "mono"), (" crosses down. The kernel opens ", "sans"), ('"note"', "mono"), - (" and answers 3: the file's descriptor, in ", "sans"), ("rax", "mono"), - (".", "sans")], None), + say(g, [(at[0x4011ad] + 12 + 400, [("syscall", "mono"), (" crosses down; the kernel opens ", "sans"), ('"note"', "mono"), + (" and answers 3 in ", "sans"), ("rax", "mono"), (".", "sans")], None), (at[0x4011a8] + 12, [("open", "mono"), ("'s ", "sans"), ("ret", "mono"), (" comes straight back to main: the stub was a jump, not a call. main keeps the answer in ", "sans"), ("f", "mono"), (".", "sans")], None)]) -- cgit v1.3