public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: Fix 27-rc crash on vsmp due to paravirt during module load
@ 2008-09-23  5:58 Ravikiran G Thirumalai
  2008-09-23  8:31 ` Ingo Molnar
  0 siblings, 1 reply; 3+ messages in thread
From: Ravikiran G Thirumalai @ 2008-09-23  5:58 UTC (permalink / raw)
  To: Ingo Molnar, torvalds; +Cc: linux-kernel, Glauber de Oliveira Costa

27-rc fails to boot up if configured to use modules.  Turns out vsmp_patch
was marked __init, and vsmp_patch being the pvops 'patch' routine for vsmp,
a call to vsmp_patch just turns out to execute a code page with series of 0xcc
(POISON_FREE_INITMEM -- int3).  Since apply_paravirt can only be called during
init/module load, make vsmp_patch with "__init_or_module"

Please apply

Thanks,
Kiran
---

vsmp_patch has been marked with __init ever since pvops, however,
apply_paravirt can be called during module load causing calls to
freed memory location.

Since apply_paravirt can only be called during bootup and module load,
mark vsmp patch with "__init_or_module"

Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>

Index: linux-2.6/arch/x86/kernel/vsmp_64.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/vsmp_64.c	2008-09-19 11:37:54.000000000 -0700
+++ linux-2.6/arch/x86/kernel/vsmp_64.c	2008-09-21 15:50:18.000000000 -0700
@@ -61,7 +61,7 @@
 	native_restore_fl((flags | X86_EFLAGS_IF) & (~X86_EFLAGS_AC));
 }
 
-static unsigned __init vsmp_patch(u8 type, u16 clobbers, void *ibuf,
+static unsigned __init_or_module vsmp_patch(u8 type, u16 clobbers, void *ibuf,
 				  unsigned long addr, unsigned len)
 {
 	switch (type) {


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86: Fix 27-rc crash on vsmp due to paravirt during module load
  2008-09-23  5:58 [PATCH] x86: Fix 27-rc crash on vsmp due to paravirt during module load Ravikiran G Thirumalai
@ 2008-09-23  8:31 ` Ingo Molnar
  2008-09-23 18:03   ` Ravikiran G Thirumalai
  0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2008-09-23  8:31 UTC (permalink / raw)
  To: Ravikiran G Thirumalai; +Cc: torvalds, linux-kernel, Glauber de Oliveira Costa


* Ravikiran G Thirumalai <kiran@scalex86.org> wrote:

> 27-rc fails to boot up if configured to use modules.  Turns out 
> vsmp_patch was marked __init, and vsmp_patch being the pvops 'patch' 
> routine for vsmp, a call to vsmp_patch just turns out to execute a 
> code page with series of 0xcc (POISON_FREE_INITMEM -- int3).  Since 
> apply_paravirt can only be called during init/module load, make 
> vsmp_patch with "__init_or_module"

applied to tip/x86/urgent, thanks Ravikiran!

	Ingo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86: Fix 27-rc crash on vsmp due to paravirt during module load
  2008-09-23  8:31 ` Ingo Molnar
@ 2008-09-23 18:03   ` Ravikiran G Thirumalai
  0 siblings, 0 replies; 3+ messages in thread
From: Ravikiran G Thirumalai @ 2008-09-23 18:03 UTC (permalink / raw)
  To: Ingo Molnar, stable; +Cc: linux-kernel, Glauber de Oliveira Costa

On Tue, Sep 23, 2008 at 10:31:45AM +0200, Ingo Molnar wrote:
>
>* Ravikiran G Thirumalai <kiran@scalex86.org> wrote:
>
>> 27-rc fails to boot up if configured to use modules.  Turns out 
>> vsmp_patch was marked __init, and vsmp_patch being the pvops 'patch' 
>> routine for vsmp, a call to vsmp_patch just turns out to execute a 
>> code page with series of 0xcc (POISON_FREE_INITMEM -- int3).  Since 
>> apply_paravirt can only be called during init/module load, make 
>> vsmp_patch with "__init_or_module"
>
>applied to tip/x86/urgent, thanks Ravikiran!
>


Thanks Ingo.
Can this get into 2.6.26 stable as well, please?  (Re-sending patch for -stable,
re diffed against 2.6.26.5)

Thanks,
Kiran

---

vsmp_patch has been marked with __init ever since pvops, however,
apply_paravirt can be called during module load causing calls to
freed memory location.

Since apply_paravirt can only be called during bootup and module load,
mark vsmp patch with "__init_or_module"

Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>

Index: linux-2.6.26.5/arch/x86/kernel/vsmp_64.c
===================================================================
--- linux-2.6.26.5.orig/arch/x86/kernel/vsmp_64.c	2008-09-08 10:40:20.000000000 -0700
+++ linux-2.6.26.5/arch/x86/kernel/vsmp_64.c	2008-09-23 10:02:05.000000000 -0700
@@ -58,7 +58,7 @@
 	native_restore_fl((flags | X86_EFLAGS_IF) & (~X86_EFLAGS_AC));
 }
 
-static unsigned __init vsmp_patch(u8 type, u16 clobbers, void *ibuf,
+static unsigned __init_or_module vsmp_patch(u8 type, u16 clobbers, void *ibuf,
 				  unsigned long addr, unsigned len)
 {
 	switch (type) {

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-09-23 18:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-23  5:58 [PATCH] x86: Fix 27-rc crash on vsmp due to paravirt during module load Ravikiran G Thirumalai
2008-09-23  8:31 ` Ingo Molnar
2008-09-23 18:03   ` Ravikiran G Thirumalai

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