aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/kprobes/opt.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-12-09 14:21:33 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2018-12-09 14:21:33 -0800
commitebbd30004d6cfa747723b3ac6ee1a97795f797ba (patch)
tree08bae689ca8ba7fd7ea5782436da3974db6f4313 /arch/x86/kernel/kprobes/opt.c
parentMerge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (diff)
parentkprobes/x86: Blacklist non-attachable interrupt functions (diff)
downloadlinux-dev-ebbd30004d6cfa747723b3ac6ee1a97795f797ba.tar.xz
linux-dev-ebbd30004d6cfa747723b3ac6ee1a97795f797ba.zip
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
Diffstat (limited to 'arch/x86/kernel/kprobes/opt.c')
-rw-r--r--arch/x86/kernel/kprobes/opt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/kprobes/opt.c b/arch/x86/kernel/kprobes/opt.c
index 40b16b270656..6adf6e6c2933 100644
--- a/arch/x86/kernel/kprobes/opt.c
+++ b/arch/x86/kernel/kprobes/opt.c
@@ -189,7 +189,7 @@ static int copy_optimized_instructions(u8 *dest, u8 *src, u8 *real)
int len = 0, ret;
while (len < RELATIVEJUMP_SIZE) {
- ret = __copy_instruction(dest + len, src + len, real, &insn);
+ ret = __copy_instruction(dest + len, src + len, real + len, &insn);
if (!ret || !can_boost(&insn, src + len))
return -EINVAL;
len += ret;