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: <BN9PR11MB5276D7FAC258CFC02F75D0648CB32@BN9PR11MB5276.namprd11.prod.outlook.com>
Date: Fri, 2 Aug 2024 08:26:48 +0000
From: "Tian, Kevin" <kevin.tian@...el.com>
To: Jason Gunthorpe <jgg@...dia.com>, David Hildenbrand <david@...hat.com>
CC: Mostafa Saleh <smostafa@...gle.com>, John Hubbard <jhubbard@...dia.com>,
	Elliot Berman <quic_eberman@...cinc.com>, Andrew Morton
	<akpm@...ux-foundation.org>, Shuah Khan <shuah@...nel.org>, Matthew Wilcox
	<willy@...radead.org>, "maz@...nel.org" <maz@...nel.org>,
	"kvm@...r.kernel.org" <kvm@...r.kernel.org>, "linux-arm-msm@...r.kernel.org"
	<linux-arm-msm@...r.kernel.org>, "linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
	"pbonzini@...hat.com" <pbonzini@...hat.com>, Fuad Tabba <tabba@...gle.com>,
	"Xu, Yilun" <yilun.xu@...el.com>, "Qiang, Chenyi" <chenyi.qiang@...el.com>
Subject: RE: [PATCH RFC 0/5] mm/gup: Introduce exclusive GUP pinning

> From: Jason Gunthorpe <jgg@...dia.com>
> Sent: Thursday, June 20, 2024 10:34 PM
> 
> On Thu, Jun 20, 2024 at 04:14:23PM +0200, David Hildenbrand wrote:
> 
> > 1) How would the device be able to grab/access "private memory", if not
> >    via the user page tables?
> 
> The approaches I'm aware of require the secure world to own the IOMMU
> and generate the IOMMU page tables. So we will not use a GUP approach
> with VFIO today as the kernel will not have any reason to generate a
> page table in the first place. Instead we will say "this PCI device
> translates through the secure world" and walk away.
> 
> The page table population would have to be done through the KVM path.
> 

Sorry for noting this discussion late. Dave pointed it to me in a related
thread [1].

I had an impression that above approach fits some trusted IO arch (e.g.
TDX Connect which has a special secure I/O page table format and
requires sharing it between IOMMU/KVM) but not all.

e.g. SEV-TIO spec [2] (page 8) describes to have the IOMMU walk the
existing I/O page tables to get HPA and then verify it through a new
permission table (RMP) for access control.

That arch may better fit a scheme in which the I/O page tables are
still managed by VFIO/IOMMUFD and RMP is managed by KVM, with an
an extension to the MAP_DMA call to accept a [guest_memfd, offset]
pair to find out the pfn instead of using host virtual address.

looks the Linux MM alignment session [3] did mention "guest_memfd
will take ownership of the hugepages, and provide interested parties
(userspace, KVM, iommu) with pages to be used" to support that extension?

[1] https://lore.kernel.org/kvm/272e3dbf-ed4a-43f5-8b5f-56bf6d74930c@redhat.com/
[2] https://www.amd.com/system/files/documents/sev-tio-whitepaper.pdf
[3] https://lore.kernel.org/kvm/20240712232937.2861788-1-ackerleytng@google.com/

Thanks
Kevin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ