From: Philipp R. <pr...@pa...> - 2000-11-20 16:05:12
|
On Mon, Nov 20, 2000 at 03:27:01PM +0100, Jesper Skov wrote: > >>>>> "David" == David Woodhouse <dw...@in...> writes: > David> You mean to search the exception table before attempting the > David> fixup, and to refuse to do the fixup if there's an entry for > David> $pc? I don't like that very much. I think we _should_ be fixing > David> up unaligned userspace accesses. Not only when they're accessed > David> from the kernel, but when they happen entirely in userspace. > > I don't agree. Nasty DOS you could get out of that - simply make an > infinite loop read from odd addresses and the kernel will be wasting > tons of time fixing up those accesses. User space apps should die if > they do unaligned access. AIUI, the main cost of emulating unaligned accesses is the user->kernel-> user context switch. user->kernel->SIGBUS handler->user shouldn't be significantly more expensive but avoid all security holes I know about. > David> At the moment, I'm more concerned about what happens when the > David> offending insn is in a branch delay slot. It looks like > David> regs->pc will be pointing to the branch insn iff it was taken, > David> so in that case, we have to fix up the insn at $pc+2 and then > David> also emulate the branch insn follow the branch. > > Urgh. Messy. delay slots are :/ |