intel / intel/confidential-computing.sgx.sdk
SGX emulation gets SIGILL on Rosetta 2
- Dominant language
- C++
- Stars
- 2
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
When using SGX emulation under rosetta 2 (e.g. orbstack docker), you will get a SIGILL.
The offender is VERW, which rosetta does not implement. and rightly so - it reports MD_CLEAR=0 which is equivalent of "I don't need VERW". cursory examination suggests that's how the linux kernel and glibc handle it too.
The fix is trivial - avoid VERW when MD_CLEAR is not set.
Contributor guide
Research direction
Locate the SGX emulation code that executes VERW and inspect how MD_CLEAR is detected. Reproduce the SIGILL under Rosetta 2, such as with OrbStack Docker, then verify that VERW is avoided when MD_CLEAR is unset while the existing behavior remains intact when it is set.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100