Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40593
b: refs/heads/master
c: 4393c4f
h: refs/heads/master
i:
  40591: 9ce49c9
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Nov 1, 2006
1 parent 4edf5b0 commit 2508f34
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 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: 0d69a052d4d7c4085706b9ac0d1bd28ff90c9fca
refs/heads/master: 4393c4f6788cee65095dd838cfeca6edefbfeb52
18 changes: 10 additions & 8 deletions trunk/arch/powerpc/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ void __kprobes program_check_exception(struct pt_regs *regs)

void alignment_exception(struct pt_regs *regs)
{
int fixed = 0;
int sig, code, fixed = 0;

/* we don't implement logging of alignment exceptions */
if (!(current->thread.align_ctl & PR_UNALIGN_SIGBUS))
Expand All @@ -857,14 +857,16 @@ void alignment_exception(struct pt_regs *regs)

/* Operand address was bad */
if (fixed == -EFAULT) {
if (user_mode(regs))
_exception(SIGSEGV, regs, SEGV_ACCERR, regs->dar);
else
/* Search exception table */
bad_page_fault(regs, regs->dar, SIGSEGV);
return;
sig = SIGSEGV;
code = SEGV_ACCERR;
} else {
sig = SIGBUS;
code = BUS_ADRALN;
}
_exception(SIGBUS, regs, BUS_ADRALN, regs->dar);
if (user_mode(regs))
_exception(sig, regs, code, regs->dar);
else
bad_page_fault(regs, regs->dar, sig);
}

void StackOverflow(struct pt_regs *regs)
Expand Down
18 changes: 10 additions & 8 deletions trunk/arch/ppc/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ void single_step_exception(struct pt_regs *regs)

void alignment_exception(struct pt_regs *regs)
{
int fixed;
int sig, code, fixed = 0;

fixed = fix_alignment(regs);
if (fixed == 1) {
Expand All @@ -717,14 +717,16 @@ void alignment_exception(struct pt_regs *regs)
return;
}
if (fixed == -EFAULT) {
/* fixed == -EFAULT means the operand address was bad */
if (user_mode(regs))
_exception(SIGSEGV, regs, SEGV_ACCERR, regs->dar);
else
bad_page_fault(regs, regs->dar, SIGSEGV);
return;
sig = SIGSEGV;
code = SEGV_ACCERR;
} else {
sig = SIGBUS;
code = BUS_ADRALN;
}
_exception(SIGBUS, regs, BUS_ADRALN, regs->dar);
if (user_mode(regs))
_exception(sig, regs, code, regs->dar);
else
bad_page_fault(regs, regs->dar, sig);
}

void StackOverflow(struct pt_regs *regs)
Expand Down

0 comments on commit 2508f34

Please sign in to comment.