Skip to content

Commit

Permalink
x86/alternatives: Fix p6 nops on non-modular kernels
Browse files Browse the repository at this point in the history
Probably a leftover from the early days of self-patching, p6nops
are marked __initconst_or_module, which causes them to be
discarded in a non-modular kernel.  If something later triggers
patching, it will overwrite kernel code with garbage.

Reported-by: Tomas Racek <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>
Cc: Michael Tokarev <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Marcelo Tosatti <[email protected]>
Cc: [email protected]
Cc: Anthony Liguori <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Alan Cox <[email protected]>
Cc: Alan Cox <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
avikivity authored and Ingo Molnar committed Aug 22, 2012
1 parent 2530cd4 commit cb09cad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/alternative.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static const unsigned char * const k7_nops[ASM_NOP_MAX+2] =
#endif

#ifdef P6_NOP1
static const unsigned char __initconst_or_module p6nops[] =
static const unsigned char p6nops[] =
{
P6_NOP1,
P6_NOP2,
Expand Down

0 comments on commit cb09cad

Please sign in to comment.