diff options
author | Anton Blanchard <anton@samba.org> | 2013-09-23 12:04:43 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-10-11 16:48:32 +1100 |
commit | e871c6bbf66c1b44af0fb925427e957301e2e1ff (patch) | |
tree | 8f3d994b7ffab062c343c8f2f8010248acda5eb3 /arch/powerpc/kernel/signal_64.c | |
parent | ef1967ff875d58c290108f9c6872a53a79855c4b (diff) | |
download | linux-e871c6bbf66c1b44af0fb925427e957301e2e1ff.tar.gz linux-e871c6bbf66c1b44af0fb925427e957301e2e1ff.tar.bz2 linux-e871c6bbf66c1b44af0fb925427e957301e2e1ff.zip |
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.c | 3 |
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, /* Set up "regs" so we "return" to the signal handler. */ err |= get_user(regs->nip, &funct_desc_ptr->entry); - /* enter the signal handler in big-endian mode */ + /* enter the signal handler in native-endian mode */ regs->msr &= ~MSR_LE; + regs->msr |= (MSR_KERNEL & MSR_LE); regs->gpr[1] = newsp; err |= get_user(regs->gpr[2], &funct_desc_ptr->toc); regs->gpr[3] = signr; |