v4 ACL: the countdown at call, as v3 -- the call hook may redirect
Captain Bob ruled "As v3: add at call", "Engine: call redirects" and "Build it". - The engine's call hook returns where P goes. - The kernel checks every call from code defined at run time. A TTL is counted down at the call. At a TTL of 0, or a denied word, the call is sent to (ACL-CALL), with the target on the data stack, which rechecks or refuses it by the word's own name, then goes on to it. - A word being compiled is no longer checked, as in v3. Two things were added while building, both from v3: - (ACL-BUSY) turns the check off while the policy rechecks. Without it the recheck recursed. - (ACL-CALL) does its own refusal and leaves WORD's buffer alone. A first version broke POST's CONVERT.digits. Test first: test_mesh_boot's five new checks failed before; now 120 pass and POST is 990/990. test_exec tests the redirect. test_host_quit's two v4-only expectations now follow v3: a denied word compiles. All 52 tests, test-32 and ASan/UBSan pass. An amd64 session passes 18/18. Five alternating host boots: +1.4% median, inside the noise. DECOMPOSITION.md 5.20 is updated, and the FPGA's call opcode is recorded as owing the same redirect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
This commit is contained in:
+10
-2
@@ -127,8 +127,14 @@
|
||||
#define ROM_IMG (BUF0_W - 119) /* idle, fault table, KEY, the word after KEY: 4 cells */
|
||||
#define EXEC_W (BUF0_W - 22) /* (EXEC): EXECUTE's `call xt`, and the ; after it (compile.f18; #189) */
|
||||
#define RUNX_W (BUF0_W - 115) /* (RUNX): INTERPRET's `call xt`, and the jump back (compile.f18; #189) */
|
||||
/* FREE, plain memory: BUF0_W - 113; BUF0_W - 144 .. - 141 (what a flush makes zero after
|
||||
* a full output buffer); and OUT_W - 144 .. OUT_W - 65. They and
|
||||
/* The ACL's check at call (docs/v4.0.0/plans/2026-11-19-acl-at-call.md): where (ACL-CALL) is, which the kernel sends
|
||||
* a call to when the word's TTL is 0 or it is denied; and 1 while the policy rechecks a word, when the kernel checks
|
||||
* nothing (v3's acl_recheck runs its policy so). A full output buffer's flush zeroes BUF0_W - 144 .. - 141: (ACL-BUSY)
|
||||
* zeroed is only its default, and costs one more level of recheck at most. */
|
||||
#define ACL_CALL_W (BUF0_W - 113) /* (ACL-CALLX): the code address of (ACL-CALL), stored by end.f18 */
|
||||
#define ACL_BUSY_W (BUF0_W - 144) /* (ACL-BUSY): 1 while (ACL-RECHECK) runs the policy */
|
||||
/* FREE, plain memory: BUF0_W - 143 .. - 141 (what a flush makes zero after
|
||||
* a full output buffer). They and
|
||||
* the cells above held the messages waiting, the refusals owed and what went with them (MESH.md 7a, 7b), which a
|
||||
* node no longer keeps. */
|
||||
#define AWAIT_FROM (BUF0_W - 39) /* the node whose word of how text ended is waited for */
|
||||
@@ -384,6 +390,8 @@ static unsigned host_branch_slots(void)
|
||||
X("HEAT-OP", HEAT_REG) \
|
||||
X("(EXEC)", EXEC_W) \
|
||||
X("(RUNX)", RUNX_W) \
|
||||
X("(ACL-CALLX)", ACL_CALL_W) \
|
||||
X("(ACL-BUSY)", ACL_BUSY_W) \
|
||||
X("ANTICLOCK", HEAT_REG + 32) \
|
||||
X("CFBASE", CFS_W) \
|
||||
X("CFEND", CFS_W + CFS_CELLS)
|
||||
|
||||
Reference in New Issue
Block a user