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: <hwtjbhqeckzicoqfd5go25ag7kpubjaosvhufx7qc6jtfnwkof@x3vb274rtpwq>
Date: Thu, 12 Jun 2025 21:56:14 +0530
From: Manivannan Sadhasivam <mani@...nel.org>
To: Frank Li <Frank.li@....com>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>, Rob Herring <robh@...nel.org>, 
	Saravana Kannan <saravanak@...gle.com>, Jingoo Han <jingoohan1@...il.com>, 
	Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>, Lorenzo Pieralisi <lpieralisi@...nel.org>, 
	Krzysztof Wilczyński <kw@...ux.com>, Richard Zhu <hongxing.zhu@....com>, 
	Lucas Stach <l.stach@...gutronix.de>, Shawn Guo <shawnguo@...nel.org>, 
	Sascha Hauer <s.hauer@...gutronix.de>, Pengutronix Kernel Team <kernel@...gutronix.de>, 
	Fabio Estevam <festevam@...il.com>, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, 
	linux-pci@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, imx@...ts.linux.dev, 
	Niklas Cassel <cassel@...nel.org>
Subject: Re: [PATCH v11 10/11] PCI: dwc: Print warning message when
 cpu_addr_fixup() exists

On Thu, Jun 12, 2025 at 12:19:04PM -0400, Frank Li wrote:
> On Thu, Jun 12, 2025 at 09:38:32PM +0530, Manivannan Sadhasivam wrote:
> > On Thu, Jun 12, 2025 at 11:51:56AM -0400, Frank Li wrote:
> > > On Thu, Jun 12, 2025 at 08:16:03PM +0530, Manivannan Sadhasivam wrote:
> > > > On Thu, Mar 13, 2025 at 11:38:46AM -0400, Frank Li wrote:
> > > > > If the parent 'ranges' property in DT correctly describes the address
> > > > > translation, the cpu_addr_fixup() callback is not needed. Print a warning
> > > > > message to inform users to correct their DTB files and prepare to remove
> > > > > cpu_addr_fixup().
> > > > >
> > > >
> > > > This patch seem to have dropped, but I do see a value in printing the warning to
> > > > encourage developers/users to fix the DTB in some way. Since we fixed the driver
> > > > to parse the DT 'ranges' properly, the presence of cpu_addr_fixup() callback
> > > > indicates that the translation is not properly described in DT. So DT has to be
> > > > fixed.
> > >
> > > This patch already in mainline with Bjorn's fine tuned at when merge.
> > >
> > > 	fixup = pci->ops ? pci->ops->cpu_addr_fixup : NULL;
> > >         if (fixup) {
> > >                 fixup_addr = fixup(pci, cpu_phys_addr);
> > >                 if (reg_addr == fixup_addr) {
> > >                         dev_info(dev, "%s reg[%d] %#010llx == %#010llx == fixup(cpu %#010llx); %ps is redundant with this devicetree\n",
> > >                                  reg_name, index, reg_addr, fixup_addr,
> > >                                  (unsigned long long) cpu_phys_addr, fixup);
> > >                 } else {
> > >                         dev_warn(dev, "%s reg[%d] %#010llx != %#010llx == fixup(cpu %#010llx); devicetree is broken\n",
> > >                                  reg_name, index, reg_addr, fixup_addr,
> > >                                  (unsigned long long) cpu_phys_addr);
> > >                         reg_addr = fixup_addr;
> > >                 }
> > >
> > >                 return cpu_phys_addr - reg_addr;
> > >         }
> > >
> > > I have not seen this "dev_warn(pci->dev, "cpu_addr_fixup() usage detected. Please fix your DTB!\n");"
> > >
> >
> > This patch is supposed to add this warning and nothing else.
> 
> We can forget this one. Can help check doorbell patch if you have time
> 
> https://lore.kernel.org/imx/202506101649.UpwblcVd-lkp@intel.com/T/#t
> 

I'm going through the queue. Will get to it.

- Mani

-- 
மணிவண்ணன் சதாசிவம்

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ