diff options
| -rw-r--r-- | arch/x86/include/asm/kprobes.h | 4 | ||||
| -rw-r--r-- | arch/x86/kernel/kprobes/opt.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/include/asm/kprobes.h b/arch/x86/include/asm/kprobes.h index 6cf65437b5e5..9f2e3102e0bb 100644 --- a/arch/x86/include/asm/kprobes.h +++ b/arch/x86/include/asm/kprobes.h | |||
| @@ -58,8 +58,8 @@ extern __visible kprobe_opcode_t optprobe_template_call[]; | |||
| 58 | extern __visible kprobe_opcode_t optprobe_template_end[]; | 58 | extern __visible kprobe_opcode_t optprobe_template_end[]; |
| 59 | #define MAX_OPTIMIZED_LENGTH (MAX_INSN_SIZE + RELATIVE_ADDR_SIZE) | 59 | #define MAX_OPTIMIZED_LENGTH (MAX_INSN_SIZE + RELATIVE_ADDR_SIZE) |
| 60 | #define MAX_OPTINSN_SIZE \ | 60 | #define MAX_OPTINSN_SIZE \ |
| 61 | (((unsigned long)&optprobe_template_end - \ | 61 | (((unsigned long)optprobe_template_end - \ |
| 62 | (unsigned long)&optprobe_template_entry) + \ | 62 | (unsigned long)optprobe_template_entry) + \ |
| 63 | MAX_OPTIMIZED_LENGTH + RELATIVEJUMP_SIZE) | 63 | MAX_OPTIMIZED_LENGTH + RELATIVEJUMP_SIZE) |
| 64 | 64 | ||
| 65 | extern const int kretprobe_blacklist_size; | 65 | extern const int kretprobe_blacklist_size; |
diff --git a/arch/x86/kernel/kprobes/opt.c b/arch/x86/kernel/kprobes/opt.c index 22e65f0b8b34..0cae7c0f32ec 100644 --- a/arch/x86/kernel/kprobes/opt.c +++ b/arch/x86/kernel/kprobes/opt.c | |||
| @@ -142,11 +142,11 @@ void optprobe_template_func(void); | |||
| 142 | STACK_FRAME_NON_STANDARD(optprobe_template_func); | 142 | STACK_FRAME_NON_STANDARD(optprobe_template_func); |
| 143 | 143 | ||
| 144 | #define TMPL_MOVE_IDX \ | 144 | #define TMPL_MOVE_IDX \ |
| 145 | ((long)&optprobe_template_val - (long)&optprobe_template_entry) | 145 | ((long)optprobe_template_val - (long)optprobe_template_entry) |
| 146 | #define TMPL_CALL_IDX \ | 146 | #define TMPL_CALL_IDX \ |
| 147 | ((long)&optprobe_template_call - (long)&optprobe_template_entry) | 147 | ((long)optprobe_template_call - (long)optprobe_template_entry) |
| 148 | #define TMPL_END_IDX \ | 148 | #define TMPL_END_IDX \ |
| 149 | ((long)&optprobe_template_end - (long)&optprobe_template_entry) | 149 | ((long)optprobe_template_end - (long)optprobe_template_entry) |
| 150 | 150 | ||
| 151 | #define INT3_SIZE sizeof(kprobe_opcode_t) | 151 | #define INT3_SIZE sizeof(kprobe_opcode_t) |
| 152 | 152 | ||
| @@ -371,7 +371,7 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, | |||
| 371 | } | 371 | } |
| 372 | 372 | ||
| 373 | /* Copy arch-dep-instance from template */ | 373 | /* Copy arch-dep-instance from template */ |
| 374 | memcpy(buf, &optprobe_template_entry, TMPL_END_IDX); | 374 | memcpy(buf, optprobe_template_entry, TMPL_END_IDX); |
| 375 | 375 | ||
| 376 | /* Copy instructions into the out-of-line buffer */ | 376 | /* Copy instructions into the out-of-line buffer */ |
| 377 | ret = copy_optimized_instructions(buf + TMPL_END_IDX, op->kp.addr, | 377 | ret = copy_optimized_instructions(buf + TMPL_END_IDX, op->kp.addr, |
