[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHkRjk7N8-f5_oEkowqMRgppZQTQDxsR_OYGEhtjS34cTjw2=g@mail.gmail.com>
Date: Mon, 4 Nov 2013 12:11:40 +0000
From: Catalin Marinas <catalin.marinas@....com>
To: "T.J. Purtell" <tj@...isocial.us>
Cc: Russell King - ARM Linux <linux@....linux.org.uk>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Rodrigo Kumpera <kumpera@...arin.com>,
Mark Probst <mark@...arin.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [Patch] arm/arm64: Thumb=>ARM signal handling setup skips the a
few instructions on Snapdragon S4/Krait
(cc'ing the Linux ARM kernel list)
On 25 October 2013 05:54, T.J. Purtell <tj@...isocial.us> wrote:
> The ARM architecture reference specifies that the IT state bits in the
> PSR must be all zeros in ARM mode or behavior is unspecified. On the
> Qualcomm Snapdragon S4/Krait architecture CPUs the processor continues
> to consider the IT state bits while in ARM mode. This makes it so
> that some instructions are skipped by the CPU.
Good catch.
> diff --git a/arch/arm64/kernel/signal32.c b/arch/arm64/kernel/signal32.c
> index e393174..8f6c3be 100644
> --- a/arch/arm64/kernel/signal32.c
> +++ b/arch/arm64/kernel/signal32.c
> @@ -474,9 +474,11 @@ static void compat_setup_return(struct pt_regs
> *regs, struct k_sigaction *ka,
> /* Check if the handler is written for ARM or Thumb */
> thumb = handler & 1;
>
> + /* ARM spec requires this to be all 000s in ARM mode */
> + spsr &= ~COMPAT_PSR_IT_MASK;
> +
> if (thumb) {
> spsr |= COMPAT_PSR_T_BIT;
> - spsr &= ~COMPAT_PSR_IT_MASK;
> } else {
> spsr &= ~COMPAT_PSR_T_BIT;
> }
Please send me a separate arm64 patch, I'll push it via my tree (and
cc stable as well).
Catalin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists