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>] [day] [month] [year] [list]
Message-ID: <20241118172605.19ee6f25@canb.auug.org.au>
Date: Mon, 18 Nov 2024 17:26:05 +1100
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: "Michael S. Tsirkin" <mst@...hat.com>, David Miller
 <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
 <pabeni@...hat.com>
Cc: Networking <netdev@...r.kernel.org>, Linux Kernel Mailing List
 <linux-kernel@...r.kernel.org>, Linux Next Mailing List
 <linux-next@...r.kernel.org>, Wenyu Huang <huangwenyu1998@...il.com>, Xuan
 Zhuo <xuanzhuo@...ux.alibaba.com>
Subject: linux-next: manual merge of the vhost tree with the net_next tree

Hi all,

Today's linux-next merge of the vhost tree got a conflict in:

  drivers/virtio/virtio_ring.c

between commits:

  9f19c084057a ("virtio_ring: introduce vring_need_unmap_buffer")
  880ebcbe0663 ("virtio_ring: remove API virtqueue_set_dma_premapped")

from the net_next tree and commit:

  a49c26f761d2 ("virtio: Make vring_new_virtqueue support packed vring")

from the vhost tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/virtio/virtio_ring.c
index 8167be01b400,48b297f88aba..000000000000
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@@ -1135,6 -1129,66 +1126,64 @@@ static int vring_alloc_queue_split(stru
  	return 0;
  }
  
+ static struct virtqueue *__vring_new_virtqueue_split(unsigned int index,
+ 					       struct vring_virtqueue_split *vring_split,
+ 					       struct virtio_device *vdev,
+ 					       bool weak_barriers,
+ 					       bool context,
+ 					       bool (*notify)(struct virtqueue *),
+ 					       void (*callback)(struct virtqueue *),
+ 					       const char *name,
+ 					       struct device *dma_dev)
+ {
+ 	struct vring_virtqueue *vq;
+ 	int err;
+ 
+ 	vq = kmalloc(sizeof(*vq), GFP_KERNEL);
+ 	if (!vq)
+ 		return NULL;
+ 
+ 	vq->packed_ring = false;
+ 	vq->vq.callback = callback;
+ 	vq->vq.vdev = vdev;
+ 	vq->vq.name = name;
+ 	vq->vq.index = index;
+ 	vq->vq.reset = false;
+ 	vq->we_own_ring = false;
+ 	vq->notify = notify;
+ 	vq->weak_barriers = weak_barriers;
+ #ifdef CONFIG_VIRTIO_HARDEN_NOTIFICATION
+ 	vq->broken = true;
+ #else
+ 	vq->broken = false;
+ #endif
+ 	vq->dma_dev = dma_dev;
+ 	vq->use_dma_api = vring_use_dma_api(vdev);
 -	vq->premapped = false;
 -	vq->do_unmap = vq->use_dma_api;
+ 
+ 	vq->indirect = virtio_has_feature(vdev, VIRTIO_RING_F_INDIRECT_DESC) &&
+ 		!context;
+ 	vq->event = virtio_has_feature(vdev, VIRTIO_RING_F_EVENT_IDX);
+ 
+ 	if (virtio_has_feature(vdev, VIRTIO_F_ORDER_PLATFORM))
+ 		vq->weak_barriers = false;
+ 
+ 	err = vring_alloc_state_extra_split(vring_split);
+ 	if (err) {
+ 		kfree(vq);
+ 		return NULL;
+ 	}
+ 
+ 	virtqueue_vring_init_split(vring_split, vq);
+ 
+ 	virtqueue_init(vq, vring_split->vring.num);
+ 	virtqueue_vring_attach_split(vq, vring_split);
+ 
+ 	spin_lock(&vdev->vqs_list_lock);
+ 	list_add_tail(&vq->vq.list, &vdev->vqs);
+ 	spin_unlock(&vdev->vqs_list_lock);
+ 	return &vq->vq;
+ }
+ 
  static struct virtqueue *vring_create_virtqueue_split(
  	unsigned int index,
  	unsigned int num,

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ