Repository navigation
emulation: admit fixed Darwin symbolic links - #645
Merged
Merged
Conversation
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.
Darwin process inputs could not describe symbolic links, and raw readlink/readlinkat stopped as unsupported. This change admits an optional fixed initial
darwin_files.symbolic_linkscatalogue and resolves links through the existing Darwin pathname owner across macOS, iOS and iOS simulator profiles.Targets retain their exact bytes. The resolver handles relative/absolute targets, reparses trailing slashes after each expansion, bounds traversal to 32 expansions and preserves terminator-inclusive PATH_MAX checks. Link metadata and directory records describe the link itself; ordinary stat/open/access follow the actual target. No-follow and exclusive-open policies keep terminal retention separate from expansion refusal. Raw syscall 58 uses its signed low32 count, while 473 retains size_t width; both validate the count before pathname/dirfd imports and copy only the returned prefix without a NUL. Retained file descriptors, writable contents and mmap leases belong to the resolved target object.
The JSON decoder rejects malformed targets, inconsistent metadata, collisions and link ancestors before loading. Nonempty link catalogues currently exclude namespace mutation grants; fixed-name writable regular files remain supported. Dynamic symbolic/hard-link creation, link removal/rename, permission enforcement and full Apple runtime/framework execution remain outside this contract. All eleven Darwin guides and source-backed capability claims are updated.
This branch includes the open prerequisite #643 and the current dev baseline. #589 is already merged.
Validation on native ARM64 macOS, Release, with sequential execution and unchanged guest deadlines/budgets/quanta. Complete backend/owner/SDK/native acceptance below was executed at
d859feda0, after the shared-backend dev integration. The subsequent92f6fdc50merge incorporates dev8eee34cceand changes only the compiler output layer; all execution objects, fixtures and owner executables retain their accepted bytes:Main commands:
NEVERD_THREADS=1 python3 scripts/run_native_cpu_ci.py --build build-hvf-arm64 --evidence <directory> --parallel 1 --require-darwin-backend hvf, each affected complete GoogleTest owner, the recorded original SDK method, andpython3 scripts/run_darwin_kernel_reference.py --architecture arm64 --evidence <directory>. The shared-backend merge rebuilt 13 targets with four workers. The subsequent compiler integration rebuilt the shared library/CLI with four workers; all 33 link-increment files and the accepted execution objects/archives/fixtures/owner executables are byte-identical. Its rebuilt public library passes six affected C API/CLI cases, 12 ABI tests and five actual SDK calls whose complete requests, fixture bytes and reports equal the accepted five-profile trace. Complete merged documentation checks also pass. Both source/artifact epochs are preserved; 1,748 actual selected artifacts are bound in the final epoch.Physical iOS, native Intel, KVM/WHP and remote CI execution are outside this local acceptance.
Semantics were checked against pinned XNU namei, readlink/nameiat, open authorization, separator parsing, and directory/no-follow ordering.