Re: [PATCH] virtio: fix off-by-one and invalid access in virtqueue_ordered_fill

2025-08-01 Thread Michael S. Tsirkin
On Fri, Aug 01, 2025 at 06:46:09PM +0300, Michael Tokarev wrote: > On 21.07.2025 18:02, Jonah Palmer wrote: > > Commit b44135daa372 introduced virtqueue_ordered_fill for > > VIRTIO_F_IN_ORDER support but had a few issues: > > > > * Conditional while loop used 'steps <= max_steps' but should've bee

Re: [PATCH] virtio: fix off-by-one and invalid access in virtqueue_ordered_fill

2025-08-01 Thread Michael Tokarev
On 21.07.2025 18:02, Jonah Palmer wrote: Commit b44135daa372 introduced virtqueue_ordered_fill for VIRTIO_F_IN_ORDER support but had a few issues: * Conditional while loop used 'steps <= max_steps' but should've been 'steps < max_steps' since reaching steps == max_steps would indicate that

Re: [PATCH] virtio: fix off-by-one and invalid access in virtqueue_ordered_fill

2025-07-22 Thread Jason Wang
On Mon, Jul 21, 2025 at 11:02 PM Jonah Palmer wrote: > > Commit b44135daa372 introduced virtqueue_ordered_fill for > VIRTIO_F_IN_ORDER support but had a few issues: > > * Conditional while loop used 'steps <= max_steps' but should've been > 'steps < max_steps' since reaching steps == max_steps w

Re: [PATCH] virtio: fix off-by-one and invalid access in virtqueue_ordered_fill

2025-07-22 Thread Si-Wei Liu
Looks good. On 7/21/2025 8:02 AM, Jonah Palmer wrote: Commit b44135daa372 introduced virtqueue_ordered_fill for VIRTIO_F_IN_ORDER support but had a few issues: * Conditional while loop used 'steps <= max_steps' but should've been 'steps < max_steps' since reaching steps == max_steps would in

[PATCH] virtio: fix off-by-one and invalid access in virtqueue_ordered_fill

2025-07-21 Thread Jonah Palmer
Commit b44135daa372 introduced virtqueue_ordered_fill for VIRTIO_F_IN_ORDER support but had a few issues: * Conditional while loop used 'steps <= max_steps' but should've been 'steps < max_steps' since reaching steps == max_steps would indicate that we didn't find an element, which is an error