x86: Fix 27-rc crash on vsmp due to paravirt during module load
PATCH 1/1 x86: Fix 27-rc crash on vsmp due to paravirt during module load
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"
arch/x86/kernel/vsmp_64.c +1 -1
@@ -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) {
Ingo Molnar
AppliedQuoted 6 lines · Ravikiran G Thirumalai
27-rc fails to boot up if configured to use modules. Turns out
vsmp_patchwas marked__init, andvsmp_patchbeing the pvops 'patch' routine for vsmp, a call tovsmp_patchjust turns out to execute a code page with series of0xcc(POISON_FREE_INITMEM-- int3). Sinceapply_paravirtcan only be called during init/module load, makevsmp_patchwith "__init_or_module"
applied to tip/x86/urgent, thanks Ravikiran!
Ingo
Quoted 12 lines · Ingo Molnar
Quoted 6 lines · Ravikiran G Thirumalai
27-rc fails to boot up if configured to use modules. Turns out
vsmp_patchwas marked__init, andvsmp_patchbeing the pvops 'patch' routine for vsmp, a call tovsmp_patchjust turns out to execute a code page with series of0xcc(POISON_FREE_INITMEM-- int3). Sinceapply_paravirtcan only be called during init/module load, makevsmp_patchwith "__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"
arch/x86/kernel/vsmp_64.c +1 -1
@@ -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) {