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: <alpine.LFD.1.00.0802212124231.7583@apollo.tec.linutronix.de>
Date:	Thu, 21 Feb 2008 21:26:56 +0100 (CET)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Diego Calleja <diegocg@...il.com>
cc:	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org
Subject: Re: BUG?: "Cannot map mmconfig aperture"

On Thu, 21 Feb 2008, Diego Calleja wrote:
> > Hmm, that's confusing. Can you please provide a complete boot log ?
> > 
> > Thanks,
> 
> Sure

Thanks. Nothing new there. Can you please apply the patch below and
provide the output of the ioremap code ?

Thanks,

	tglx

Index: linux-2.6/arch/x86/mm/ioremap.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/ioremap.c
+++ linux-2.6/arch/x86/mm/ioremap.c
@@ -112,6 +112,7 @@ static void __iomem *__ioremap(unsigned 
 	unsigned long pfn, offset, last_addr, vaddr;
 	struct vm_struct *area;
 	pgprot_t prot;
+	int err;
 
 	/* Don't allow wraparound or zero size */
 	last_addr = phys_addr + size - 1;
@@ -130,8 +131,11 @@ static void __iomem *__ioremap(unsigned 
 	for (pfn = phys_addr >> PAGE_SHIFT; pfn < max_pfn_mapped &&
 	     (pfn << PAGE_SHIFT) < last_addr; pfn++) {
 		if (page_is_ram(pfn) && pfn_valid(pfn) &&
-		    !PageReserved(pfn_to_page(pfn)))
+		    !PageReserved(pfn_to_page(pfn))) {
+			printk(KERN_INFO "ioremap: (RAM) %lx %lu\n", phys_addr,
+			       size);
 			return NULL;
+		}
 	}
 
 	WARN_ON_ONCE(page_is_ram(pfn));
@@ -157,16 +161,23 @@ static void __iomem *__ioremap(unsigned 
 	 * Ok, go for it..
 	 */
 	area = get_vm_area(size, VM_IOREMAP);
-	if (!area)
+	if (!area) {
+		printk(KERN_INFO "ioremap: !area PR %lx %lu\n", phys_addr,
+		       size);
 		return NULL;
+	}
 	area->phys_addr = phys_addr;
 	vaddr = (unsigned long) area->addr;
 	if (ioremap_page_range(vaddr, vaddr + size, phys_addr, prot)) {
 		remove_vm_area((void *)(vaddr & PAGE_MASK));
+		printk(KERN_INFO "ioremap: IPR %lx %lu\n", phys_addr, size);
 		return NULL;
 	}
 
-	if (ioremap_change_attr(vaddr, size, mode) < 0) {
+	err = ioremap_change_attr(vaddr, size, mode);
+	if (err < 0) {
+		printk(KERN_INFO "ioremap: CPA %lx %lu %d\n", phys_addr, size,
+		       err);
 		vunmap(area->addr);
 		return NULL;
 	}
--
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