mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fix modules oopsing in lguest guests
@ 2007-09-24  5:57 Rusty Russell
  0 siblings, 0 replies; only message in thread
From: Rusty Russell @ 2007-09-24  5:57 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: lguest, lkml - Kernel Mailing List

The assembly templates for lguest guest patching are in the .init.text
section.  This means that modules get patched with "cc cc cc cc" or
similar junk.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

diff -r 554f72e059aa drivers/lguest/lguest_asm.S
--- a/drivers/lguest/lguest_asm.S	Thu Sep 13 16:56:44 2007 +1000
+++ b/drivers/lguest/lguest_asm.S	Mon Sep 24 15:34:31 2007 +1000
@@ -22,8 +22,9 @@
 	jmp lguest_init
 
 /*G:055 We create a macro which puts the assembler code between lgstart_ and
- * lgend_ markers.  These templates end up in the .init.text section, so they
- * are discarded after boot. */
+ * lgend_ markers.  These templates are put in the .text section: they can't be
+ * discarded after boot as we may need to patch modules, too. */
+.text
 #define LGUEST_PATCH(name, insns...)			\
 	lgstart_##name:	insns; lgend_##name:;		\
 	.globl lgstart_##name; .globl lgend_##name
@@ -34,7 +35,6 @@ LGUEST_PATCH(pushf, movl lguest_data+LGU
 LGUEST_PATCH(pushf, movl lguest_data+LGUEST_DATA_irq_enabled, %eax)
 /*:*/
 
-.text
 /* These demark the EIP range where host should never deliver interrupts. */
 .global lguest_noirq_start
 .global lguest_noirq_end



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-09-24  5:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-24  5:57 [PATCH] fix modules oopsing in lguest guests Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®