Re: [PATCH net-next 03/13] virtio_ring: packed: harden dma unmap for indirect

2024-09-12 Thread Xuan Zhuo
On Thu, 12 Sep 2024 03:38:12 -0400, "Michael S. Tsirkin" wrote: > On Thu, Sep 12, 2024 at 02:55:38PM +0800, Xuan Zhuo wrote: > > On Wed, 11 Sep 2024 07:28:36 -0400, "Michael S. Tsirkin" > > wrote: > > > As gcc luckily noted: > > > > > > On Tue, Aug 20, 2024 at 03:33:20PM +0800, Xuan Zhuo wrote:

Re: [PATCH net-next 03/13] virtio_ring: packed: harden dma unmap for indirect

2024-09-12 Thread Michael S. Tsirkin
On Thu, Sep 12, 2024 at 02:55:38PM +0800, Xuan Zhuo wrote: > On Wed, 11 Sep 2024 07:28:36 -0400, "Michael S. Tsirkin" > wrote: > > As gcc luckily noted: > > > > On Tue, Aug 20, 2024 at 03:33:20PM +0800, Xuan Zhuo wrote: > > > @@ -1617,23 +1617,24 @@ static void detach_buf_packed(struct > > > vri

Re: [PATCH net-next 03/13] virtio_ring: packed: harden dma unmap for indirect

2024-09-11 Thread Xuan Zhuo
On Wed, 11 Sep 2024 07:28:36 -0400, "Michael S. Tsirkin" wrote: > As gcc luckily noted: > > On Tue, Aug 20, 2024 at 03:33:20PM +0800, Xuan Zhuo wrote: > > @@ -1617,23 +1617,24 @@ static void detach_buf_packed(struct > > vring_virtqueue *vq, > > } > > > > if (vq->indirect) { > > +

Re: [PATCH net-next 03/13] virtio_ring: packed: harden dma unmap for indirect

2024-09-11 Thread Michael S. Tsirkin
As gcc luckily noted: On Tue, Aug 20, 2024 at 03:33:20PM +0800, Xuan Zhuo wrote: > @@ -1617,23 +1617,24 @@ static void detach_buf_packed(struct vring_virtqueue > *vq, > } > > if (vq->indirect) { > + struct vring_desc_extra *extra; > u32 len; > >

Re: [PATCH net-next 03/13] virtio_ring: packed: harden dma unmap for indirect

2024-08-21 Thread Dan Carpenter
%40linux.alibaba.com patch subject: [PATCH net-next 03/13] virtio_ring: packed: harden dma unmap for indirect config: x86_64-randconfig-161-20240820 (https://download.01.org/0day-ci/archive/20240821/202408210655.dx8v5urw-...@intel.com/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 If you fix the issue

[PATCH net-next 03/13] virtio_ring: packed: harden dma unmap for indirect

2024-08-20 Thread Xuan Zhuo
1. this commit hardens dma unmap for indirect 2. the subsequent commit uses the struct extra to record whether the buffers need to be unmapped or not. So we need a struct extra for every desc, whatever it is indirect or not. Signed-off-by: Xuan Zhuo --- drivers/virtio/virtio_ring.c | 57 ++