oxidecomputer / oxidecomputer/hubris
Blocking in closed kernel receive with a zero notification mask: should it be a fault?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.6k
- Forks
- 239
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 23
Description
We currently used closed receive against the kernel's virtual TaskId in cases where we only wish to receive notifications, not messages. It's currently possible to call this with a notification mask with all bits clear. In this case, the task will never receive notifications. This is okay-ish in our intended applications because an application-level watchdog will eventually restart the dead task, but, it is not ideal.
We could detect this immediately on entry to the kernel and turn it into a UsageError fault against the task, since it most likely represents a programming error.
I think we've got a TODO about this somewhere in the code but I don't see an issue filed, so, here's an issue. Thanks to an anonymous friend of @steveklabnik's for reminding me about this.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin at the kernel entry for closed receive against the virtual TaskId and locate the TODO mentioned in the issue. Trace how an all-clear notification mask is handled and how UsageError faults are raised. Done means the zero-mask case is detected immediately and faults the task instead of blocking indefinitely.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- embedded-iot, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100