Reject invalid filesystem capacities and add Dynamic ELF interpreter-handoff (planDynamic) - #53
Open
thanks-cohn wants to merge 4 commits into
Conversation
Owner
Author
|
Review update: the substantive Project 58 capacity repair and Project 54/59 dynamic-ELF/PT_INTERP separation look directionally sound for this checkpoint, and the focused Zig tests reached 30/30 under CI. I fixed the two compile-fail fixture formatting failures directly on this PR branch. Do not merge yet: the fresh CI run still fails deterministic repository-sync gates, not the new unit tests. Remaining repair tasks are:
These are continuation/debugging tasks, not reasons to restart or discard the current work. Preserve the branch history and rerun the repo's canonical generators/formatters rather than hand-editing generated artifacts. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
FileSystemcapacities (especiallyobject_capacity == 0and overflow beyondObjectId) and by representing dynamic ELF/PT_INTERP interpreter handoff without weakening the verified staticET_EXECproof.Description
FileSystemsoobject_capacity == 0is rejected and capacities exceeding theu16ObjectIdnamespace are rejected, and ensure the root object slot is initialized. (projects/58-bounded-filesystem/src/bounded_filesystem.zig).tools/check-bounded-filesystem-capacity.pyto assert both invalid-capacity rejections. (projects/58-bounded-filesystem/tests/compile_fail/*,tools/check-bounded-filesystem-capacity.py).DynamicLoadPlanandplanDynamicin the ELF loader module to represent an explicit interpreter-handoff boundary that owns and validates a single NUL-terminatedPT_INTERPpathname, toleratesPT_DYNAMICas interpreter work, and performs no relocation, while preserving the originalplanas the strict staticET_EXECacceptance surface. (projects/54-bounded-elf64-load-plan/src/bounded_elf64_load_plan.zigand updated contract/docs).ExecPlan) to consumeDynamicLoadPlanfacts, derive thePT_INTERPpathname from the validated main ELF, require separately resolved interpreter bytes, reject recursively interpreted interpreters, and choose the interpreter entry while preservingmain_entry. (projects/59-bounded-address-space-exec-image/src/bounded_address_space_exec_image.zig).planDynamicacceptance forET_DYN/PT_INTERP, malformedPT_INTERPrejection, interpreter-missing rejection, and anExecPlanhandoff scenario; updateDETAILS.md/MASTERY.md/README.mdand command documentation to record the repaired architecture and the focused capacity test command. (multipleprojects/*docs changed).Testing
zig build test-bounded-filesystem,zig build test-bounded-elf64-load-plan, andzig build test-bounded-address-space-exec-imageand their smoke equivalents, and these focused tests passed after the fix.PYTHONDONTWRITEBYTECODE=1 python3 tools/check-bounded-filesystem-capacity.pyand it reportedPASS (2/2)validating both compile-fail fixtures..venv/bin/python tools/module-contract-consistency-checker.pyandPYTHONDONTWRITEBYTECODE=1 python3 tools/check-command-reference.py --check, and they passed; indexes and dependency graphs were regenerated where possible.python3 tools/verify-freestanding-riscv64-linux-fd-lifecycle.py --self-testcould not run in this environment becauseqemu-system-riscv64was unavailable, so the two-QEMU machine gate remains to be executed in an environment with QEMU; this is a required next step but is an external-environment limitation, not a code regression.Codex Task