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: <20251013215036.GA866714@bhelgaas>
Date: Mon, 13 Oct 2025 16:50:36 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Hans Zhang <18255117159@....com>
Cc: lpieralisi@...nel.org, kwilczynski@...nel.org, bhelgaas@...gle.com,
	mani@...nel.org, robh@...nel.org, sashal@...nel.org,
	linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] pci: cadence-ep: Fix incorrect MSI capability ID

On Fri, Oct 10, 2025 at 10:43:07PM +0800, Hans Zhang wrote:
> In a previous change, the MSIX capability ID (PCI_CAP_ID_MSIX)
> was mistakenly used when trying to locate the MSI capability in
> cdns_pcie_ep_get_msi(). This is incorrect as the function handles
> MSI functionality, not MSIX.
> 
> Fix this by replacing PCI_CAP_ID_MSIX with the correct MSI capability
> ID(PCI_CAP_ID_MSI) when calling cdns_pcie_find_capability(). This
> ensures the MSI capability is properly located, allowing MSI functionality
> to work asintended.
> 
> Fixes: 907912c1daa7 ("PCI: cadence: Use cdns_pcie_find_*capability() to avoid hardcoding offsets")
> Reported-by: Sasha Levin <sashal@...nel.org>
> Closes: https://lore.kernel.org/r/aOfMk9BW8BH2P30V@laps/
> Signed-off-by: Hans Zhang <18255117159@....com>

Applied to pci/for-linus for v6.18, thanks!

> ---
> Dear Maintainer,
> 
> Since the previous patch mistakenly changed the MSI ID to MSIX ID,
> a patch is submitted here to fix it. Thank you very much, Sasha, for
> pointing it out.
> 
> Best regards,
> Hans
> ---
>  drivers/pci/controller/cadence/pcie-cadence-ep.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/controller/cadence/pcie-cadence-ep.c b/drivers/pci/controller/cadence/pcie-cadence-ep.c
> index 1eac012a8226..c0e1194a936b 100644
> --- a/drivers/pci/controller/cadence/pcie-cadence-ep.c
> +++ b/drivers/pci/controller/cadence/pcie-cadence-ep.c
> @@ -255,7 +255,7 @@ static int cdns_pcie_ep_get_msi(struct pci_epc *epc, u8 fn, u8 vfn)
>  	u16 flags, mme;
>  	u8 cap;
>  
> -	cap = cdns_pcie_find_capability(pcie, PCI_CAP_ID_MSIX);
> +	cap = cdns_pcie_find_capability(pcie, PCI_CAP_ID_MSI);
>  	fn = cdns_pcie_get_fn_from_vfn(pcie, fn, vfn);
>  
>  	/* Validate that the MSI feature is actually enabled. */
> -- 
> 2.34.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ