Commit-ID:  cb09cad44f07044d9810f18f6f9a6a6f3771f979
Gitweb:     http://git.kernel.org/tip/cb09cad44f07044d9810f18f6f9a6a6f3771f979
Author:     Avi Kivity <a...@redhat.com>
AuthorDate: Wed, 22 Aug 2012 13:03:48 +0300
Committer:  Ingo Molnar <mi...@kernel.org>
CommitDate: Wed, 22 Aug 2012 12:09:49 +0200

x86/alternatives: Fix p6 nops on non-modular kernels

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 <tra...@redhat.com>
Signed-off-by: Avi Kivity <a...@redhat.com>
Cc: Michael Tokarev <m...@tls.msk.ru>
Cc: Borislav Petkov <borislav.pet...@amd.com>
Cc: Marcelo Tosatti <mtosa...@redhat.com>
Cc: qemu-de...@nongnu.org
Cc: Anthony Liguori <anth...@codemonkey.ws>
Cc: H. Peter Anvin <h...@linux.intel.com>
Cc: Alan Cox <a...@lxorguk.ukuu.org.uk>
Cc: Alan Cox <a...@linux.intel.com>
Link: http://lkml.kernel.org/r/5034ae84.90...@redhat.com
Signed-off-by: Ingo Molnar <mi...@kernel.org>
---
 arch/x86/kernel/alternative.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index afb7ff7..ced4534 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -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,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to