lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJaqyWerWJpLgpaMtaAYfBPW4UUWqLO7ja9C7-U7Y5YukLN1Tg@mail.gmail.com>
Date: Wed, 26 Mar 2025 13:31:38 +0100
From: Eugenio Perez Martin <eperezma@...hat.com>
To: Jason Wang <jasowang@...hat.com>
Cc: mst@...hat.com, xuanzhuo@...ux.alibaba.com, virtualization@...ts.linux.dev, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 12/19] virtio_ring: use u16 for last_used_idx in virtqueue_poll_split()

On Mon, Mar 24, 2025 at 6:44 AM Jason Wang <jasowang@...hat.com> wrote:
>
> Use u16 for last_used_idx in virtqueue_poll_split() to align with the
> spec.
>
> Signed-off-by: Jason Wang <jasowang@...hat.com>
> ---
>  drivers/virtio/virtio_ring.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
> index 19aa24d62d20..a2884eae14d9 100644
> --- a/drivers/virtio/virtio_ring.c
> +++ b/drivers/virtio/virtio_ring.c
> @@ -801,7 +801,7 @@ static void detach_buf_split(struct vring_virtqueue *vq, unsigned int head,
>  }
>
>  static bool virtqueue_poll_split(const struct vring_virtqueue *vq,
> -                                unsigned int last_used_idx)
> +                                u16 last_used_idx)
>  {
>         return (u16)last_used_idx != virtio16_to_cpu(vq->vq.vdev,

So this cast to u16 is not needed anymore, isn't it?

>                         vq->split.vring.used->idx);
> --
> 2.42.0
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ