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: <Zxs3PYVLzmRfBf+/@Asurada-Nvidia>
Date: Thu, 24 Oct 2024 23:14:21 -0700
From: Nicolin Chen <nicolinc@...dia.com>
To: Alexey Kardashevskiy <aik@....com>
CC: <jgg@...dia.com>, <kevin.tian@...el.com>, <will@...nel.org>,
	<joro@...tes.org>, <suravee.suthikulpanit@....com>, <robin.murphy@....com>,
	<dwmw2@...radead.org>, <baolu.lu@...ux.intel.com>, <shuah@...nel.org>,
	<linux-kernel@...r.kernel.org>, <iommu@...ts.linux.dev>,
	<linux-arm-kernel@...ts.infradead.org>, <linux-kselftest@...r.kernel.org>,
	<eric.auger@...hat.com>, <jean-philippe@...aro.org>, <mdf@...nel.org>,
	<mshavit@...gle.com>, <shameerali.kolothum.thodi@...wei.com>,
	<smostafa@...gle.com>, <yi.l.liu@...el.com>, <zhangfei.gao@...aro.org>,
	<patches@...ts.linux.dev>
Subject: Re: [PATCH v4 00/14] iommufd: Add vIOMMU infrastructure (Part-2:
 vDEVICE)

On Fri, Oct 25, 2024 at 04:58:33PM +1100, Alexey Kardashevskiy wrote:
> > > > > Is there any real example of a .vdevice_alloc hook, besides the
> > > > > selftests? It is not in iommufd_viommu_p2-v4-with-rmr, hence the
> > > > > question. I am trying to sketch something with this new machinery and
> > > > > less guessing would be nice. Thanks,
> > > > 
> > > > No, I am actually dropping that one, and moving the vdevice struct
> > > > to the private header, as there seems to be no use case:
> > > 
> > > Why keep it then?
> > 
> > We need that structure to store per-vIOMMU virtual ID. Hiding it
> > in the core only means we need to provide another vIOMMU APIs for
> > drivers to look up the ID, v.s. exposing it for drivers to access
> > directly.
> 
> Sorry I lost you here. If we need it, then there should be an example of
> .vdevice_alloc() somewhere but you say they is not one. How do you test
> this, with just selftests? :) Thanks,

A vDEVICE object will be core-allocated and core-managed, while the
vdevice_alloc is for driver-allocated purpose for which there is no
use case (at least with this series). You can check the vdev ioctl
in this version that has two pathways to allocate a vDEVICE object.

A vdev_id is used to index viommu's xarray for a driver to convert
the id to a dev pointer via a vIOMMU API. Dropping .vdevice_alloc
just means the driver only lost its direct access.

Nicolin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ