Go to the documentation of this file. 1 #ifndef _ASM_X86_KPROBES_H
2 #define _ASM_X86_KPROBES_H
24 #include <linux/types.h>
25 #include <linux/ptrace.h>
29 #define __ARCH_WANT_KPROBES_INSN_SLOT
30 #define ARCH_SUPPORTS_KPROBES_ON_FTRACE
36 #define BREAKPOINT_INSTRUCTION 0xcc
37 #define RELATIVEJUMP_OPCODE 0xe9
38 #define RELATIVEJUMP_SIZE 5
39 #define RELATIVECALL_OPCODE 0xe8
40 #define RELATIVE_ADDR_SIZE 4
41 #define MAX_STACK_SIZE 64
42 #define MIN_STACK_SIZE(ADDR) \
43 (((MAX_STACK_SIZE) < (((unsigned long)current_thread_info()) + \
44 THREAD_SIZE - (unsigned long)(ADDR))) \
46 : (((unsigned long)current_thread_info()) + \
47 THREAD_SIZE - (unsigned long)(ADDR)))
49 #define flush_insn_slot(p) do { } while (0)
56 #define MAX_OPTIMIZED_LENGTH (MAX_INSN_SIZE + RELATIVE_ADDR_SIZE)
57 #define MAX_OPTINSN_SIZE \
58 (((unsigned long)&optprobe_template_end - \
59 (unsigned long)&optprobe_template_entry) + \
60 MAX_OPTIMIZED_LENGTH + RELATIVEJUMP_SIZE)
117 unsigned long val,
void *
data);