summaryrefslogtreecommitdiffstats
path: root/arch/sparc/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-29 08:03:48 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-29 08:03:48 -0700
commitc07724e5b868c603f2a65f3855c77b23454db3ed (patch)
tree658b1f0af5966e418f48a53e8b2f97e10b250f4f /arch/sparc/mm
parent302f5bc54448bd2b37d5a8be9b6abc29397827ef (diff)
parente69f58c037ab5b166b3858fa7b5d7fa470613e8f (diff)
downloadop-kernel-dev-c07724e5b868c603f2a65f3855c77b23454db3ed.zip
op-kernel-dev-c07724e5b868c603f2a65f3855c77b23454db3ed.tar.gz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: kbuild: add ARCH=sparc32 target sparc32: fix build failure on CONFIG_SPARC_LEON sparc: Fixed random SPARC/LEON SMP CPU Stuck problem. sparc32: remove CONFIG_HAVE_PERF_EVENTS option sparc: don't #include asm/system.h in asm/jump_label.h sparc32: Fix unaligned stack handling on trap return. sparc: keep calling do_signal() as long as pending signals remain
Diffstat (limited to 'arch/sparc/mm')
-rw-r--r--arch/sparc/mm/fault_32.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c
index bd86016..5b836f5 100644
--- a/arch/sparc/mm/fault_32.c
+++ b/arch/sparc/mm/fault_32.c
@@ -539,6 +539,12 @@ do_sigbus:
__do_fault_siginfo(BUS_ADRERR, SIGBUS, tsk->thread.kregs, address);
}
+static void check_stack_aligned(unsigned long sp)
+{
+ if (sp & 0x7UL)
+ force_sig(SIGILL, current);
+}
+
void window_overflow_fault(void)
{
unsigned long sp;
@@ -547,6 +553,8 @@ void window_overflow_fault(void)
if(((sp + 0x38) & PAGE_MASK) != (sp & PAGE_MASK))
force_user_fault(sp + 0x38, 1);
force_user_fault(sp, 1);
+
+ check_stack_aligned(sp);
}
void window_underflow_fault(unsigned long sp)
@@ -554,6 +562,8 @@ void window_underflow_fault(unsigned long sp)
if(((sp + 0x38) & PAGE_MASK) != (sp & PAGE_MASK))
force_user_fault(sp + 0x38, 0);
force_user_fault(sp, 0);
+
+ check_stack_aligned(sp);
}
void window_ret_fault(struct pt_regs *regs)
@@ -564,4 +574,6 @@ void window_ret_fault(struct pt_regs *regs)
if(((sp + 0x38) & PAGE_MASK) != (sp & PAGE_MASK))
force_user_fault(sp + 0x38, 0);
force_user_fault(sp, 0);
+
+ check_stack_aligned(sp);
}
OpenPOWER on IntegriCloud