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: <20251001154410.GD3024065@nvidia.com>
Date: Wed, 1 Oct 2025 12:44:10 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Sakari Ailus <sakari.ailus@....fi>
Cc: Hans Verkuil <hverkuil+cisco@...nel.org>, iommu@...ts.linux.dev,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	Linux Media Mailing List <linux-media@...r.kernel.org>,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	Sakari Ailus <sakari.ailus@...ux.intel.com>,
	Robin Murphy <robin.murphy@....com>
Subject: Re: [PATCH] iommu: __iommu_attach_group: check for non-NULL
 blocking_domain

On Wed, Oct 01, 2025 at 09:03:37AM +0300, Sakari Ailus wrote:
> Hi Hans, Jason,
> 
> On Mon, Sep 29, 2025 at 03:30:22PM +0200, Hans Verkuil wrote:
> > On 29/09/2025 15:02, Jason Gunthorpe wrote:
> > > On Mon, Sep 29, 2025 at 02:18:50PM +0200, Hans Verkuil wrote:
> > >> On 29/09/2025 14:07, Jason Gunthorpe wrote:
> > >>> On Mon, Sep 29, 2025 at 10:23:47AM +0200, Hans Verkuil wrote:
> > >>>
> > >>>> Since I am unfamiliar with the iommu core code, I am uncertain whether I am
> > >>>> just papering over a bug elsewhere, or whether this is really the correct solution.
> > >>>
> > >>> It is papering over something, group->domain is not supposed to be
> > >>> NULL at this point.. That probably means the iommu driver has not been
> > >>
> > >> It's group->blocking_domain that's NULL, not group->domain.
> > > 
> > > Er, I thought you were hitting a false positive on this:
> > > 
> > >   group->domain != group->blocking_domain
> > > 
> > > ie NULL != NULL
> > > 
> > > But I suppose the whole expression is checking for group->domain
> > > already.
> > > 
> > > All your patch does is entirely disable the safetly logic :\
> > > 
> > > What is isp_attach_iommu() trying to accomplish? It does
> > > arm_iommu_detach_device() and then arm_iommu_attach_device() ?
> > > 
> > > Why?
> > > 
> > > Is this trying to force a non-identity translation for ISP?
> 
> The omap3isp driver expects to use its own virtual address space for the
> ISP: the video buffers are mapped there as virtually contiguous (physically
> they can be whatever).

Sure, but where does it do the mapping? I didn't see an iommu_map or
any other iommu_* call in this driver.

I think it is using dma_map_* to do it - probably dma_map_sg though I
could not find it?

This is why I gave my remarks, if it is relying on the DMA API for
mapping then it should just rely on the DMA API to establish a paging
domain and not try to open code something like that.

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ