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: <20120329163206.GA3480@burratino>
Date:	Thu, 29 Mar 2012 11:32:06 -0500
From:	Jonathan Nieder <jrnieder@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Matthew Garrett <mjg@...hat.com>, bhelgaas@...gle.com,
	linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
	stable@...r.kernel.org, Romain Francoise <romain@...bokech.com>,
	Chris Holland <bandidoirlandes@...il.com>,
	Colin Ian King <colin.king@...onical.com>,
	Hatem Masmoudi <hatem.masmoudi@...il.com>,
	janek <jan0x6c@...il.com>
Subject: [PATCH resend] ASPM: Fix pcie devices with non-pcie children

From: Matthew Garrett <mjg@...hat.com>
Date: Tue, 27 Mar 2012 10:17:41 -0400

Since 3.2.12 and 3.3, some systems are failing to boot with a BUG_ON.
Some other systems using the pata_jmicron driver fail to boot because
no disks are detected.  Passing pcie_aspm=force on the kernel command
line works around it.

The cause: commit 4949be16822e ("PCI: ignore pre-1.1 ASPM quirking
when ASPM is disabled") changed the behaviour of
pcie_aspm_sanity_check() to always return 0 if aspm is disabled, in
order to avoid cases where we changed ASPM state on pre-PCIe 1.1
devices.  This skipped the secondary function of
pcie_aspm_sanity_check which was to avoid us enabling ASPM on devices
that had non-PCIe children, causing trouble later on.  Move the
aspm_disabled check so we continue to honour that scenario.

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=42979 and
          http://bugs.debian.org/665420

[jn: with more symptoms in log message]

Reported-by: Romain Francoise <romain@...bokech.com> # kernel panic
Reported-by: Chris Holland <bandidoirlandes@...il.com> # disk detection trouble
Signed-off-by: Matthew Garrett <mjg@...hat.com>
Cc: stable@...r.kernel.org
Tested-by: Hatem Masmoudi <hatem.masmoudi@...il.com> # Dell Latitude E5520
Tested-by: janek <jan0x6c@...il.com> # pata_jmicron with JMB362/JMB363
Signed-off-by: Jonathan Nieder <jrnieder@...il.com>
---
Hi Andrew,

This patch only appeared a couple of days ago[1], but it fixes a
noticeable regression so I would like to make sure the patch becomes
part of mainline and the 3.2.y- and 3.3.y-stable trees soon.  Could
you pick it up for linux-next until it makes its way to the PCI tree?

Regression was introduced between 3.3-rc7 and 3.3 and between 3.2.11
and 3.2.12.  Prevents boot on affected machines, though there is a
workaround.  Details about the symptoms and fix are above.

Thanks,
Jonathan

[1] http://thread.gmane.org/gmane.linux.kernel.pci/14503

 drivers/pci/pcie/aspm.c |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index 4bdef24cd412..b500840a143b 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -508,9 +508,6 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev)
 	int pos;
 	u32 reg32;
 
-	if (aspm_disabled)
-		return 0;
-
 	/*
 	 * Some functions in a slot might not all be PCIe functions,
 	 * very strange. Disable ASPM for the whole slot
@@ -519,6 +516,16 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev)
 		pos = pci_pcie_cap(child);
 		if (!pos)
 			return -EINVAL;
+
+		/*
+		 * If ASPM is disabled then we're not going to change
+		 * the BIOS state. It's safe to continue even if it's a
+		 * pre-1.1 device
+		 */
+
+		if (aspm_disabled)
+			continue;
+
 		/*
 		 * Disable ASPM for pre-1.1 PCIe device, we follow MS to use
 		 * RBER bit to determine if a function is 1.1 version device
-- 
1.7.10.rc1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ