Skip to content

Add dual-context rewriting for dyld shared cache - #1406

Merged
Sangho Lee (sangho2) merged 1 commit into
uliteboxfrom
sanghle/ulitebox/shared_cache-2-cache-rewriter
Sep 22, 2026
Merged

Sangho Lee (sangho2) merged 1 commit into
uliteboxfrom
sanghle/ulitebox/shared_cache-2-cache-rewriter

Conversation

@sangho2

@sangho2 Sangho Lee (sangho2) commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

This PR adds dual-context (guest and host) rewriting support for the dyld shared cache. Unlike Linux, macOS combines core system libraries into a single file, known as a shared cache, managed dyld. Maintaining a separate guest copy of it is challenging due to both its size (several gigabytes) and pointer authentication code (PAC) usage. This PR addresses these issues by allowing guest and host to share the same shared cache while selectively handling thread pointer access.

@sangho2
Sangho Lee (sangho2) force-pushed the sanghle/ulitebox/shared_cache-2-cache-rewriter branch from f55fb95 to bb30e4b Compare September 22, 2026 16:51
@sangho2
Sangho Lee (sangho2) force-pushed the sanghle/ulitebox/shared_cache-2-cache-rewriter branch from bb30e4b to 55d7f3b Compare September 22, 2026 18:27
@sangho2
Sangho Lee (sangho2) marked this pull request as ready for review September 22, 2026 18:45
@sangho2
Sangho Lee (sangho2) added this pull request to the merge queue Sep 22, 2026
@github-actions

Copy link
Copy Markdown

🤖 SemverChecks 🤖 ⚠️ Potential breaking API changes detected ⚠️

Click for details
--- failure enum_no_repr_variant_discriminant_changed: enum variant had its discriminant change value ---

Description:
The enum's variant had its discriminant value change. This breaks downstream code that used its value via a numeric cast like `as isize`.
        ref: https://doc.rust-lang.org/reference/items/enumerations.html#assigning-discriminant-values
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/enum_no_repr_variant_discriminant_changed.ron

Failed in:
  variant GateMetadata::MsrTpidr 2 -> 3 in /home/runner/work/litebox/litebox/litebox_syscall_rewriter/src/aarch64.rs:574
  variant GateMetadata::X18 3 -> 4 in /home/runner/work/litebox/litebox/litebox_syscall_rewriter/src/aarch64.rs:580
  variant GateMetadata::X18CompareBranch 4 -> 5 in /home/runner/work/litebox/litebox/litebox_syscall_rewriter/src/aarch64.rs:585
  variant GateMetadata::X18Adr 5 -> 6 in /home/runner/work/litebox/litebox/litebox_syscall_rewriter/src/aarch64.rs:590
  variant GateMetadata::X18Branch 6 -> 7 in /home/runner/work/litebox/litebox/litebox_syscall_rewriter/src/aarch64.rs:595
  variant GateMetadata::X18StackWriteback 7 -> 8 in /home/runner/work/litebox/litebox/litebox_syscall_rewriter/src/aarch64.rs:597

--- failure enum_variant_added: enum variant added on exhaustive enum ---

Description:
A publicly-visible enum without #[non_exhaustive] has a new variant.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#enum-variant-new
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/enum_variant_added.ron

Failed in:
  variant GateMetadata:HostAwareMrsTpidr in /home/runner/work/litebox/litebox/litebox_syscall_rewriter/src/aarch64.rs:572

Merged via the queue into ulitebox with commit 95f2bf9 Sep 22, 2026
12 checks passed
@sangho2
Sangho Lee (sangho2) deleted the sanghle/ulitebox/shared_cache-2-cache-rewriter branch September 22, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant