Skip to content

Conversation

@raoulstrackx
Copy link
Contributor

SGXv2 platforms support calling the rdtscp instruction inside an enclave. PRs #659 and #660 added support to take advantage of this change and enable enclave to keep track of time without doing a usercall. This PR changes the default behavior on platforms that have SGXv2 support. This is a bit tricky as existing enclaves were not compiled with this in mind. When they do receive additional information from the enclave-runner that they don't expect, they will panic. This is addressed by printing a detailed error message with possible solutions.
As this code only makes sense for enclaves that were compiled with rdtscp support in mind, this should be merged at the same time support lands in the Rust compiler.

mzohreva
mzohreva previously approved these changes Dec 2, 2024
Taowyoo
Taowyoo previously approved these changes Dec 5, 2024
@raoulstrackx raoulstrackx force-pushed the raoul/rte-204-insecure_time_through_rdtscp branch from a41c00b to a34e976 Compare December 12, 2024 14:11
Base automatically changed from raoul/rte-204-insecure_time_through_rdtscp to master December 13, 2024 13:57
@raoulstrackx raoulstrackx dismissed stale reviews from Taowyoo and mzohreva December 13, 2024 13:57

The base branch was changed.

@raoulstrackx raoulstrackx force-pushed the raoul/rte-204-enable_rdtscp_in_enclaves_by_default branch from ffdd05d to 9992eca Compare December 13, 2024 14:43
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.

4 participants