tree 84a2658515c58c5a713000cd3b5671e5a6df99ba
parent 9188ab65ea66c57f16c22cfd8fc4017126efa59f
author Paul Mackerras <[EMAIL PROTECTED]> Tue Apr 12 08:24:51 2005
committer Linus Torvalds <[EMAIL PROTECTED]> Tue Apr 12 08:24:51 2005
[PATCH] ppc32: oops on kernel altivec assist exceptions
If we should happen to get an altivec assist exception while executing in
the kernel, we will currently try to handle it and fail, and end up oopsing
with (apparently) a segfault. (An altivec assist exception occurs for
floating-point altivec instructions with denormalized inputs or outputs if
the altivec unit is in java mode.)
This patch checks explicitly if we are in user mode and prints a useful
message if not.
Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
traps.c | 7 +++++++
1 files changed, 7 insertions(+)
Index: arch/ppc/kernel/traps.c
===================================================================
--- c0c0b444ac86337cfab98ecfc9236e93ad5d5d73/arch/ppc/kernel/traps.c
(mode:100644 sha1:a8ff3f237ed59b2ca30af1f4e8c59b626e79501e)
+++ 84a2658515c58c5a713000cd3b5671e5a6df99ba/arch/ppc/kernel/traps.c
(mode:100644 sha1:4deea8aa11392dc23745cc73f4eb765d0012a162)
@@ -805,6 +805,13 @@
if (regs->msr & MSR_VEC)
giveup_altivec(current);
preempt_enable();
+ if (!user_mode(regs)) {
+ printk(KERN_ERR "altivec assist exception in kernel mode"
+ " at %lx\n", regs->nip);
+ debugger(regs);
+ die("altivec assist exception", regs, SIGFPE);
+ return;
+ }
err = emulate_altivec(regs);
if (err == 0) {
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html