aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/signal_64.c
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2013-09-22 22:04:43 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-10-11 01:48:32 -0400
commite871c6bbf66c1b44af0fb925427e957301e2e1ff (patch)
tree8f3d994b7ffab062c343c8f2f8010248acda5eb3 /arch/powerpc/kernel/signal_64.c
parentef1967ff875d58c290108f9c6872a53a79855c4b (diff)
powerpc: Reset MSR_LE on signal entry
We always take signals in big endian which is wrong. Signals should be taken in native endian. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/signal_64.c')
-rw-r--r--arch/powerpc/kernel/signal_64.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
index f93ec2835a13..8b51b0278106 100644
--- a/arch/powerpc/kernel/signal_64.c
+++ b/arch/powerpc/kernel/signal_64.c
@@ -773,8 +773,9 @@ int handle_rt_signal64(int signr, struct k_sigaction *ka, siginfo_t *info,
773 773
774 /* Set up "regs" so we "return" to the signal handler. */ 774 /* Set up "regs" so we "return" to the signal handler. */
775 err |= get_user(regs->nip, &funct_desc_ptr->entry); 775 err |= get_user(regs->nip, &funct_desc_ptr->entry);
776 /* enter the signal handler in big-endian mode */ 776 /* enter the signal handler in native-endian mode */
777 regs->msr &= ~MSR_LE; 777 regs->msr &= ~MSR_LE;
778 regs->msr |= (MSR_KERNEL & MSR_LE);
778 regs->gpr[1] = newsp; 779 regs->gpr[1] = newsp;
779 err |= get_user(regs->gpr[2], &funct_desc_ptr->toc); 780 err |= get_user(regs->gpr[2], &funct_desc_ptr->toc);
780 regs->gpr[3] = signr; 781 regs->gpr[3] = signr;