intel / intel/confidential-computing.sgx.sdk
EMODPE not extending permissions
- Dominant language
- C++
- Stars
- 2
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
I'm making some modifications to my version of linux-sgx sdk-2.22. I have a page that needs to be toggled between rwx and r.
The process I'm following is:
RO enclave page
emodpe -> using do_emodpe
access the page
emodpr-> using emodpr ocall
eaccept-> using my assembly
When doing emodpe, something seems to be not working properly, as once I do the emodpe and try to access the page, there is a fault and the execution goes to the vdso_urts_handler and the enclave crashes.
For context, these are the flags that I use:
For emodpe->secinfo_RWX.flags = SI_FLAG_R|SI_FLAG_W|SI_FLAG_X|SI_FLAG_REG; (I've also tried with a PENDING flag added to this)
For eaccept->secinfo_R_PR.flags = SI_FLAG_R|SI_FLAG_REG|SI_FLAG_PR;
For emodpr->secinfo_R.flags = SI_FLAG_R|SI_FLAG_REG;
All the flags are aligned to 64b, and the address itself is aligned to a page. Everything is zero'd out at initialization.
What can I possibly be doing wrong? Let me know if I need to give more information.
Contributor guide
Research direction
Read do_emodpe, the emodpr OCALL, the custom eaccept assembly, and vdso_urts_handler first. Reproduce the reported emodpe → page access → emodpr → eaccept sequence while checking the stated flags, alignment, and initialization; done means identifying the fault cause or documenting the additional information needed to diagnose it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux
- Domain
- operating-systems, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100