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: <20080117233355.GA13590@linux-os.sc.intel.com>
Date:	Thu, 17 Jan 2008 15:33:55 -0800
From:	Venki Pallipadi <venkatesh.pallipadi@...el.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	"Pallipadi, Venkatesh" <venkatesh.pallipadi@...el.com>,
	balbir@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
	Linux ACPI mailing list <linux-acpi@...r.kernel.org>,
	Intel E/100 mailing list <e1000-devel@...ts.sourceforge.net>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: 2.6.24-rc8-mm1

On Thu, Jan 17, 2008 at 11:40:32AM -0800, Andrew Morton wrote:
> On Thu, 17 Jan 2008 11:22:19 -0800 "Pallipadi, Venkatesh" <venkatesh.pallipadi@...el.com> wrote:
> 
> >  
> > The problem is
> > >> modprobe:2584 conflicting cache attribute 50000000-50001000
> > >> uncached<->default
> > 
> > Some address range here is being mapped with conflicting types.
> > Somewhere the range was mapped with default (write-back). Later
> > pci_iomap() is mapping that region as uncacheable which is basically
> > aliasing. PAT code detects the aliasing and fails the second uncacheable
> > request which leads in the failure.
> 
> It sounds to me like you need considerably more runtime debugging and
> reporting support in that code.  Ensure that it generates enough output
> both during regular operation and during failures for you to be able to
> diagnose things in a single iteration.
> 
> We can always take it out later.
> 
> 

Patch below makes the interesting printks from PAT non DEBUG.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@...el.com>

Index: linux-2.6.git/arch/x86/mm/ioremap.c
===================================================================
--- linux-2.6.git.orig/arch/x86/mm/ioremap.c	2008-01-17 03:18:59.000000000 -0800
+++ linux-2.6.git/arch/x86/mm/ioremap.c	2008-01-17 08:11:51.000000000 -0800
@@ -25,10 +25,13 @@
  */
 void __iomem *ioremap_wc(unsigned long phys_addr, unsigned long size)
 {
-	if (pat_wc_enabled)
+	if (pat_wc_enabled) {
+		printk(KERN_INFO "ioremap_wc: addr %lx, size %lx\n",
+		       phys_addr, size);
 		return __ioremap(phys_addr, size, _PAGE_WC);
-	else
+	} else {
 		return ioremap_nocache(phys_addr, size);
+	}
 }
 EXPORT_SYMBOL(ioremap_wc);
 
Index: linux-2.6.git/arch/x86/mm/ioremap_32.c
===================================================================
--- linux-2.6.git.orig/arch/x86/mm/ioremap_32.c	2008-01-17 03:18:59.000000000 -0800
+++ linux-2.6.git/arch/x86/mm/ioremap_32.c	2008-01-17 08:10:58.000000000 -0800
@@ -164,6 +164,8 @@
 
 void __iomem *ioremap_nocache (unsigned long phys_addr, unsigned long size)
 {
+	printk(KERN_INFO "ioremap_nocache: addr %lx, size %lx\n",
+	       phys_addr, size);
 	return __ioremap(phys_addr, size, _PAGE_UC);
 }
 EXPORT_SYMBOL(ioremap_nocache);
Index: linux-2.6.git/arch/x86/mm/ioremap_64.c
===================================================================
--- linux-2.6.git.orig/arch/x86/mm/ioremap_64.c	2008-01-17 03:18:59.000000000 -0800
+++ linux-2.6.git/arch/x86/mm/ioremap_64.c	2008-01-17 08:10:13.000000000 -0800
@@ -144,7 +144,7 @@
 
 void __iomem *ioremap_nocache (unsigned long phys_addr, unsigned long size)
 {
-	printk(KERN_DEBUG "ioremap_nocache: addr %lx, size %lx\n",
+	printk(KERN_INFO "ioremap_nocache: addr %lx, size %lx\n",
 	       phys_addr, size);
 	return __ioremap(phys_addr, size, _PAGE_UC);
 }
Index: linux-2.6.git/arch/x86/mm/pat.c
===================================================================
--- linux-2.6.git.orig/arch/x86/mm/pat.c	2008-01-17 03:18:59.000000000 -0800
+++ linux-2.6.git/arch/x86/mm/pat.c	2008-01-17 08:06:23.000000000 -0800
@@ -170,7 +170,7 @@
 
 			if (!fattr && attr != ml->attr) {
 				printk(
-	KERN_DEBUG "%s:%d conflicting cache attribute %Lx-%Lx %s<->%s\n",
+	KERN_WARNING "%s:%d conflicting cache attribute %Lx-%Lx %s<->%s\n",
 					current->comm, current->pid,
 					start, end,
 					cattr_name(attr), cattr_name(ml->attr));
@@ -205,7 +205,7 @@
 	list_for_each_entry(ml, &mattr_list, nd) {
 		if (ml->start == start && ml->end == end) {
 			if (ml->attr != attr)
-				printk(KERN_DEBUG
+				printk(KERN_WARNING
 	"%s:%d conflicting cache attributes on free %Lx-%Lx %s<->%s\n",
 			current->comm, current->pid, start, end,
 			cattr_name(attr), cattr_name(ml->attr));
@@ -217,7 +217,7 @@
 	}
 	spin_unlock(&mattr_lock);
 	if (err)
-		printk(KERN_DEBUG "%s:%d freeing invalid mattr %Lx-%Lx %s\n",
+		printk(KERN_WARNING "%s:%d freeing invalid mattr %Lx-%Lx %s\n",
 			current->comm, current->pid,
 			start, end, cattr_name(attr));
 	return err;
Index: linux-2.6.git/include/asm-x86/io_32.h
===================================================================
--- linux-2.6.git.orig/include/asm-x86/io_32.h	2008-01-17 06:28:06.000000000 -0800
+++ linux-2.6.git/include/asm-x86/io_32.h	2008-01-17 08:09:30.000000000 -0800
@@ -113,6 +113,8 @@
 
 static inline void __iomem * ioremap(unsigned long offset, unsigned long size)
 {
+	printk(KERN_INFO "ioremap: addr %lx, size %lx\n",
+	       offset, size);
 	return __ioremap(offset, size, 0);
 }
 
Index: linux-2.6.git/include/asm-x86/io_64.h
===================================================================
--- linux-2.6.git.orig/include/asm-x86/io_64.h	2008-01-17 08:08:23.000000000 -0800
+++ linux-2.6.git/include/asm-x86/io_64.h	2008-01-17 08:08:44.000000000 -0800
@@ -154,7 +154,7 @@
 
 static inline void __iomem * ioremap (unsigned long offset, unsigned long size)
 {
-	printk(KERN_DEBUG "ioremap: addr %lx, size %lx\n",
+	printk(KERN_INFO "ioremap: addr %lx, size %lx\n",
 	       offset, size);
 	return __ioremap(offset, size, 0);
 }
--
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