[PAL/Linux-SGX] Prepare AEX handler to call C code in release mode #2025
+34
−22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the changes
Part 1 in AEX-Notify series.
Previously, the AEX handler only called C code (more specific to our use case, the code that works on the untrusted-thread stack) for SGX profiling logic and only when Gramine was built in debug mode.
As a preparation for AEX-Notify support, this commit modifies the AEX handler such that it can call C code when Gramine is built in release mode. Also, the AEX handler logic is not restricted to SGX profiling only, so the
_PROF
/_prof
suffixes in related function and variable names are removed.This commit also adds two small prerequisites for AEX-Notify: (1)
eenter_pointer
helper so that signal handling logic can learn whether an exception happened at EENTER instruction, and (2) dummy functionmaybe_raise_pending_signal
that will be populated in a later commit.See also related PRs and discussions:
How to test this PR?
CI is enough.
This change is