Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35905
b: refs/heads/master
c: 0603975
h: refs/heads/master
i:
  35903: 15f78d3
v: v3
  • Loading branch information
Fernando Luis V�zquez Cao authored and Andi Kleen committed Sep 26, 2006
1 parent 958140b commit f2ab707
Show file tree
Hide file tree
Showing 4 changed files with 15 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: 6f6b1e0477ccb2f25a9b045e38440347d2ce21c8
refs/heads/master: 06039754d775d3e48e4a292e4f353321205eff53
3 changes: 2 additions & 1 deletion trunk/arch/i386/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ KPROBE_END(debug)
* check whether we got an NMI on the debug path where the debug
* fault happened on the sysenter path.
*/
ENTRY(nmi)
KPROBE_ENTRY(nmi)
RING0_INT_FRAME
pushl %eax
CFI_ADJUST_CFA_OFFSET 4
Expand Down Expand Up @@ -805,6 +805,7 @@ nmi_16bit_stack:
.align 4
.long 1b,iret_exc
.previous
KPROBE_END(nmi)

KPROBE_ENTRY(int3)
RING0_INT_FRAME
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/i386/kernel/nmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/sysctl.h>
#include <linux/percpu.h>
#include <linux/dmi.h>
#include <linux/kprobes.h>

#include <asm/smp.h>
#include <asm/nmi.h>
Expand Down Expand Up @@ -882,7 +883,7 @@ EXPORT_SYMBOL(touch_nmi_watchdog);

extern void die_nmi(struct pt_regs *, const char *msg);

int nmi_watchdog_tick (struct pt_regs * regs, unsigned reason)
__kprobes int nmi_watchdog_tick(struct pt_regs * regs, unsigned reason)
{

/*
Expand Down Expand Up @@ -962,8 +963,7 @@ int nmi_watchdog_tick (struct pt_regs * regs, unsigned reason)
* This matches the old behaviour.
*/
rc = 1;
} else
printk(KERN_WARNING "Unknown enabled NMI hardware?!\n");
}
}
done:
return rc;
Expand Down
15 changes: 9 additions & 6 deletions trunk/arch/i386/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,8 @@ fastcall void __kprobes do_general_protection(struct pt_regs * regs,
}
}

static void mem_parity_error(unsigned char reason, struct pt_regs * regs)
static __kprobes void
mem_parity_error(unsigned char reason, struct pt_regs * regs)
{
printk(KERN_EMERG "Uhhuh. NMI received for unknown reason %02x on "
"CPU %d.\n", reason, smp_processor_id());
Expand All @@ -704,7 +705,8 @@ static void mem_parity_error(unsigned char reason, struct pt_regs * regs)
clear_mem_error(reason);
}

static void io_check_error(unsigned char reason, struct pt_regs * regs)
static __kprobes void
io_check_error(unsigned char reason, struct pt_regs * regs)
{
unsigned long i;

Expand All @@ -720,7 +722,8 @@ static void io_check_error(unsigned char reason, struct pt_regs * regs)
outb(reason, 0x61);
}

static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs)
static __kprobes void
unknown_nmi_error(unsigned char reason, struct pt_regs * regs)
{
#ifdef CONFIG_MCA
/* Might actually be able to figure out what the guilty party
Expand All @@ -741,7 +744,7 @@ static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs)

static DEFINE_SPINLOCK(nmi_print_lock);

void die_nmi (struct pt_regs *regs, const char *msg)
void __kprobes die_nmi(struct pt_regs *regs, const char *msg)
{
if (notify_die(DIE_NMIWATCHDOG, msg, regs, 0, 2, SIGINT) ==
NOTIFY_STOP)
Expand Down Expand Up @@ -773,7 +776,7 @@ void die_nmi (struct pt_regs *regs, const char *msg)
do_exit(SIGSEGV);
}

static void default_do_nmi(struct pt_regs * regs)
static __kprobes void default_do_nmi(struct pt_regs * regs)
{
unsigned char reason = 0;

Expand Down Expand Up @@ -811,7 +814,7 @@ static void default_do_nmi(struct pt_regs * regs)
reassert_nmi();
}

fastcall void do_nmi(struct pt_regs * regs, long error_code)
fastcall __kprobes void do_nmi(struct pt_regs * regs, long error_code)
{
int cpu;

Expand Down

0 comments on commit f2ab707

Please sign in to comment.