fix(v4.0.0): storage -- what the review of step 6 found

A block request with fewer than two values on the stack is refused; it
had acted on whatever the stack ring held and stopped the node.

Bare metal: when the kernel's chain takes the place of POST's block RAM
the node's two buffers are emptied, so it no longer holds POST's copy of
a block; and the chain's fast RAM is cleared, so a node cannot read what
was in the kernel's heap.

blocks.c is built with each test under that test's own warnings and
sanitizers; it had been left out of both.  The hosted link cleans its
object directory first: it had linked the withdrawn store_v3.o left there
from the day before.

node.h and DECOMPOSITION.md D-19 no longer describe the message device or
the four registers as current.  MESH.md 8.5 records two findings for
ruling: a node's own copy of a block, and a block read over a node's code.

From a clean build: make -C v4 test, sanitize and hosted-check pass;
amd64, aarch64 and riscv64 boot, POST 538 of 538, same hashes, blocks 1
and 2047 clean at the prompt: logs/20261007-085017, -085254, -085636.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rajames
2026-10-07 08:58:52 -04:00
co-authored by Claude Opus 5.5
parent 6d90375da7
commit bcfd6556a8
15 changed files with 543 additions and 33 deletions
+3 -3
View File
@@ -331,9 +331,9 @@ void v4_node_fault(v4_node *n, unsigned kind, v4_cell addr);
* detaches both (-1); the addresses are the caller's choice (D-4). */
void v4_node_stack_regs_attach(v4_node *n, v4_cell d, v4_cell r);
/* A BLOCK (DECOMPOSITION.md D-19, 5.11). Mass storage is a device on a
* port that speaks messages (docs/v4.0.0/MESH.md section 8; storage.h); the
* node has nothing of it but these. A block is 1024 bytes, and a byte
/* A BLOCK (DECOMPOSITION.md D-19, 5.11). Mass storage is the kernel's: a
* node asks it for a block by a request on port 0 (docs/v4.0.0/MESH.md
* section 8; blocks.h), and has nothing of it but these. A block is 1024 bytes, and a byte
* address is four times a word address plus 0 .. 3 (D-1), so a block is 256
* cells, four bytes to a cell, the first byte lowest, whatever the cell
* width. */