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: <66572BFA-4501-4087-8B2D-83DB30247CFC@goldelico.com>
Date: Tue, 8 Oct 2024 10:08:27 +0200
From: "H. Nikolaus Schaller" <hns@...delico.com>
To: Jason Gunthorpe <jgg@...dia.com>
Cc: Robin Murphy <robin.murphy@....com>,
 Laurent Pinchart <laurent.pinchart@...asonboard.com>,
 "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
 Christoph Hellwig <hch@....de>,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 Lu Baolu <baolu.lu@...ux.intel.com>,
 Jerry Snitselaar <jsnitsel@...hat.com>,
 Joerg Roedel <jroedel@...e.de>,
 tony Lindgren <tony@...mide.com>,
 Andreas Kemnade <andreas@...nade.info>,
 Linux-OMAP <linux-omap@...r.kernel.org>,
 Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
 linux-media@...r.kernel.org
Subject: Re: BUG: "iommu: Retire bus ops" breaks omap-iommu and omap3isp

Hi Jason,

> Am 07.10.2024 um 14:15 schrieb Jason Gunthorpe <jgg@...dia.com>:
> 
> On Sun, Oct 06, 2024 at 09:40:00AM +0200, H. Nikolaus Schaller wrote:
>> Hi,
>> 
>> I found that the camera on our OMAP3 based system (GTA04) stopped working with v6.8-rc1.
>> There was no bug in the camera driver but the OMAP3 ISP (image signal processor) emits
>> 
>> [   14.963684] omap3isp 480bc000.isp: failed to create ARM IOMMU mapping
>> [   15.010192] omap3isp 480bc000.isp: unable to attach to IOMMU
>> [   15.023376] omap3isp 480bc000.isp: isp_xclk_set_rate: cam_xclka set to 24685714 Hz (div 7)
>> [   15.065399] omap3isp: probe of 480bc000.isp failed with error -12
>> 
>> Deeper analyses lead to this patch breaking operation. It is not fixed up to v6.12-rc1.
>> 
>> What seems to happen (in 6.8-rc1 code):
>> 
>> - omap_iommu_probe() passes &omap_iommu_ops to iommu_device_register()
>> - iommu_device_register() stores the ops in iommu->ops (only)
>> - __iommu_probe_device tries to read the ops from some fw_spec but not iommu->ops
> 
> Maybe like this?
> 
> @@ -1233,6 +1233,12 @@ static int omap_iommu_probe(struct platform_device *pdev)
>               err = iommu_device_register(&obj->iommu, &omap_iommu_ops, &pdev->dev);
>               if (err)
>                       goto out_sysfs;
> +               /*
> +                * omap has a DT reprensetation but can't use the common DT
> +                * code. Setting fwnode to NULL causes probe to be called for
> +                * every device.
> +                */
> +               obj->iommu.fwnode = NULL;
>               obj->has_iommu_driver = true;
>       }

Doesn't seem to solve the problems:

root@...ux:~# uname -a
Linux letux 6.8.0-rc1-letux+ #19506 SMP PREEMPT Tue Oct  8 08:48:26 CEST 2024 armv7l GNU/Linux
root@...ux:~# dmesg|fgrep iommu
[    0.402862] iommu: Default domain type: Translated
[    0.402893] iommu: DMA domain TLB invalidation policy: strict mode
[    0.405303] omap-iommu 480bd400.mmu: 480bd400.mmu registered
[    0.405944] platform 480bc000.isp: Adding to iommu group 0
[   24.829071] omap3isp 480bc000.isp: iommu configuration for device failed with -ETIMEDOUT
[   24.880920] omap-iommu 480bd400.mmu: 480bd400.mmu: version 1.1
root@...ux:~# dmesg|fgrep isp
[    0.000000] OMAP3630/DM3730 ES1.2 (l2cache iva sgx neon isp 192mhz_clk)
[    0.405944] platform 480bc000.isp: Adding to iommu group 0
[   12.349334] omapdss_dss 48050000.dss: bound 48050400.dispc (ops dsi_vc_flush_receive_data [omapdrm])
[   24.821441] omap3isp 480bc000.isp: deferred probe timeout, ignoring dependency
[   24.829071] omap3isp 480bc000.isp: iommu configuration for device failed with -ETIMEDOUT
[   24.887329] omap3isp 480bc000.isp: supply vdd-csiphy1 not found, using dummy regulator
[   24.928680] omap3isp 480bc000.isp: supply vdd-csiphy2 not found, using dummy regulator
[   24.951904] omap3isp 480bc000.isp: Revision 15.0 found
[   24.958160] omap3isp 480bc000.isp: failed to attach device to VA mapping
[   24.994232] omap3isp 480bc000.isp: unable to attach to IOMMU
[   25.013671] omap3isp: probe of 480bc000.isp failed with error -16
root@...ux:~#

I'll dig deeper.

BR and thanks,
Nikolaus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ