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: <20090213145517.GD13000@alberich.amd.com>
Date:	Fri, 13 Feb 2009 15:55:17 +0100
From:	Andreas Herrmann <andreas.herrmann3@....com>
To:	Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>
CC:	linux-kernel@...r.kernel.org
Subject: [PATCH 4/7] x86: memtest: adapt log messages

Adapt log messages to

* print test pattern instead of pattern number,
* correct format for output on 32-bit
* show pattern as stored in memory.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@....com>
---
 arch/x86/mm/memtest.c |   23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/arch/x86/mm/memtest.c b/arch/x86/mm/memtest.c
index 82321d9..54c143b 100644
--- a/arch/x86/mm/memtest.c
+++ b/arch/x86/mm/memtest.c
@@ -24,9 +24,13 @@ static unsigned long patterns[] = {
 static void reserve_bad_mem(unsigned long pattern, unsigned long start_bad,
 			    unsigned long end_bad)
 {
-	printk(KERN_CONT "\n  %016lx bad mem addr "
-	       "%010lx - %010lx reserved",
-	       pattern, start_bad, end_bad);
+#ifdef CONFIG_X86_64
+	printk(KERN_CONT "\n  %016llx bad mem addr %010lx - %010lx reserved",
+	       cpu_to_be64(pattern), start_bad, end_bad);
+#else
+	printk(KERN_CONT "\n  %08x bad mem addr %010lx - %010lx reserved",
+	       cpu_to_be32(pattern), start_bad, end_bad);
+#endif
 	reserve_early(start_bad, end_bad, "BAD RAM");
 }
 
@@ -86,7 +90,7 @@ void __init early_memtest(unsigned long start, unsigned long end)
 	if (!memtest_pattern)
 		return;
 
-	printk(KERN_INFO "early_memtest: pattern num %d", memtest_pattern);
+	printk(KERN_INFO "early_memtest: number of tests %d", memtest_pattern);
 	for (i = 0; i < memtest_pattern; i++) {
 		unsigned int idx = i % ARRAY_SIZE(patterns);
 		pattern = patterns[idx];
@@ -101,10 +105,13 @@ void __init early_memtest(unsigned long start, unsigned long end)
 			if (t_start + t_size > end)
 				t_size = end - t_start;
 
-			printk(KERN_CONT "\n  %010llx - %010llx pattern %d",
-			       (unsigned long long)t_start,
-			       (unsigned long long)t_start + t_size, idx);
-
+#ifdef CONFIG_X86_64
+			printk(KERN_CONT "\n  %010llx - %010llx pattern %016llx",
+			       t_start, t_start + t_size, cpu_to_be64(pattern));
+#else
+			printk(KERN_CONT "\n  %010llx - %010llx pattern %08x",
+			       t_start, t_start + t_size, cpu_to_be32(pattern));
+#endif
 			memtest(t_start, t_size, pattern);
 
 			t_start += t_size;
-- 
1.6.1.2



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