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

Need switch to not use eventfd on target_os = "linux" #1682

Closed
haraldh opened this issue Jun 22, 2023 · 4 comments · Fixed by #1685
Closed

Need switch to not use eventfd on target_os = "linux" #1682

haraldh opened this issue Jun 22, 2023 · 4 comments · Fixed by #1685

Comments

@haraldh
Copy link
Contributor

haraldh commented Jun 22, 2023

For an SGX enclave (using gramine), I can't use the eventfd mechanism. Would be nice, if I could fallback to the pipe mechanism.

Currently I am using haraldh@5852388

But an additional feature might be too much maintenance burden.

Would this help? RUSTFLAGS='--cfg no_eventfd' ... so we can do #[cfg(all(not(no_eventfd), any(target_os = "linux", target_os = "android")))]

@haraldh
Copy link
Contributor Author

haraldh commented Jun 22, 2023

Oh yeah, RUSTFLAGS='--cfg no_eventfd' works great... see master...haraldh:mio:no_eventfd_cfg

@notgull
Copy link

notgull commented Jun 22, 2023

Is it a documented issue that eventfd can't be used inside of an SGX enclave, but epoll and pipes can?

@haraldh
Copy link
Contributor Author

haraldh commented Jun 22, 2023

@Thomasdezeeuw
Copy link
Collaborator

As discussed on Discord, I'm not really a fan of creating a matrix of supported features on top of the matrix of support OSs, it's a burden on maintenance.

However similar things, in the sense of supporting/using a different implementation on an OS that supports a "better" one, has come up before, e.g. #1602. Perhaps we can introduce cfg (not feature) flag for such things, but make it very clear that we don't support it. Then people in very specific situations, like this one, can still use Mio without forking it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants