LATX, refactor: staged KZT library passthrough - #4
Closed
LaurenIsACoder wants to merge 18 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>
LaurenIsACoder
marked this pull request as draft
July 6, 2026 12:30
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 重构的 Step1/Step2 阶段性草稿,内容已被后续累计分支完全包含。为遵循“所有阶段完成、验证和人工审核结束后只创建一个最终累计 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.
KZT staged refactor: Step2 Runtime Dynamic Parser
This PR is the cumulative PR for the staged KZT refactor. This update completes Step2, Runtime Dynamic Parser, while keeping the existing KZT legacy flow as the source of runtime behavior. The new path is observable, testable, and fail-open.
Step2 scope
GuestDynamicViewsnapshots to the existing registry/object lifecycle instead of introducing a process-level global object.GuestObject, generation, tag, and field.Step2 commit chain
7a5268946b39125277a6031f4f22a8d5ff65GuestDynamicViewsnapshots under registry/object lifecycle75ad9a33c4fb191c58c8f211b6af8a329009Latest local commit prepared for this PR update:
Verification
build64-dbgKZT Meson tests: 8/8 passed.CI note
Remote CI may still fail because of GHCR runner image access, runner environment, or AOSC build environment issues. Those failures are separate from the local LAT build and KZT unit-test evidence above and should not be treated as Step2 code failures without checking the failing logs.
Safety note
This PR must only be updated through the
LaurenIsACoder/latfork. It must not be pushed to the upstream LAT repository. Any push or PR update still requires explicit human approval before execution.