aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/mpt2sas/mpi/mpi2_init.h
diff options
context:
space:
mode:
authorMasami Hiramatsu <[email protected]>2010-02-25 08:34:46 -0500
committerIngo Molnar <[email protected]>2010-02-25 17:49:26 +0100
commitc0f7ac3a9edde786bc129d37627953a8b8abefdf (patch)
tree8d6f2df2d1a08f2893327dd2a8b6e56525705456 /drivers/scsi/mpt2sas/mpi/mpi2_init.h
parent3d55cc8a058ee96291d6d45b1e35121b9920eca3 (diff)
kprobes/x86: Support kprobes jump optimization on x86
Introduce x86 arch-specific optimization code, which supports both of x86-32 and x86-64. This code also supports safety checking, which decodes whole of a function in which probe is inserted, and checks following conditions before optimization: - The optimized instructions which will be replaced by a jump instruction don't straddle the function boundary. - There is no indirect jump instruction, because it will jumps into the address range which is replaced by jump operand. - There is no jump/loop instruction which jumps into the address range which is replaced by jump operand. - Don't optimize kprobes if it is in functions into which fixup code will jumps. This uses text_poke_multibyte() which doesn't support modifying code on NMI/MCE handler. However, since kprobes itself doesn't support NMI/MCE code probing, it's not a problem. Changes in v9: - Use *_text_reserved() for checking the probe can be optimized. - Verify jump address range is in 2G range when preparing slot. - Backup original code when switching optimized buffer, instead of preparing buffer, because there can be int3 of other probes in preparing phase. - Check kprobe is disabled in arch_check_optimized_kprobe(). - Strictly check indirect jump opcodes (ff /4, ff /5). Changes in v6: - Split stop_machine-based jump patching code. - Update comments and coding style. Changes in v5: - Introduce stop_machine-based jump replacing. Signed-off-by: Masami Hiramatsu <[email protected]> Cc: systemtap <[email protected]> Cc: DLE <[email protected]> Cc: Ananth N Mavinakayanahalli <[email protected]> Cc: Jim Keniston <[email protected]> Cc: Srikar Dronamraju <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Anders Kaseorg <[email protected]> Cc: Tim Abbott <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Jason Baron <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ananth N Mavinakayanahalli <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpi/mpi2_init.h')
0 files changed, 0 insertions, 0 deletions