Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80232
b: refs/heads/master
c: b3a5acc
h: refs/heads/master
v: v3
  • Loading branch information
Harvey Harrison authored and Ingo Molnar committed Jan 30, 2008
1 parent 7e02822 commit 62fe53d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 33 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: 318aa296c329625916c47703eab906d6ebf13930
refs/heads/master: b3a5acc17c4ad9c28c00ee5e5271de1b1285d22b
47 changes: 15 additions & 32 deletions trunk/arch/x86/kernel/traps_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,19 +601,12 @@ static void __kprobes do_trap(int trapnr, int signr, char *str,
}


/* kernel trap */
{
const struct exception_table_entry *fixup;
fixup = search_exception_tables(regs->ip);
if (fixup)
regs->ip = fixup->fixup;
else {
tsk->thread.error_code = error_code;
tsk->thread.trap_no = trapnr;
die(str, regs, error_code);
}
return;
if (!fixup_exception(regs)) {
tsk->thread.error_code = error_code;
tsk->thread.trap_no = trapnr;
die(str, regs, error_code);
}
return;
}

#define DO_ERROR(trapnr, signr, str, name) \
Expand Down Expand Up @@ -703,22 +696,15 @@ asmlinkage void __kprobes do_general_protection(struct pt_regs * regs,
return;
}

/* kernel gp */
{
const struct exception_table_entry *fixup;
fixup = search_exception_tables(regs->ip);
if (fixup) {
regs->ip = fixup->fixup;
return;
}
if (fixup_exception(regs))
return;

tsk->thread.error_code = error_code;
tsk->thread.trap_no = 13;
if (notify_die(DIE_GPF, "general protection fault", regs,
error_code, 13, SIGSEGV) == NOTIFY_STOP)
return;
die("general protection fault", regs, error_code);
}
tsk->thread.error_code = error_code;
tsk->thread.trap_no = 13;
if (notify_die(DIE_GPF, "general protection fault", regs,
error_code, 13, SIGSEGV) == NOTIFY_STOP)
return;
die("general protection fault", regs, error_code);
}

static __kprobes void
Expand Down Expand Up @@ -910,12 +896,9 @@ asmlinkage void __kprobes do_debug(struct pt_regs * regs,

static int kernel_math_error(struct pt_regs *regs, const char *str, int trapnr)
{
const struct exception_table_entry *fixup;
fixup = search_exception_tables(regs->ip);
if (fixup) {
regs->ip = fixup->fixup;
if (fixup_exception(regs))
return 1;
}

notify_die(DIE_GPF, str, regs, 0, trapnr, SIGFPE);
/* Illegal floating point operation in the kernel */
current->thread.trap_no = trapnr;
Expand Down

0 comments on commit 62fe53d

Please sign in to comment.