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: <20260112065928-mutt-send-email-mst@kernel.org>
Date: Mon, 12 Jan 2026 07:00:41 -0500
From: "Michael S. Tsirkin" <mst@...hat.com>
To: Eugenio Perez Martin <eperezma@...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>
Subject: Re: [PATCH v11 11/12] vduse: add vq group asid support

On Mon, Jan 12, 2026 at 12:56:34PM +0100, Eugenio Perez Martin wrote:
> > > @@ -439,11 +453,14 @@ static __poll_t vduse_dev_poll(struct file *file, poll_table *wait)
> > >  static void vduse_dev_reset(struct vduse_dev *dev)
> > >  {
> > >       int i;
> > > -     struct vduse_iova_domain *domain = dev->domain;
> > >
> > >       /* The coherent mappings are handled in vduse_dev_free_coherent() */
> > > -     if (domain && domain->bounce_map)
> > > -             vduse_domain_reset_bounce_map(domain);
> > > +     for (i = 0; i < dev->nas; i++) {
> > > +             struct vduse_iova_domain *domain = dev->as[i].domain;
> >
> > I do not understand the locking here an in many other places.
> > dev->as is dereferenced here apparently outside as_lock?
> >
> 
> The virtqueue groups' "as_lock" member protects the virtqueue groups'
> "as" pointer. But we're not accessing any vq groups "as" member here,
> we're accessing the dev->as[i].domain pointer here, which doesn't
> change in all the lifetime of the device.

Ah. got it. maybe a comment near the field definition will help.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ