LATX, kzt: cumulative library passthrough refactor - #6
Draft
LaurenIsACoder wants to merge 8 commits into
Draft
Conversation
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Track exact loader identities, generations, namespaces, dynamic view revisions, and decision leases in the guest registry. Add allocation-free live identity queries and coherent observation helpers for later loader and patching stages.\n\nCover registry lifecycle, concurrency, address resolution, loader handles, and decision lease behavior with focused white-box tests. Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Add context-local loader quiescence readers and writers, exact binding lifetime gates, lazy prebind epochs, and loader lifecycle event publication. Replace fixed lifecycle snapshot capacity with inline storage that grows only on loader event paths and reports allocation or overflow failures.\n\nCover teardown, writer admission, prebind leases, hook failure paths, and 1025-object lifecycle generation rollover with white-box tests. Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Build symbol-scope and dynsym proofs before patch decisions, route every KZT-owned slot update through expected-value CAS, and treat RELRO permission restoration as part of the write transaction. Add per-object GOT/PLT claims, exact wrapper bridge provenance, and fail-open atfork protection for concurrent bridge publication.\n\nCover scope revalidation, route policy, rollback and unrecoverable outcomes, bridge concurrency, and wrapper selection with focused white-box tests. Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Route dlopen, dlsym, dlclose, namespaces, eager relocations, and lazy completion through guest ld.so evidence while preserving fail-open behavior. Connect exact binding and lifecycle publication to loader callbacks, protect dlclose with the loader-quiescence writer, and keep slot publication behind scope, generation, CAS, and RELRO transaction checks.\n\nIntegrate prebound bridge translation, thread-local dlerror state, teardown diagnostics, and targeted fast paths without adding work to disabled KZT paths. Add focused API, production-route, lifecycle, and source-contract coverage. Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Add reusable x86_64 guest loader fixtures, deterministic harnesses, and launchers for namespace, visibility, versioning, lifecycle, preemption, and wrapper-handle behavior. Register the accumulated KZT unit, source-contract, and real-guest coverage in Meson while keeping performance execution opt-in.\n\nThis completes the internal commit sequence intended for one future cumulative KZT pull request. Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Keep the guest dlvsym result authoritative unless the exact loader identity, retained library binding, guest dynsym address and requested symbol version all agree with a wrapper bridge. Treat missing, mismatched, and empty version evidence as fail-open, while leaving the explicit NULL dlsym path on its existing unversioned cache. Add public selector behavior coverage for exact matches and fail-open boundaries, and update the related source contracts so both libc and libdl remain on the shared guest DL API. Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Route loader, symbol, relocation, and X11/XCB decisions through context-owned KZT state with retained lifetime evidence and guarded guest fallbacks. Remove the superseded lazy binding and diagnostic paths so production no longer depends on the old direct-routing state. Add focused lifecycle, cancellation, bridge, relocation, and source-contract coverage, including exact dlsym/GLOB_DAT wrapper selection and cache invalidation checks. Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
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.
目的
在最新 LAT 上游代码基础上,累计保存并审查本轮 KZT 库直通重构。该 PR 是本轮重构从 Step1 到最终收口的唯一源码 PR,后续阶段继续更新同一分支,不再按阶段拆分 PR。
PR3 保持原样,仅作为上一版重构方案的对照参考。
当前范围
影响
当前改动仍以安全收敛和验证为主。只有证据完整时才允许新的库直通写入;无法确认时保持原有行为。
已完成验证
build32:KZT 全量单测 36/36 通过。build64:KZT 全量单测 36/36 通过。build325/5、build645/5 通过。后续