Dynamic memory allocation for enclaves running on SGXv2 processors#83927
Dynamic memory allocation for enclaves running on SGXv2 processors#83927raoulstrackx wants to merge 3 commits intorust-lang:masterfrom
Conversation
|
(rust-highfive has picked a reviewer for you, use r? to override) |
| [patch.crates-io] | ||
| fortanix-sgx-abi = { git = "https://github.com/fortanix/rust-sgx", branch = "raoul/edmm" } | ||
| sgx-isa = { git = "https://github.com/fortanix/rust-sgx", branch = "raoul/edmm" } | ||
| bitflags = { git = "https://github.com/bitflags/bitflags" } |
There was a problem hiding this comment.
bitflags patch can be removed once a new version is published on crates.io
|
|
||
| [patch.crates-io] | ||
| fortanix-sgx-abi = { git = "https://github.com/fortanix/rust-sgx", branch = "raoul/edmm" } | ||
| sgx-isa = { git = "https://github.com/fortanix/rust-sgx", branch = "raoul/edmm" } |
There was a problem hiding this comment.
Patches need to be removed when fortanix/rust-sgx#292 merges
| } | ||
|
|
||
| #[derive(Debug)] | ||
| pub struct BuddyAllocator { |
There was a problem hiding this comment.
Should this move to a crate outside the compiler?
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
☔ The latest upstream changes (presumably #83776) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Triage: ci can't pass in current form, and there's merge conflict now. |
|
@raoulstrackx any updates? |
|
@raoulstrackx I'm gonna close this due to inactivity. Feel free to reopen or create a new pr when you're ready to work on this again. Thanks! |
Intel SGX enclaves running on processors with only SGXv1 extensions, need to reserve all enclave memory they possibly need at enclave creation time. This requires enclave developers to estimate the worst case memory consumption and oversubscribe EPC memory.
On processors with SGXv2 extensions, enclaves may request/release enclave memory dynamically (i.e., after the enclave was created). Changes to enclave memory need to be tracked by both the enclave as the enclave runtime system (untrusted enclave runner, OS, SGX driver). This PR adds the required support for such enclaves. Changes are to the enclave runner and other closely related crates are made in: fortanix/rust-sgx#292.
cc: @jethrogb