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

fix(virtqueue): make BufferElem::{len,capacity} return u32 #1515

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

mkroening
Copy link
Member

@mkroening mkroening commented Dec 16, 2024

Closes #1514.

This was a usize before, which got cast to u32 without checks, which was wrong: 1749ab4
The fix for that restricted this to u16, though, which is too narrow.

u32 should be correct, though: https://docs.oasis-open.org/virtio/virtio/v1.2/cs01/virtio-v1.2-cs01.html#x1-430005

@mkroening mkroening requested a review from stlankes December 16, 2024 17:28
@mkroening mkroening self-assigned this Dec 16, 2024
@mkroening mkroening added this pull request to the merge queue Dec 18, 2024
Merged via the queue into main with commit 135f0b2 Dec 18, 2024
13 checks passed
@mkroening mkroening deleted the virtqueue-len-u32 branch December 18, 2024 15:04
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.

TryFromIntError: virtqueue BufferElem capacity overflows u16
1 participant