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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260109152430.512923-7-eperezma@redhat.com>
Date: Fri,  9 Jan 2026 16:24:24 +0100
From: Eugenio Pérez <eperezma@...hat.com>
To: "Michael S . Tsirkin " <mst@...hat.com>
Cc: linux-kernel@...r.kernel.org,
	virtualization@...ts.linux.dev,
	Maxime Coquelin <mcoqueli@...hat.com>,
	Laurent Vivier <lvivier@...hat.com>,
	Cindy Lu <lulu@...hat.com>,
	jasowang@...hat.com,
	Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
	Stefano Garzarella <sgarzare@...hat.com>,
	Yongji Xie <xieyongji@...edance.com>,
	Eugenio Pérez <eperezma@...hat.com>
Subject: [PATCH v11 06/12] vhost: forbid change vq groups ASID if DRIVER_OK is set

Only vdpa_sim support it.  Forbid this behavious as there is no use for
it right now, we can always enable it in the future with a feature flag.

Signed-off-by: Eugenio Pérez <eperezma@...hat.com>
---
 drivers/vhost/vdpa.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
index 9d25b735b43d..3f0184d42075 100644
--- a/drivers/vhost/vdpa.c
+++ b/drivers/vhost/vdpa.c
@@ -682,6 +682,8 @@ static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd,
 			return -EFAULT;
 		if (idx >= vdpa->ngroups || s.num >= vdpa->nas)
 			return -EINVAL;
+		if (ops->get_status(vdpa) & VIRTIO_CONFIG_S_DRIVER_OK)
+			return -EBUSY;
 		if (!ops->set_group_asid)
 			return -EOPNOTSUPP;
 		return ops->set_group_asid(vdpa, idx, s.num);
-- 
2.52.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ