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] [day] [month] [year] [list]
Message-ID: <20241003133658.GC2456194@ziepe.ca>
Date: Thu, 3 Oct 2024 10:36:58 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: James Gowans <jgowans@...zon.com>
Cc: linux-kernel@...r.kernel.org, Kevin Tian <kevin.tian@...el.com>,
	Joerg Roedel <joro@...tes.org>,
	Krzysztof WilczyƄski <kw@...ux.com>,
	Will Deacon <will@...nel.org>, Robin Murphy <robin.murphy@....com>,
	Mike Rapoport <rppt@...nel.org>,
	"Madhavan T. Venkataraman" <madvenka@...ux.microsoft.com>,
	iommu@...ts.linux.dev, Sean Christopherson <seanjc@...gle.com>,
	Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org,
	David Woodhouse <dwmw2@...radead.org>,
	Lu Baolu <baolu.lu@...ux.intel.com>,
	Alexander Graf <graf@...zon.de>, anthony.yznaga@...cle.com,
	steven.sistare@...cle.com, nh-open-source@...zon.com,
	"Saenz Julienne, Nicolas" <nsaenz@...zon.es>
Subject: Re: [RFC PATCH 12/13] iommufd, guestmemfs: Ensure persistent file
 used for persistent DMA

On Mon, Sep 16, 2024 at 01:31:01PM +0200, James Gowans wrote:

> +#ifdef CONFIG_GUESTMEMFS_FS
> +		struct vm_area_struct *vma;
> +		struct mm_struct *mm = current->mm;
> +
> +		mmap_read_lock(mm);
> +		vma = find_vma_intersection(current->mm,
> +				 cmd->user_va, cmd->user_va + cmd->length);
> +		if (!vma || !is_guestmemfs_file(vma->vm_file)) {
> +			mmap_read_unlock(mm);
> +			return -EFAULT;
> +		}
> +		mmap_read_unlock(mm);
> +#else

Any kind of FD interaction needs to go through the new FD path that
Steve is building:

https://lore.kernel.org/linux-iommu/1727190338-385692-1-git-send-email-steven.sistare@oracle.com

I'm expecting multiple kinds of fds to fall into that pattern,
including memfs, guestmemfd, and dmabuf. guestmemfd can just be one
more..

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ