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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250916150532.GA1797586@bhelgaas>
Date: Tue, 16 Sep 2025 10:05:32 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: ALOK TIWARI <alok.a.tiwari@...cle.com>
Cc: Devendra K Verma <devendra.verma@....com>, bhelgaas@...gle.com,
	mani@...nel.org, vkoul@...nel.org, dmaengine@...r.kernel.org,
	linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
	michal.simek@....com
Subject: Re: [External] : [PATCH v2 1/2] dmaengine: dw-edma: Add AMD MDB
 Endpoint Support

On Tue, Sep 16, 2025 at 04:25:49PM +0530, ALOK TIWARI wrote:
> 
> 
> On 9/16/2025 4:13 PM, Devendra K Verma wrote:
> > +	/*
> > +	 * Synopsys and AMD (Xilinx) use the same VSEC ID for the purpose
> > +	 * of map, channel counts, etc.
> > +	 */
> > +	if (vendor != PCI_VENDOR_ID_SYNOPSYS ||
> > +	    vendor != PCI_VENDOR_ID_XILINX)
> > +		return;
> 
> if, vendor == PCI_VENDOR_ID_XILINX condition will true
> 
> should not be if (vendor != PCI_VENDOR_ID_SYNOPSYS && vendor !=
> PCI_VENDOR_ID_XILINX) ?

Good catch, I mistakenly said this part was correct, but you're right;
it's obviously broken.

The alternate structure I suggested would avoid this problem.

> > +
> > +	cap = DW_PCIE_VSEC_DMA_ID;
> > +	if (vendor == PCI_VENDOR_ID_XILINX)
> > +		cap = DW_PCIE_XILINX_MDB_VSEC_ID;
> > +
> > +	vsec = pci_find_vsec_capability(pdev, vendor, cap);
> >   	if (!vsec)
> 
> 
> Thanks,
> Alok

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ