diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-02-20 12:22:52 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-02 09:46:52 -0500 |
commit | eaa6ef804e319a9c64a0d818d48d659f42e3c7f0 (patch) | |
tree | d1460b30c01c5c7991dd6bb18703b671967c5275 /arch/arm | |
parent | 521b1e63dea72a58dc5d279587f482b031c69a4d (diff) |
ARM: Ensure predictable endian state on signal handler entry
commit 53399053eb505cf541b2405bd9d9bca5ecfb96fb upstream.
Ensure a predictable endian state when entering signal handlers. This
avoids programs which use SETEND to momentarily switch their endian
state from having their signal handlers entered with an unpredictable
endian state.
Acked-by: Dave Martin <dave.martin@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/kernel/signal.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index e7714f367eb..962236acfee 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c @@ -389,7 +389,9 @@ setup_return(struct pt_regs *regs, struct k_sigaction *ka, unsigned long handler = (unsigned long)ka->sa.sa_handler; unsigned long retcode; int thumb = 0; - unsigned long cpsr = regs->ARM_cpsr & ~PSR_f; + unsigned long cpsr = regs->ARM_cpsr & ~(PSR_f | PSR_E_BIT); + + cpsr |= PSR_ENDSTATE; /* * Maybe we need to deliver a 32-bit signal to a 26-bit task. |