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-next>] [day] [month] [year] [list]
Date:	Fri, 28 Mar 2008 12:25:07 +0100
From:	Pavel Machek <pavel@....cz>
To:	Andi Kleen <andi@...stfloor.org>, Ingo Molnar <mingo@...e.hu>,
	kernel list <linux-kernel@...r.kernel.org>
Subject: agpgart: when telling user you'll corrupt his data, at least do it
	at KERN_CRIT


IOMMU off means very bad stuff may happen, like data corruption on
your hard drives. At least tells users this is serious...

Plus, agp_amd64_init should go into .h file.

Signed-off-by: Pavel Machek <pavel@...e.cz>

diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
index faf3229..19e4f74 100644
--- a/arch/x86/kernel/pci-gart_64.c
+++ b/arch/x86/kernel/pci-gart_64.c
@@ -615,13 +615,11 @@ static __init int init_k8_gatt(struct ag
 
  nommu:
 	/* Should not happen anymore */
-	printk(KERN_ERR "PCI-DMA: More than 4GB of RAM and no IOMMU\n"
-	       KERN_ERR "PCI-DMA: 32bit PCI IO may malfunction.\n");
+	printk(KERN_CRIT "PCI-DMA: More than 4GB of RAM and no IOMMU\n"
+	       KERN_CRIT "PCI-DMA: 32bit PCI IO may malfunction.\n");
 	return -1;
 }
 
-extern int agp_amd64_init(void);
-
 static const struct dma_mapping_ops gart_dma_ops = {
 	.mapping_error			= NULL,
 	.map_single			= gart_map_single,
@@ -692,9 +690,9 @@ #endif
 	    !gart_iommu_aperture ||
 	    (no_agp && init_k8_gatt(&info) < 0)) {
 		if (end_pfn > MAX_DMA32_PFN) {
-			printk(KERN_ERR "WARNING more than 4GB of memory "
-					"but GART IOMMU not available.\n"
-			       KERN_ERR "WARNING 32bit PCI may malfunction.\n");
+			printk(KERN_CRIT "More than 4GB of memory "
+			       	          "but GART IOMMU not available.\n"
+			       KERN_CRIT "32bit PCI may malfunction.\n");
 		}
 		return;
 	}
diff --git a/include/asm-x86/agp.h b/include/asm-x86/agp.h
index e4004a9..657c25b 100644
--- a/include/asm-x86/agp.h
+++ b/include/asm-x86/agp.h
@@ -32,4 +32,7 @@ #define alloc_gatt_pages(order)		\
 #define free_gatt_pages(table, order)	\
 	free_pages((unsigned long)(table), (order))
 
+/* Only available in certain configs */
+extern int agp_amd64_init(void);
+
 #endif

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
pomozte zachranit klanovicky les:  http://www.ujezdskystrom.info/
--
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