Skip to content

Use physical pointer abstraction in HVCI/HEKI#817

Open
sangho2 wants to merge 9 commits intomainfrom
sanghle/lvbs/vmap_copy
Open

Use physical pointer abstraction in HVCI/HEKI#817
sangho2 wants to merge 9 commits intomainfrom
sanghle/lvbs/vmap_copy

Conversation

@sangho2
Copy link
Copy Markdown
Contributor

@sangho2 sangho2 commented Apr 28, 2026

This PR lets HVCI/HEKI use physical pointer abstraction to access VTL0 memory. This is equivalent to the OP-TEE shim's normal-world memory access. This PR and physical address range lock (next PR) will enable memory-safe VTL0 memory access (i.e., drop unsafe from read/write methods).

@sangho2 sangho2 added the must-not-merge:prototype An experimental/proof-of-concept PR that must not be merged. label Apr 28, 2026
@sangho2 sangho2 force-pushed the sanghle/lvbs/vmap_copy branch from 5f1c269 to 1bd4d62 Compare May 1, 2026 03:26
@sangho2 sangho2 force-pushed the sanghle/lvbs/vmap_copy branch from 29c61b5 to e42c3a0 Compare May 1, 2026 15:51
@sangho2 sangho2 changed the title [DRAFT] Use physical pointer abstraction in HVCI/HEKI Use physical pointer abstraction in HVCI/HEKI May 1, 2026
@sangho2 sangho2 changed the title Use physical pointer abstraction in HVCI/HEKI Use safe physical pointer abstraction in HVCI/HEKI May 1, 2026
@sangho2 sangho2 removed the must-not-merge:prototype An experimental/proof-of-concept PR that must not be merged. label May 1, 2026
@sangho2 sangho2 marked this pull request as ready for review May 1, 2026 20:11
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

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

Click for details
--- failure inherent_method_missing: pub method removed or renamed ---

Description:
A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.47.0/src/lints/inherent_method_missing.ron

Failed in:
  LinuxKernel::copy_from_vtl0_phys, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/a7e3e2b89dd455f852d40a54aebe00eb4424a1cd/litebox_platform_lvbs/src/lib.rs:726
  LinuxKernel::copy_to_vtl0_phys, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/a7e3e2b89dd455f852d40a54aebe00eb4424a1cd/litebox_platform_lvbs/src/lib.rs:766
  LinuxKernel::copy_slice_to_vtl0_phys, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/a7e3e2b89dd455f852d40a54aebe00eb4424a1cd/litebox_platform_lvbs/src/lib.rs:801
  LinuxKernel::copy_slice_from_vtl0_phys, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/a7e3e2b89dd455f852d40a54aebe00eb4424a1cd/litebox_platform_lvbs/src/lib.rs:836

--- failure module_missing: pub module removed or renamed ---

Description:
A publicly-visible module cannot be imported by its prior path. A `pub use` may have been removed, or the module may have been renamed, removed, or made non-public.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.47.0/src/lints/module_missing.ron

Failed in:
  mod litebox_shim_optee::ptr, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/a7e3e2b89dd455f852d40a54aebe00eb4424a1cd/litebox_shim_optee/src/ptr.rs:4

--- failure struct_missing: pub struct removed or renamed ---

Description:
A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.47.0/src/lints/struct_missing.ron

Failed in:
  struct litebox_shim_optee::NormalWorldConstPtr, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/a7e3e2b89dd455f852d40a54aebe00eb4424a1cd/litebox_shim_optee/src/ptr.rs:496
  struct litebox_shim_optee::ptr::PhysConstPtr, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/a7e3e2b89dd455f852d40a54aebe00eb4424a1cd/litebox_shim_optee/src/ptr.rs:496
  struct litebox_shim_optee::NormalWorldMutPtr, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/a7e3e2b89dd455f852d40a54aebe00eb4424a1cd/litebox_shim_optee/src/ptr.rs:112
  struct litebox_shim_optee::ptr::PhysMutPtr, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/a7e3e2b89dd455f852d40a54aebe00eb4424a1cd/litebox_shim_optee/src/ptr.rs:112

@sangho2 sangho2 added must-not-merge:prototype An experimental/proof-of-concept PR that must not be merged. and removed must-not-merge:prototype An experimental/proof-of-concept PR that must not be merged. labels May 1, 2026
@sangho2 sangho2 changed the title Use safe physical pointer abstraction in HVCI/HEKI Use physical pointer abstraction in HVCI/HEKI May 1, 2026
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