Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

hudson-ayers
Copy link
Contributor

Pull Request Overview

This pull request enforces that only a single process may (implicitly) reserve the nonvirtualized userspace driver. Also, the driver now store callbacks and appslices in grant regions.

This is one of the remaining capsules blocking #2462 .

One observation: repeatedly handling the possibility of a grant entrance (within a single function) failing is a pain. But I do not think it is possible for a grant entrance to fail after the first entrance -- the grant is already allocated at that point, and the process is present. So I omitted the error handling in command() after the first grant entrance.

Testing Strategy

This pull request was tested by compiling.

TODO or Help Wanted

N/A

Documentation Updated

  • No updates are required.

Formatting

  • Ran make prepush.

bradjc
bradjc previously approved these changes Apr 22, 2021
@lschuermann lschuermann self-requested a review April 23, 2021 15:40
Copy link
Member

@lschuermann lschuermann left a comment

Choose a reason for hiding this comment

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

Overall this looks good, just two minor issues/questions.

} else {
return Err((slice, ErrorCode::NOMEM));
}
let app = self.app.expect("cant fail");
Copy link
Member

Choose a reason for hiding this comment

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

Isn't app always equivalent to process_id here, given the logic above? Then I suppose we could just use that and get rid of the expect.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good call, done

Copy link
Member

Choose a reason for hiding this comment

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

Did you push this already?

Enforce that only a single process may (implicitly) reserve the
nonvirtualized userspace driver. Also, store callbacks and appslices
in grant regions.
_ => Err((slice, ErrorCode::NOSUPPORT)),
let res = self
.apps
.enter(app, |app| {
Copy link
Member

Choose a reason for hiding this comment

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

Nit: this technically works, though the ProcessId and Grant region are related but different things and I fear that shadowing the app variable might be confusing. Feel free to not change this if not considered an issue.

@bradjc
Copy link
Contributor

bradjc commented Apr 26, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Apr 26, 2021

@bors bors bot merged commit 29c7c90 into tock:master Apr 26, 2021
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.

4 participants