Skip to content
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

feat: add no_eventfd cfg switch #1683

Closed
wants to merge 1 commit into from

Conversation

haraldh
Copy link
Contributor

@haraldh haraldh commented Jun 23, 2023

This disables the use of eventfd on linux for the Waker implementation. Instead pipe is used as a fallback.

Because some SGX runtimes like gramine do not have a secure emulation of the eventfd syscall, compiling with RUSTFLAGS='--cfg no_eventfd' will produce a more secure SGX application.

See also:
https://gramine.readthedocs.io/en/stable/manifest-syntax.html#allowing-eventfd

Resolves: #1682

This disables the use of `eventfd` on linux for the `Waker`
implementation. Instead `pipe` is used as a fallback.

Because some SGX runtimes like gramine do not have a secure emulation of
the `eventfd` syscall, compiling with `RUSTFLAGS='--cfg no_eventfd'`
will produce a more secure SGX application.

See also:
https://gramine.readthedocs.io/en/stable/manifest-syntax.html#allowing-eventfd

Signed-off-by: Harald Hoyer <[email protected]>
@Thomasdezeeuw
Copy link
Collaborator

I'm going to do this myself as we likely want a similar flag for #1602, so I'll need to think a bit more about documentation and naming. Thanks for putting in the effort.

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.

Need switch to not use eventfd on target_os = "linux"
2 participants