Masami Hiramatsu (Google) 4638d7ebef x86/kprobes: Cleanup kprobes on ftrace code
Cleanup kprobes on ftrace code for x86.
 - Set instruction pointer (ip + MCOUNT_INSN_SIZE) after pre_handler only
   when p->post_handler exists.
 - Use INT3_INSN_SIZE instead of 1.
 - Use instruction_pointer/instruction_pointer_set() functions instead of
   accessing regs->ip directly.

Link: https://lore.kernel.org/all/172951436219.167263.18330240454389154327.stgit@devnote2/

Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
2024-11-07 01:16:59 +09:00
..