From: Zachary Amsden Date: Tue, 13 Feb 2007 12:26:21 +0000 (+0100) Subject: [PATCH] i386: Kprobe rpl fix X-Git-Tag: v2.6.21-rc1~184^2~65 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac3b6faff961dd52fde71fb199ec3cf68ba35052;p=linux-2.6 [PATCH] i386: Kprobe rpl fix Kprobes bugfix for paravirt compatibility - RPL on the CS when inserting BPs must match running kernel. Signed-off-by: Zachary Amsden Signed-off-by: Andi Kleen CC: Eric Biederman --- diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c index b85cfa3ce1..b545bc746f 100644 --- a/arch/i386/kernel/kprobes.c +++ b/arch/i386/kernel/kprobes.c @@ -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;