Skip to content

Commit

Permalink
[SPARC64]: Loosen checks in exception table handling.
Browse files Browse the repository at this point in the history
Some parts of the kernel now do things like do *_user() accesses while
set_fs(KERNEL_DS) that fault on purpose.

See, for example, the code added by changeset
a0c1e90 ("futex: runtime enable pi
and robust functionality").

That trips up the ASI sanity checking we make in do_kernel_fault().

Just remove it for now.  Maybe we can add it back later with an added
conditional which looks at the current get_fs() value.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Feb 27, 2008
1 parent 896aef4 commit 622eaec
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions arch/sparc64/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,8 @@ static void do_kernel_fault(struct pt_regs *regs, int si_code, int fault_code,
if (regs->tstate & TSTATE_PRIV) {
const struct exception_table_entry *entry;

if (asi == ASI_P && (insn & 0xc0800000) == 0xc0800000) {
if (insn & 0x2000)
asi = (regs->tstate >> 24);
else
asi = (insn >> 5);
}

/* Look in asi.h: All _S asis have LS bit set */
if ((asi & 0x1) &&
(entry = search_exception_tables(regs->tpc))) {
entry = search_exception_tables(regs->tpc);
if (entry) {
regs->tpc = entry->fixup;
regs->tnpc = regs->tpc + 4;
return;
Expand Down

0 comments on commit 622eaec

Please sign in to comment.