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-next>] [day] [month] [year] [list]
Message-Id: <20211007194409.3641467-1-danielwa@cisco.com>
Date:   Thu,  7 Oct 2021 12:44:09 -0700
From:   Daniel Walker <danielwa@...co.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Suneel Garapati <sgarapati@...vell.com>,
        Chandrakala Chavva <cchavva@...vell.com>,
        Sunil Kovvuri Goutham <sgoutham@...vell.com>,
        Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH-RFC] drivers: pci: pcieport: Allow AER service only on root ports

From: Suneel Garapati <sgarapati@...vell.com>

Some AER interrupt capability registers may not be present on
non Root ports. Since there is no way to check presence of
ROOT_ERR_COMMAND and ROOT_ERR_STATUS registers. Allow AER
service only on root ports.
Otherwise AER interrupt message number is read incorrectly
causing MSIX vector registration to fail and fallback to legacy
unnecessarily.

Signed-off-by: Suneel Garapati <sgarapati@...vell.com>
Reviewed-by: Chandrakala Chavva <cchavva@...vell.com>
Reviewed-by: Sunil Kovvuri Goutham <sgoutham@...vell.com>
---
 drivers/pci/pcie/portdrv_core.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
index 3ee63968deaa..edc355971a32 100644
--- a/drivers/pci/pcie/portdrv_core.c
+++ b/drivers/pci/pcie/portdrv_core.c
@@ -221,7 +221,16 @@ static int get_port_device_capability(struct pci_dev *dev)
 	}
 
 #ifdef CONFIG_PCIEAER
+	/*
+	 * Some AER interrupt capability registers may not be present on
+	 * non Root ports. Since there is no way to check presence of
+	 * ROOT_ERR_COMMAND and ROOT_ERR_STATUS registers. Allow AER
+	 * service only on root ports. Refer PCIe rev5.0 spec v1.0 7.8.4.
+	 * Otherwise AER interrupt message number is read incorrectly
+	 * causing MSIX vector registration to fail and fallback to legacy.
+	 */
 	if (dev->aer_cap && pci_aer_available() &&
+	    pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT &&
 	    (pcie_ports_native || host->native_aer)) {
 		services |= PCIE_PORT_SERVICE_AER;
 
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ