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: <20080118135830.7a04a806.akpm@linux-foundation.org>
Date:	Fri, 18 Jan 2008 13:58:30 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Yinghai Lu <Yinghai.Lu@....COM>
Cc:	mingo@...e.hu, hpa@...or.com, tglx@...utronix.de, jeff@...zik.org,
	greg@...ah.com, hancockr@...w.ca, ak@...e.de,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] x86: MMCONF enable MCFG early

On Wed, 16 Jan 2008 14:09:02 -0800
Yinghai Lu <Yinghai.Lu@....COM> wrote:

> [PATCH] x86: MMCONF enable MCFG early
> 
> patch
> 	x86: validate against ACPI motherboard resources
> 
> changed the mmconf init sequence, and init MMCONF late in acpi_init.
> 
> here change it back to old sequence
> 1. check hostbridge in early
> 2. check MCFG with e820 in early
> 3. if all fail, will check MCFg with acpi _CRS in acpi_init
> 
> So we can make MCONF working again when acpi=off is set if hostbridge support that.
> 
> ...
>
> +		printk(KERN_NOTICE "PCI: MCFG configuration %d: base %lx "
>  		       "segment %hu buses %u - %u\n",
>  		       i, (unsigned long)cfg->address, cfg->pci_segment,
>  		       (unsigned int)cfg->start_bus_number,
>  		       (unsigned int)cfg->end_bus_number);
> +
> +		if (!early)
>  		if (is_acpi_reserved(cfg->address, cfg->address + size - 1)) {
>  			printk(KERN_NOTICE "PCI: MCFG area at %Lx reserved "
>  			       "in ACPI motherboard resources\n",
>  			       cfg->address);
> -		} else {
> +			valid = 1;
> +		}

grumble.  Please don't mess up the kernel source like that.

> -void __init pci_mmcfg_late_init(void)
> +void __init __pci_mmcfg_init(int type, int early)
>  {
> -	int known_bridge = 0;
> -
>  	/* MMCONFIG disabled */
>  	if ((pci_probe & PCI_PROBE_MMCONF) == 0)
>  		return;
>  
>  	/* MMCONFIG already enabled */
> +	if (!early)
>  	if (!(pci_probe & PCI_PROBE_MASK & ~PCI_PROBE_MMCONF))
>  		return;
>  

and that.  Do it properly.

--- a/arch/x86/pci/mmconfig-shared.c~x86-mmconf-enable-mcfg-early-cleanup
+++ a/arch/x86/pci/mmconfig-shared.c
@@ -308,8 +308,8 @@ static void __init pci_mmcfg_reject_brok
 		       (unsigned int)cfg->start_bus_number,
 		       (unsigned int)cfg->end_bus_number);
 
-		if (!early)
-		if (is_acpi_reserved(cfg->address, cfg->address + size - 1)) {
+		if (!early &&
+		    is_acpi_reserved(cfg->address, cfg->address + size - 1)) {
 			printk(KERN_NOTICE "PCI: MCFG area at %Lx reserved "
 			       "in ACPI motherboard resources\n",
 			       cfg->address);
@@ -357,8 +357,7 @@ void __init __pci_mmcfg_init(int type, i
 		return;
 
 	/* MMCONFIG already enabled */
-	if (!early)
-	if (!(pci_probe & PCI_PROBE_MASK & ~PCI_PROBE_MMCONF))
+	if (!early && !(pci_probe & PCI_PROBE_MASK & ~PCI_PROBE_MMCONF))
 		return;
 
 	/* for late to exit */
_

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