Skip to content

Commit ebbd300

Browse files
committed
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull kprobes fixes from Ingo Molnar: "Two kprobes fixes: a blacklist fix and an instruction patching related corruption fix" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: kprobes/x86: Blacklist non-attachable interrupt functions kprobes/x86: Fix instruction patching corruption when copying more than one RIP-relative instruction
2 parents 4b04e73 + a50480c commit ebbd300

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

arch/x86/entry/entry_64.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ ENTRY(interrupt_entry)
566566

567567
ret
568568
END(interrupt_entry)
569+
_ASM_NOKPROBE(interrupt_entry)
569570

570571

571572
/* Interrupt entry/exit. */
@@ -766,6 +767,7 @@ native_irq_return_ldt:
766767
jmp native_irq_return_iret
767768
#endif
768769
END(common_interrupt)
770+
_ASM_NOKPROBE(common_interrupt)
769771

770772
/*
771773
* APIC interrupts.
@@ -780,6 +782,7 @@ ENTRY(\sym)
780782
call \do_sym /* rdi points to pt_regs */
781783
jmp ret_from_intr
782784
END(\sym)
785+
_ASM_NOKPROBE(\sym)
783786
.endm
784787

785788
/* Make sure APIC interrupt handlers end up in the irqentry section: */
@@ -960,6 +963,7 @@ ENTRY(\sym)
960963

961964
jmp error_exit
962965
.endif
966+
_ASM_NOKPROBE(\sym)
963967
END(\sym)
964968
.endm
965969

arch/x86/kernel/kprobes/opt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ static int copy_optimized_instructions(u8 *dest, u8 *src, u8 *real)
189189
int len = 0, ret;
190190

191191
while (len < RELATIVEJUMP_SIZE) {
192-
ret = __copy_instruction(dest + len, src + len, real, &insn);
192+
ret = __copy_instruction(dest + len, src + len, real + len, &insn);
193193
if (!ret || !can_boost(&insn, src + len))
194194
return -EINVAL;
195195
len += ret;

0 commit comments

Comments
 (0)