Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361571
b: refs/heads/master
c: 9a556ab
h: refs/heads/master
i:
  361569: c8e8a23
  361567: d309508
v: v3
  • Loading branch information
Masami Hiramatsu authored and Ingo Molnar committed Mar 18, 2013
1 parent d7d8d58 commit 8606b19
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 65c10553552b487a71bf5e4676743435046fae6f
refs/heads/master: 9a556ab998071457e79b319f2527642dd6e50617
1 change: 1 addition & 0 deletions trunk/arch/x86/include/asm/kprobes.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ struct arch_specific_insn {
* a post_handler or break_handler).
*/
int boostable;
bool if_modifier;
};

struct arch_optimized_insn {
Expand Down
5 changes: 4 additions & 1 deletion trunk/arch/x86/kernel/kprobes/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 8606b19

Please sign in to comment.