oxidecomputer / oxidecomputer/propolis
Popping a desc off of a virtio queue should return an error
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 270
- Forks
- 42
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 6
Description
Today pop_avail is defined like so:
/// Accummulates a sequence of available descriptors into a `Chain`.
///
/// VirtIO descriptors can be organized into a linked list
pub fn pop_avail(
&self,
chain: &mut Chain,
mem: &MemCtx,
) -> Option<(u16, u32)>
This function likely needs to return Result<Option<(u16, u32), VqError> so we can appropriately handle invalid host/guest state. This means when we detect invalid data from a guest we need to inform the guest that the device needs a reset.
Contributor guide
No contributing guide indexed for this repository
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 Rust pop_avail entry point and trace its callers, especially the handling of Chain, MemCtx, and VqError. Check how invalid guest data is detected and how the device currently communicates reset needs; done means invalid virtio queue state produces the documented error path and informs the guest that reset is required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100