Skip to contentSkip to conversation

Kprobe rpl fix

PATCH In review Zachary Amsden 1 participant 1 message Feb 6, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 4/11 Kprobe rpl fix

Kprobes bugfix for paravirt compatibility - RPL on the CS when inserting BPs must match running kernel.

arch/i386/kernel/kprobes.c +1 -1
diff -r fad1c2108c13 arch/i386/kernel/kprobes.c
@@ -408,7 +408,7 @@ fastcall void *__kprobes trampoline_hand
 	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;