|
@@ -375,6 +375,9 @@ static void __kprobes arch_copy_kprobe(struct kprobe *p)
|
|
|
else
|
|
|
p->ainsn.boostable = -1;
|
|
|
|
|
|
+ /* Check whether the instruction modifies Interrupt Flag or not */
|
|
|
+ p->ainsn.if_modifier = is_IF_modifier(p->ainsn.insn);
|
|
|
+
|
|
|
/* Also, displacement change doesn't affect the first byte */
|
|
|
p->opcode = p->ainsn.insn[0];
|
|
|
}
|
|
@@ -434,7 +437,7 @@ static void __kprobes set_current_kprobe(struct kprobe *p, struct pt_regs *regs,
|
|
|
__this_cpu_write(current_kprobe, p);
|
|
|
kcb->kprobe_saved_flags = kcb->kprobe_old_flags
|
|
|
= (regs->flags & (X86_EFLAGS_TF | X86_EFLAGS_IF));
|
|
|
- if (is_IF_modifier(p->ainsn.insn))
|
|
|
+ if (p->ainsn.if_modifier)
|
|
|
kcb->kprobe_saved_flags &= ~X86_EFLAGS_IF;
|
|
|
}
|
|
|
|