-
- Downloads
kprobes: treewide: Use 'kprobe_opcode_t *' for the code address in get_optimized_kprobe()
Since get_optimized_kprobe() is only used inside kprobes, it doesn't need to use 'unsigned long' type for 'addr' parameter. Make it use 'kprobe_opcode_t *' for the 'addr' parameter and subsequent call of arch_within_optimized_kprobe() also should use 'kprobe_opcode_t *'. Note that MAX_OPTIMIZED_LENGTH and RELATIVEJUMP_SIZE are defined by byte-size, but the size of 'kprobe_opcode_t' depends on the architecture. Therefore, we must be careful when calculating addresses using those macros. Link: https://lkml.kernel.org/r/163163040680.489837.12133032364499833736.stgit@devnote2 Signed-off-by:Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by:
Steven Rostedt (VMware) <rostedt@goodmis.org>
Showing
- arch/arm/probes/kprobes/opt-arm.c 4 additions, 3 deletionsarch/arm/probes/kprobes/opt-arm.c
- arch/powerpc/kernel/optprobes.c 3 additions, 3 deletionsarch/powerpc/kernel/optprobes.c
- arch/x86/kernel/kprobes/opt.c 3 additions, 3 deletionsarch/x86/kernel/kprobes/opt.c
- include/linux/kprobes.h 1 addition, 1 deletioninclude/linux/kprobes.h
- kernel/kprobes.c 5 additions, 5 deletionskernel/kprobes.c
Loading
Please register or sign in to comment