Skip to content

Suppress release-mode panics that ldelf/TA can trigger#742

Open
sangho2 wants to merge 6 commits intomainfrom
sanghle/lvbs/panicless
Open

Suppress release-mode panics that ldelf/TA can trigger#742
sangho2 wants to merge 6 commits intomainfrom
sanghle/lvbs/panicless

Conversation

@sangho2
Copy link
Copy Markdown
Contributor

@sangho2 sangho2 commented Apr 3, 2026

This PR suppresses some release-mode kernel panics (e.g., panic, todo, expect, unwrap, ...) that ldelf/TA can trigger.

@sangho2 sangho2 marked this pull request as ready for review April 3, 2026 16:02
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.

Thank you for the quality improvement.

Sangho Lee added 5 commits April 13, 2026 22:36
Move last_block check in do_cipher_update before cipher application so
the output buffer is not mutated when returning Err(NotSupported).

Add ElfLoaderError::ProtectError variant so sys_mprotect failures in
map_file are not misleadingly routed through the OpenError variant.
Use  for narrowing integer conversions and direct casts for
x86_64-only widening cases so these paths no longer rely on infallible
 conversions.
Return ENOSYS directly when TeeSyscallNr or LdelfSyscallNr decoding
fails instead of routing invalid syscall numbers through sentinel enum
variants.
@sangho2 sangho2 force-pushed the sanghle/lvbs/panicless branch from a501442 to 0431f58 Compare April 13, 2026 22:36
@sangho2 sangho2 force-pushed the sanghle/lvbs/panicless branch from 0431f58 to 0560aab Compare April 13, 2026 22:54
@github-actions
Copy link
Copy Markdown

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

Click for details
--- failure enum_variant_missing: pub enum variant removed or renamed ---

Description:
A publicly-visible enum has at least one variant 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.47.0/src/lints/enum_variant_missing.ron

Failed in:
  variant LdelfSyscallNr::Unknown, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/3d123314d811c5cb3e2cfe76b120764c22df63b1/litebox_common_optee/src/syscall_nr.rs:160
  variant TeeSyscallNr::Unknown, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/3d123314d811c5cb3e2cfe76b120764c22df63b1/litebox_common_optee/src/syscall_nr.rs:128

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