LATX, kzt: publish cumulative refactor through Step4 - #5
Closed
LaurenIsACoder wants to merge 27 commits into
Closed
Conversation
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Add the Step2 T1 KZT runtime Dynamic Table parser and view representation. The parser reads Elf64_Dyn entries through the kzt_guest_link_map_reader_ops_t reader seam, records the happy-path fields needed by later KZT stages, and preserves runtime address semantics for pointer-valued DT_* entries while keeping DT_NEEDED values as string table offsets. This change also wires the parser into the LATX context build and adds a tests/unit/kzt white-box unit test. The test covers a complete DT_NULL-terminated Dynamic Table, multiple DT_NEEDED offsets, load-bias preservation, and the T1 address-semantics contract. This is only the Step2 T1 parser/view happy path. It does not connect the parser to the KZT registry, observation adapter, diagnostics, patch planner, relocation patcher, lazy binding, dlopen/dlsym/dlclose, or hook replacement paths. Error-state coverage for read failures and missing DT_NULL remains for later Step2 tasks. Validation: - cc -I. -Itarget/i386/latx/include tests/unit/kzt/test_guest_dynamic_parser.c target/i386/latx/context/kzt_guest_dynamic.c -o "$out" - "$out" --filter complete_runtime_dynamic_view - "$out" --filter dynamic_address_semantics - ../configure --target-list=x86_64-linux-user --disable-blobs --disable-debug-info --disable-docs --disable-linux-io-uring --disable-werror --enable-kzt --enable-latx --extra-ldflags=-ldl --optimize-O1 - meson compile -C build-t1-review-build-20260706-143954 kzt-guest-dynamic-parser - meson test -C build-t1-review-build-20260706-143954 kzt-guest-dynamic-parser --print-errorlogs - git diff --check Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Introduce a KZT input-layer enumerator that walks GuestDynamicView RELA tables and emits minimal planner candidates for x86_64 JUMP_SLOT and GLOB_DAT entries. The collector fails open on unsupported DT_REL, malformed dynamic/relocation/symbol/version inputs, read failures, overflow, and output capacity exhaustion. Add WI-214 unit coverage for happy paths and fail-open cases. Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Owner
Author
|
该 PR 是本次 KZT 重构累计到 Step4 的阶段性草稿,后续 Step5 及剩余阶段仍在同一提交链上继续推进。为遵循“全部工作完成后一次性创建并合入唯一累计 PR”的约定,现关闭此阶段性 PR;最终验证与人工审核通过后,将从完整累计分支创建唯一的新 PR。分支与提交仍保留供追溯。 |
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.
Summary
This draft PR publishes the cumulative KZT refactor work through Step4 to the personal fork only. It keeps the new writer path fail-open unless the planner has sufficient evidence, and prepares Step5 to fill the remaining owner/wrapper/bridge trust evidence.
Key changes:
Validation
Executed on l1 LoongArch worktree:
/home/loongson/work/code/latu-worktrees/kzt-step4-wi230-wi231-integrated-20260709094322lauren/kzt-step4-wi230-wi231-integrated-20260709094322b03fda0a467dd5bf155d34a5ec48b235d5a63a00git status --short: cleangit diff --check: passedninja -C build64-dbg: passedlatxbuild/build-release.sh: exit 0Evidence was synchronized between control-plane
/tmp/kzt-step4-evidence/andl1:/tmp/kzt-step4-evidence/; rsync dry-run reported no content differences.AgentsFlow Status
Project/Task: P-18 / T-62,
KZT refactor / Step4 - RelocateElfRELA immediate JUMP_SLOT hook.ai_review_output_invalidontesting.verifiabilityeven though the AI review summaries accepted the test evidence, raw output, exit codes, mapping, and checklist.This PR is therefore a draft for code review and does not claim that all AgentsFlow Step4 gates are complete. WI-230/WI-231 should be rerun after the AgentsFlow gate/parser is fixed.
Safety Notes
git@github.com:LaurenIsACoder/lat.gitwas configured.LaurenIsACoder/lat, not upstream.