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: <20250307151949.7rmxl22euubnzzpj@uda0492258>
Date: Fri, 7 Mar 2025 20:49:49 +0530
From: Siddharth Vadapalli <s-vadapalli@...com>
To: Chen Wang <unicorn_wang@...look.com>
CC: Siddharth Vadapalli <s-vadapalli@...com>,
        Manivannan Sadhasivam
	<manivannan.sadhasivam@...aro.org>,
        Chen Wang <unicornxw@...il.com>, <lpieralisi@...nel.org>,
        <kw@...ux.com>, <robh@...nel.org>, <bhelgaas@...gle.com>,
        <thomas.richard@...tlin.com>, <bwawrzyn@...co.com>,
        <wojciech.jasko-EXT@...tinental-corporation.com>, <kishon@...nel.org>,
        <linux-pci@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <sophgo@...ts.linux.dev>
Subject: Re: [PATCH] PCI: cadence: Fix NULL pointer error for ops

On Fri, Mar 07, 2025 at 10:44:10PM +0800, Chen Wang wrote:
> 
> On 2025/3/7 21:47, Siddharth Vadapalli wrote:
> > On Fri, Mar 07, 2025 at 09:07:35PM +0800, Chen Wang wrote:
> > > Hello~
> > > 
> > > Any comment on this? Or can we have this bugfix patch picked for coming
> > > v6.15?
> > Is there a driver in Linux which is affected by the issue that you are
> > trying to fix in this patch? Please point to the driver since I don't
> > see such a driver.
> > 
> > Regards,
> > Siddharth.
> 
> Oh, sorry I didn't explain the change history clearly. I am developing a
> PCIe driver for a new soc (SG2042), and this PCIe controller uses cadence's
> IP. In the code, I found that if I don't assign a value to cdns_pcie.ops, it
> will crash during operation. At first, I didn't fix the bug in the cadence
> code, but used a workaround in the SG2042 driver. Later in the code review,
> Manivannan pointed out my problem and hoped that I would submit a patch to
> fix this problem in the cadence driver.
> 
> Adding Manivannan who should know about this.
> 
> Please take a look at this: https://lore.kernel.org/linux-riscv/20250119122353.v3tzitthmu5tu3dg@thinkpad/.
> For your convenience, I have excerpted some of the text below.
> 
> ```
> 
> > +static struct pci_ops sg2042_pcie_host_ops = {
> > +    .map_bus    = cdns_pci_map_bus,
> > +    .read        = sg2042_pcie_config_read,
> > +    .write        = sg2042_pcie_config_write,
> > +};
> > +
> > +/* Dummy ops which will be assigned to cdns_pcie.ops, which must be
> !NULL. */
> 
> Because cadence code driver doesn't check for !ops? Please fix it instead.
> And
> the fix is trivial.

Thank you for providing the context for this patch. Maybe the context
should go into the commit message, but that's not a reason to block this
patch, so:

Reviewed-by: Siddharth Vadapalli <s-vadapalli@...com>

Regards,
Siddharth.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ