diff options
-rw-r--r-- | arch/i386/kernel/kprobes.c | 3 | ||||
-rw-r--r-- | arch/x86_64/kernel/kprobes.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c index 7fb5a6f4a563..e5cec32018a5 100644 --- a/arch/i386/kernel/kprobes.c +++ b/arch/i386/kernel/kprobes.c | |||
@@ -221,7 +221,10 @@ static int __kprobes kprobe_handler(struct pt_regs *regs) | |||
221 | * either a probepoint or a debugger breakpoint | 221 | * either a probepoint or a debugger breakpoint |
222 | * at this address. In either case, no further | 222 | * at this address. In either case, no further |
223 | * handling of this interrupt is appropriate. | 223 | * handling of this interrupt is appropriate. |
224 | * Back up over the (now missing) int3 and run | ||
225 | * the original instruction. | ||
224 | */ | 226 | */ |
227 | regs->eip -= sizeof(kprobe_opcode_t); | ||
225 | ret = 1; | 228 | ret = 1; |
226 | } | 229 | } |
227 | /* Not one of ours: let kernel handle it */ | 230 | /* Not one of ours: let kernel handle it */ |
diff --git a/arch/x86_64/kernel/kprobes.c b/arch/x86_64/kernel/kprobes.c index c21cceaea275..2d7658fbbb28 100644 --- a/arch/x86_64/kernel/kprobes.c +++ b/arch/x86_64/kernel/kprobes.c | |||
@@ -361,7 +361,10 @@ int __kprobes kprobe_handler(struct pt_regs *regs) | |||
361 | * either a probepoint or a debugger breakpoint | 361 | * either a probepoint or a debugger breakpoint |
362 | * at this address. In either case, no further | 362 | * at this address. In either case, no further |
363 | * handling of this interrupt is appropriate. | 363 | * handling of this interrupt is appropriate. |
364 | * Back up over the (now missing) int3 and run | ||
365 | * the original instruction. | ||
364 | */ | 366 | */ |
367 | regs->rip = (unsigned long)addr; | ||
365 | ret = 1; | 368 | ret = 1; |
366 | } | 369 | } |
367 | /* Not one of ours: let kernel handle it */ | 370 | /* Not one of ours: let kernel handle it */ |