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

Add syscall_scope, a scope guard for system calls. #342

Merged
merged 1 commit into from
Nov 17, 2021

Conversation

jrvanwhy
Copy link
Collaborator

@jrvanwhy jrvanwhy commented Nov 9, 2021

syscall_scope creates a scope in which Allow and Subscribe system calls can be soundly executed, by guaranteeing that the buffers and upcalls are revoked before their lifetime ends. The exact system calls (type and ID) are inferred from the type of the closure passed to syscall_scope, using the ShareList trait.

syscall_scope is the run function described at #341, and ShareList is the SyscallList trait.

`syscall_scope` creates a scope in which Allow and Subscribe system calls can be soundly executed, by guaranteeing that the buffers and upcalls are revoked before their lifetime ends. The exact system calls (type and ID) are inferred from the type of the closure passed to `syscall_scope`, using the `ShareList` trait.

`syscall_scope` is the `run` function described at tock#341, and `ShareList` is the `SyscallList` trait.
@jrvanwhy jrvanwhy added the significant Indicates a PR is significant as defined by the code review policy. label Nov 9, 2021
@jrvanwhy
Copy link
Collaborator Author

Ping on reviews? This blocks further work on the Allow and Subscribe syscall APIs.

Copy link
Contributor

@hudson-ayers hudson-ayers left a comment

Choose a reason for hiding this comment

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

This looks reasonable to me

@jrvanwhy
Copy link
Collaborator Author

bors r+

bors bot added a commit that referenced this pull request Nov 16, 2021
342: Add `syscall_scope`, a scope guard for system calls. r=jrvanwhy a=jrvanwhy

`syscall_scope` creates a scope in which Allow and Subscribe system calls can be soundly executed, by guaranteeing that the buffers and upcalls are revoked before their lifetime ends. The exact system calls (type and ID) are inferred from the type of the closure passed to `syscall_scope`, using the `ShareList` trait.

`syscall_scope` is the `run` function described at #341, and `ShareList` is the `SyscallList` trait.

Co-authored-by: Johnathan Van Why <[email protected]>
@bors
Copy link
Contributor

bors bot commented Nov 16, 2021

Build failed:

@jrvanwhy
Copy link
Collaborator Author

CI failed because cargo miri setup installs xargo using the same toolchain as itself, and xargo depends on serde_json 1.0.70 which requires a newer Rust toolchain. I'm going to attempt to send a PR that updates the Rust toolchain to one that can successfully run cargo miri setup.

@jrvanwhy
Copy link
Collaborator Author

bors r+

@bors
Copy link
Contributor

bors bot commented Nov 17, 2021

Build succeeded:

@bors bors bot merged commit a69ab88 into tock:master Nov 17, 2021
@jrvanwhy jrvanwhy deleted the syscall-scope branch February 15, 2022 21:48
@jrvanwhy jrvanwhy restored the syscall-scope branch February 15, 2022 21:48
@jrvanwhy jrvanwhy deleted the syscall-scope branch February 15, 2022 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
significant Indicates a PR is significant as defined by the code review policy.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants