-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic memory allocation for enclaves running on SGXv2 processors #83927
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
@@ -96,6 +96,10 @@ cargo = { path = "src/tools/cargo" } | |||
rustfmt-nightly = { path = "src/tools/rustfmt" } | |||
|
|||
[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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bitflags
patch can be removed once a new version is published on crates.io
@@ -96,6 +96,10 @@ cargo = { path = "src/tools/cargo" } | |||
rustfmt-nightly = { path = "src/tools/rustfmt" } | |||
|
|||
[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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Patches need to be removed when fortanix/rust-sgx#292 merges
} | ||
|
||
#[derive(Debug)] | ||
pub struct BuddyAllocator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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