• Andi Kleen's avatar
    x86: Fix alternatives and kprobes to remap write-protected kernel text · 19d36ccd
    Andi Kleen authored
    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: default avatarAndi Kleen <ak@suse.de>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    19d36ccd
kprobes.c 21.5 KB