]> err.no Git - linux-2.6/commit
x86: Fix alternatives and kprobes to remap write-protected kernel text
authorAndi Kleen <ak@suse.de>
Sun, 22 Jul 2007 09:12:31 +0000 (11:12 +0200)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 22 Jul 2007 18:03:37 +0000 (11:03 -0700)
commit19d36ccdc34f5ed444f8a6af0cbfdb6790eb1177
tree39942efb826f2793692da60b04fc0e7b015fa23d
parentf51c94528a9bc73504928926ca4d791a2b7ddd7c
x86: Fix alternatives and kprobes to remap write-protected kernel text

Reenable kprobes and alternative patching when the kernel text is write
protected by DEBUG_RODATA

Add a general utility function to change write protected text.  The new
function remaps the code using vmap to write it and takes care of CPU
synchronization.  It also does CLFLUSH to make icache recovery faster.

There are some limitations on when the function can be used, see the
comment.

This is a newer version that also changes the paravirt_ops code.
text_poke also supports multi byte patching now.

Contains bug fixes from Zach Amsden and suggestions from Mathieu
Desnoyers.

Cc: Jan Beulich <jbeulich@novell.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Mathieu Desnoyers <compudj@krystal.dyndns.org>
Cc: Zach Amsden <zach@vmware.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/i386/kernel/alternative.c
arch/i386/kernel/kprobes.c
arch/i386/kernel/paravirt.c
arch/i386/mm/init.c
arch/x86_64/kernel/kprobes.c
arch/x86_64/mm/init.c
arch/x86_64/mm/pageattr.c
include/asm-i386/alternative.h
include/asm-x86_64/alternative.h
include/asm-x86_64/pgtable.h