Skip to content

Direct data copy between normal-world shared memory and TA memory - #1276

Merged
Sangho Lee (sangho2) merged 2 commits into
mainfrom
sanghle/optee/direct_copy
Sep 4, 2026
Merged

Direct data copy between normal-world shared memory and TA memory#1276
Sangho Lee (sangho2) merged 2 commits into
mainfrom
sanghle/optee/direct_copy

Conversation

@sangho2

@sangho2 Sangho Lee (sangho2) commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

This PR lets LiteBox/LVBS secure kernel directly copy data between normal-world shared memory and TA memory without relying on kernel-owned bounce buffers. It does not harm our security guarantee because source and destination addresses as well as their data sizes are tightly checked. It still ensures that TAs never directly access normal-world memory.

@sangho2

Sangho Lee (sangho2) commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

A sequel of #1257. Issue #1138.

@sangho2 Sangho Lee (sangho2) changed the title [DRAFT] Direct data copy between normal-world shared memory and TA memory [DRAFT] Direct data copy between normal-world shared memory and TA bounce buffer Sep 3, 2026
@sangho2 Sangho Lee (sangho2) changed the title [DRAFT] Direct data copy between normal-world shared memory and TA bounce buffer [DRAFT] Direct data copy between normal-world shared memory and TA memory Sep 3, 2026
@sangho2 Sangho Lee (sangho2) changed the title [DRAFT] Direct data copy between normal-world shared memory and TA memory Direct data copy between normal-world shared memory and TA memory Sep 3, 2026
@sangho2
Sangho Lee (sangho2) marked this pull request as ready for review September 3, 2026 20:36
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

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

Click for details
--- failure constructible_struct_adds_field: struct exhaustively constructible through public API adds field ---

Description:
A pub struct that could be exhaustively constructed with a literal using only public API has a new pub field, breaking existing exhaustive literals.
        ref: https://doc.rust-lang.org/reference/expressions/struct-expr.html
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/constructible_struct_adds_field.ron

Failed in:
  field TaRequestInfo.shm_info in /home/runner/work/litebox/litebox/litebox_shim_optee/src/msg_handler.rs:395

--- failure function_parameter_count_changed: pub fn parameter count changed ---

Description:
A publicly-visible function now takes a different number of parameters.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#fn-change-arity
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/function_parameter_count_changed.ron

Failed in:
  litebox_shim_optee::msg_handler::update_optee_msg_args now takes 7 parameters instead of 6, in /home/runner/work/litebox/litebox/litebox_shim_optee/src/msg_handler.rs:581

--- failure struct_pub_field_missing: pub struct's pub field removed or renamed ---

Description:
A publicly-visible struct has at least one public field that 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.50.0/src/lints/struct_pub_field_missing.ron

Failed in:
  field out_shm_info of struct TaRequestInfo, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/8f8a86a219ba047149e68790a4a12116323e24ad/litebox_shim_optee/src/msg_handler.rs:396

@wdcui Weidong Cui (wdcui) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

@sangho2
Sangho Lee (sangho2) added this pull request to the merge queue Sep 4, 2026
Merged via the queue into main with commit ba6d21e Sep 4, 2026
22 of 25 checks passed
@sangho2
Sangho Lee (sangho2) deleted the sanghle/optee/direct_copy branch September 4, 2026 12:48
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.

LVBS: Direct memory copy between different foreign memory domains (i.e., no in-kernel bounce buffer)

2 participants