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: <1216622999.838.1.camel@sli10-desk.sh.intel.com>
Date:	Mon, 21 Jul 2008 14:49:59 +0800
From:	Shaohua Li <shaohua.li@...el.com>
To:	Jack Howarth <howarth@...mo.msbb.uc.edu>
Cc:	Jesse Barnes <jbarnes@...tuousgeek.org>,
	Yinghai Lu <yhlu.kernel@...il.com>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86,pci: dmi check for mackpro 2.2 mmconf

On Sat, 2008-07-19 at 15:14 -0400, Jack Howarth wrote:
> On Sat, Jul 19, 2008 at 12:04:48PM -0700, Jesse Barnes wrote:
> > On Saturday, July 19, 2008 11:40 am Jack Howarth wrote:
> > > Jesse,
> > >     It seems that MacBook Pro users aren't the only ones suffering from
> > > PCIE_ASPM...
> > >
> > > http://groups.google.com/group/linux.kernel/browse_thread/thread/cc1b8b3ef6
> > >4e3257/dd4e427510bde7f0?lnk=raot
> > >
> > > I also discovered the pcie_noaspm kernel option from that thread which
> > > allows me to boot the kernels built with PCIE_ASPM support by disabling
> > > that feature.
> > 
> > Yeah, that's a good data point.  Thanks.  Sounds like there may also be some 
> > ACPI interaction going on...
> > 
> > Jesse
> 
> Jesse,
>    For what its worth, acpi=off alone is insufficent to inhibit the
> kernel freezes when PCIE aspm is in use.
As Jesse suggested, maybe we should blacklist all pcie pre-1.1 devices.
please try.

Thanks,
Shaohua
---
 drivers/pci/pcie/aspm.c  |   10 ++++++++++
 include/linux/pci_regs.h |    1 +
 2 files changed, 11 insertions(+)

Index: linux/drivers/pci/pcie/aspm.c
===================================================================
--- linux.orig/drivers/pci/pcie/aspm.c	2008-07-21 14:12:16.000000000 +0800
+++ linux/drivers/pci/pcie/aspm.c	2008-07-21 14:46:24.000000000 +0800
@@ -510,6 +510,7 @@ static int pcie_aspm_sanity_check(struct
 {
 	struct pci_dev *child_dev;
 	int child_pos;
+	u32 reg32;
 
 	/*
 	 * Some functions in a slot might not all be PCIE functions, very
@@ -519,6 +520,15 @@ static int pcie_aspm_sanity_check(struct
 		child_pos = pci_find_capability(child_dev, PCI_CAP_ID_EXP);
 		if (!child_pos)
 			return -EINVAL;
+
+		/*
+		 * 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
+		 */
+		pci_read_config_dword(child_dev, child_pos + PCI_EXP_DEVCAP,
+			&reg32);
+		if (!(reg32 & PCI_EXP_DEVCAP_RBER))
+			return -EINVAL;
 	}
 	return 0;
 }
Index: linux/include/linux/pci_regs.h
===================================================================
--- linux.orig/include/linux/pci_regs.h	2008-07-21 14:25:05.000000000 +0800
+++ linux/include/linux/pci_regs.h	2008-07-21 14:27:00.000000000 +0800
@@ -374,6 +374,7 @@
 #define  PCI_EXP_DEVCAP_ATN_BUT	0x1000	/* Attention Button Present */
 #define  PCI_EXP_DEVCAP_ATN_IND	0x2000	/* Attention Indicator Present */
 #define  PCI_EXP_DEVCAP_PWR_IND	0x4000	/* Power Indicator Present */
+#define  PCI_EXP_DEVCAP_RBER	0x8000	/* Role-Based Error Reporting */
 #define  PCI_EXP_DEVCAP_PWR_VAL	0x3fc0000 /* Slot Power Limit Value */
 #define  PCI_EXP_DEVCAP_PWR_SCL	0xc000000 /* Slot Power Limit Scale */
 #define PCI_EXP_DEVCTL		8	/* Device Control */


--
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