diff options
Diffstat (limited to 'arch/x86/kernel/kprobes.c')
-rw-r--r-- | arch/x86/kernel/kprobes.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c index c5f1f117e0c0..3fe86d706a14 100644 --- a/arch/x86/kernel/kprobes.c +++ b/arch/x86/kernel/kprobes.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #include <asm/uaccess.h> | 56 | #include <asm/uaccess.h> |
57 | #include <asm/alternative.h> | 57 | #include <asm/alternative.h> |
58 | #include <asm/insn.h> | 58 | #include <asm/insn.h> |
59 | #include <asm/debugreg.h> | ||
59 | 60 | ||
60 | void jprobe_return_end(void); | 61 | void jprobe_return_end(void); |
61 | 62 | ||
@@ -945,8 +946,14 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self, | |||
945 | ret = NOTIFY_STOP; | 946 | ret = NOTIFY_STOP; |
946 | break; | 947 | break; |
947 | case DIE_DEBUG: | 948 | case DIE_DEBUG: |
948 | if (post_kprobe_handler(args->regs)) | 949 | if (post_kprobe_handler(args->regs)) { |
950 | /* | ||
951 | * Reset the BS bit in dr6 (pointed by args->err) to | ||
952 | * denote completion of processing | ||
953 | */ | ||
954 | (*(unsigned long *)ERR_PTR(args->err)) &= ~DR_STEP; | ||
949 | ret = NOTIFY_STOP; | 955 | ret = NOTIFY_STOP; |
956 | } | ||
950 | break; | 957 | break; |
951 | case DIE_GPF: | 958 | case DIE_GPF: |
952 | /* | 959 | /* |