allow kprobes to run on top of preempt emulation
This patch makes preempt emulation more strict in differentiating its own dr0 hardware breakpoint from a singlestep in return from kprobes pre-handler that will invoke the post-handler through int1 debug TS on eflags. This avoids GPF when kprobes returns from pre-handler with the dr7 loaded with preempt emulation.
Signed-off-by Andrea Arcangeli <[email protected]>
home/andrea/kernel/qumranet/kvm/kernel/preempt.c renamed from kernel/preempt.c +5 -0
@@ -140,6 +147,11 @@"cmp $0x701, " TMP " \n\t" "pop " TMP " \n\t" "jnz .Lnotme \n\t" +"push " TMP " \n\t" +"mov %db6, " TMP " \n\t" +"test $0x1, " TMP " \n\t" +"pop " TMP " \n\t" +"jz .Lnotme \n\t" SAVE_REGS "\n\t" #ifdef CONFIG_X86_64"leaq 120(%rsp),%rdi\n\t"
Avi Kivity
AppliedQuoted 7 lines · Andrea Arcangeli
This patch makes preempt emulation more strict in differentiating its own dr0 hardware breakpoint from a singlestep in return from kprobes pre-handler that will invoke the post-handler through int1 debug TS on eflags. This avoids GPF when kprobes returns from pre-handler with the dr7 loaded with preempt emulation.
Applied, thanks.
Signature · 1 line
error compiling committee.c: too many arguments to function