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

Cancel queue #286

Closed
wants to merge 3 commits into from
Closed

Cancel queue #286

wants to merge 3 commits into from

Conversation

mzohreva
Copy link
Contributor

This is on top of PR #246 and adds a third queue for cancelling blocked usercalls.

@mzohreva mzohreva requested review from jethrogb and Goirad September 18, 2020 21:47
@mzohreva mzohreva force-pushed the mz/cancel_queue branch 2 times, most recently from 8094551 to 7ab942c Compare September 22, 2020 20:30
Base automatically changed from mz/impl_fifo to master October 7, 2020 15:55
@@ -453,6 +453,10 @@ pub const EV_RETURNQ_NOT_EMPTY: u64 = 0b0000_0000_0000_0010;
/// An event that enclaves can use for synchronization.
#[cfg_attr(feature = "rustc-dep-of-std", unstable(feature = "sgx_platform", issue = "56975"))]
pub const EV_UNPARK: u64 = 0b0000_0000_0000_0100;
/// An event that will be triggered by userspace when the cancel queue is not
/// or no longer full.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't check the exact language when looking at the other queue. Are we correctly handling the “not full” case? i.e. this phrasing suggests that if the enclave calls wait on a queue event and there is no event pending but the queue is not empty/full, an event should be generated immediately.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we do that in the implementation. It's based on the assumption that the enclave would only issue a wait usercall with NOT_EMPTY/NOT_FULL only after trying to send/recv on a queue. But I don't think it would be too difficult to change this. We'd need some way of getting the queue's empty/full state in fn wait.

fortanix-sgx-abi/src/lib.rs Outdated Show resolved Hide resolved
fortanix-sgx-abi/src/lib.rs Outdated Show resolved Hide resolved
fortanix-sgx-abi/src/lib.rs Outdated Show resolved Hide resolved
@Taowyoo
Copy link
Collaborator

Taowyoo commented Apr 13, 2024

Close this since this is done by #515

@Taowyoo Taowyoo closed this Apr 13, 2024
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.

3 participants