[PATCH] i386: Kprobe rpl fix
authorZachary Amsden <zach@vmware.com>
Tue, 13 Feb 2007 12:26:21 +0000 (13:26 +0100)
committerAndi Kleen <andi@basil.nowhere.org>
Tue, 13 Feb 2007 12:26:21 +0000 (13:26 +0100)
Kprobes bugfix for paravirt compatibility - RPL on the CS when inserting
BPs must match running kernel.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andi Kleen <ak@suse.de>
CC: Eric Biederman <ebiederm@xmission.com>
arch/i386/kernel/kprobes.c

index b85cfa3ce1dd8e1f65db5cc010f95440bc49a0f9..b545bc746fceb2a9f6f192778c6dbca784395553 100644 (file)
@@ -408,7 +408,7 @@ fastcall void *__kprobes trampoline_handler(struct pt_regs *regs)
        spin_lock_irqsave(&kretprobe_lock, flags);
        head = kretprobe_inst_table_head(current);
        /* fixup registers */
-       regs->xcs = __KERNEL_CS;
+       regs->xcs = __KERNEL_CS | get_kernel_rpl();
        regs->eip = trampoline_address;
        regs->orig_eax = 0xffffffff;