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]
Message-Id: <200702060353.l163r2hU000745@zach-dev.vmware.com>
Date:	Mon, 5 Feb 2007 19:53:02 -0800
From:	Zachary Amsden <zach@...are.com>
To:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...l.org>, Andi Kleen <ak@....de>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Jeremy Fitzhardinge <jeremy@...p.org>,
	Chris Wright <chrisw@...s-sol.org>,
	Zachary Amsden <zach@...are.com>
Subject: [PATCH 5/11] Fix PIT override bug for paravirt

The time initialization changed for i386 when some code moved into time_init.
This made it no longer possible to override the PIT / HPET, which broke
paravirt guests.

Subject: Fix PIT override bug for paravirt
Signed-off-by: Zachary Amsden <zach@...are.com>

diff -r acd12d5196c7 arch/i386/kernel/paravirt.c
--- a/arch/i386/kernel/paravirt.c	Thu Feb 01 23:13:18 2007 -0800
+++ b/arch/i386/kernel/paravirt.c	Thu Feb 01 23:19:36 2007 -0800
@@ -497,7 +497,7 @@ struct paravirt_ops paravirt_ops = {
 	.memory_setup = machine_specific_memory_setup,
 	.get_wallclock = native_get_wallclock,
 	.set_wallclock = native_set_wallclock,
-	.time_init = time_init_hook,
+	.time_init = native_time_init,
 	.init_IRQ = native_init_IRQ,
 
 	.cpuid = native_cpuid,
diff -r acd12d5196c7 arch/i386/kernel/time.c
--- a/arch/i386/kernel/time.c	Thu Feb 01 23:13:18 2007 -0800
+++ b/arch/i386/kernel/time.c	Thu Feb 01 23:43:21 2007 -0800
@@ -268,10 +268,17 @@ static void __init hpet_time_init(void)
 {
 	if (!hpet_enable())
 		setup_pit_timer();
-	do_time_init();
-}
-
+	time_init_hook();
+}
+
+void __init native_time_init(void)
+{
+	late_time_init = hpet_time_init;
+}
+
+#ifndef CONFIG_PARAVIRT
 void __init time_init(void)
 {
-	late_time_init = hpet_time_init;
-}
+	native_time_init();
+}
+#endif
diff -r acd12d5196c7 include/asm-i386/paravirt.h
--- a/include/asm-i386/paravirt.h	Thu Feb 01 23:13:18 2007 -0800
+++ b/include/asm-i386/paravirt.h	Thu Feb 01 23:17:27 2007 -0800
@@ -185,7 +185,7 @@ static inline int set_wallclock(unsigned
 	return paravirt_ops.set_wallclock(nowtime);
 }
 
-static inline void do_time_init(void)
+static inline void time_init(void)
 {
 	return paravirt_ops.time_init();
 }
diff -r acd12d5196c7 include/asm-i386/time.h
--- a/include/asm-i386/time.h	Thu Feb 01 23:13:18 2007 -0800
+++ b/include/asm-i386/time.h	Thu Feb 01 23:43:29 2007 -0800
@@ -28,13 +28,14 @@ static inline int native_set_wallclock(u
 	return retval;
 }
 
+extern void native_time_init(void);
+
 #ifdef CONFIG_PARAVIRT
 #include <asm/paravirt.h>
 #else /* !CONFIG_PARAVIRT */
 
 #define get_wallclock() native_get_wallclock()
 #define set_wallclock(x) native_set_wallclock(x)
-#define do_time_init() time_init_hook()
 
 #endif /* CONFIG_PARAVIRT */
 
-
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