Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113488
b: refs/heads/master
c: 762db43
h: refs/heads/master
v: v3
  • Loading branch information
Alexander van Heukelum authored and Ingo Molnar committed Oct 13, 2008
1 parent 7ef3ae9 commit 29dc529
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 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: 927604c7592473742891dc13e1da09febc06e01b
refs/heads/master: 762db4347060c5d23e9675846e02f7d95d7f944f
8 changes: 7 additions & 1 deletion trunk/arch/x86/kernel/traps_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ static unsigned int code_bytes = 64;
static int ignore_nmis;
static int die_counter;

static inline void conditional_sti(struct pt_regs *regs)
{
if (regs->flags & X86_EFLAGS_IF)
local_irq_enable();
}

void printk_address(unsigned long address, int reliable)
{
#ifdef CONFIG_KALLSYMS
Expand Down Expand Up @@ -859,7 +865,7 @@ void __kprobes do_int3(struct pt_regs *regs, long error_code)
* This is an interrupt gate, because kprobes wants interrupts
* disabled. Normal trap handlers don't.
*/
restore_interrupts(regs);
conditional_sti(regs);

do_trap(3, SIGTRAP, "int3", 1, regs, error_code, NULL);
}
Expand Down
9 changes: 0 additions & 9 deletions trunk/include/asm-x86/kprobes.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,6 @@ struct kprobe_ctlblk {
struct prev_kprobe prev_kprobe;
};

/* trap3/1 are intr gates for kprobes. So, restore the status of IF,
* if necessary, before executing the original int3/1 (trap) handler.
*/
static inline void restore_interrupts(struct pt_regs *regs)
{
if (regs->flags & X86_EFLAGS_IF)
local_irq_enable();
}

extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
extern int kprobe_exceptions_notify(struct notifier_block *self,
unsigned long val, void *data);
Expand Down

0 comments on commit 29dc529

Please sign in to comment.