Skip to content

Fix OP-TEE ELF loading without trampoline bug#841

Merged
sangho2 merged 2 commits intomainfrom
sanghle/lvbs/fix-elf-loader-bug
May 8, 2026
Merged

Fix OP-TEE ELF loading without trampoline bug#841
sangho2 merged 2 commits intomainfrom
sanghle/lvbs/fix-elf-loader-bug

Conversation

@sangho2
Copy link
Copy Markdown
Contributor

@sangho2 sangho2 commented May 8, 2026

The return values of parse_trampoline have changed (i.e., it returns UnpatchedBinary for an ELF binary without trampoline), but litebox_shim_optee has not been updated accordingly.

Issue #839

@sangho2 sangho2 marked this pull request as ready for review May 8, 2026 02:28
@sangho2 sangho2 enabled auto-merge May 8, 2026 02:28
@sangho2 sangho2 requested a review from wdcui May 8, 2026 02:28
Copy link
Copy Markdown
Member

@wdcui wdcui left a comment

Choose a reason for hiding this comment

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

Why would OPTEE shim see unpatched binary?

@sangho2
Copy link
Copy Markdown
Contributor Author

sangho2 commented May 8, 2026

Why would OPTEE shim see unpatched binary?

This is for LVBS. It doesn't use trampoline and doesn't patch binaries.

@sangho2 sangho2 disabled auto-merge May 8, 2026 02:34
@sangho2 sangho2 added this pull request to the merge queue May 8, 2026
@wdcui
Copy link
Copy Markdown
Member

wdcui commented May 8, 2026

Why would OPTEE shim see unpatched binary?

This is for LVBS. It doesn't use trampoline and doesn't patch binaries.

Then would get_syscall_entry_point() return 0?

@sangho2 sangho2 removed this pull request from the merge queue due to a manual request May 8, 2026
@sangho2
Copy link
Copy Markdown
Contributor Author

sangho2 commented May 8, 2026

Why would OPTEE shim see unpatched binary?

This is for LVBS. It doesn't use trampoline and doesn't patch binaries.

Then would get_syscall_entry_point() return 0?

Currently, it returns the callback's address. Better to make it return zero.

@wdcui
Copy link
Copy Markdown
Member

wdcui commented May 8, 2026

Why would OPTEE shim see unpatched binary?

This is for LVBS. It doesn't use trampoline and doesn't patch binaries.

Then would get_syscall_entry_point() return 0?

Currently, it returns the callback's address. Better to make it return zero.

Yeah, that's the contract: we expect zero for kernel platforms.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

🤖 SemverChecks 🤖 No breaking API changes detected

Note: this does not mean API is unchanged, or even that there are no breaking changes; simply, none of the detections triggered.

@sangho2 sangho2 added this pull request to the merge queue May 8, 2026
Merged via the queue into main with commit 526d690 May 8, 2026
13 checks passed
@sangho2 sangho2 deleted the sanghle/lvbs/fix-elf-loader-bug branch May 8, 2026 03:11
@sangho2 sangho2 mentioned this pull request May 8, 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.

2 participants