]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: fix Thumb2 signal handling when ARMv6 is enabled
authorRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 11 Sep 2015 15:44:02 +0000 (16:44 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 16 Sep 2015 09:35:40 +0000 (10:35 +0100)
commit99cf96d17b4b0946b64b11995b379ebf006baff4
tree4e995bc3a516baeefb1ba4a053c9a3e7a100ffb3
parent7b431d973dda8829abe7d5fe34335a101fc27f84
ARM: fix Thumb2 signal handling when ARMv6 is enabled

When a kernel is built covering ARMv6 to ARMv7, we omit to clear the
IT state when entering a signal handler.  This can cause the first
few instructions to be conditionally executed depending on the parent
context.

In any case, the original test for >= ARMv7 is broken - ARMv6 can have
Thumb-2 support as well, and an ARMv6T2 specific build would omit this
code too.

Relax the test back to ARMv6 or greater.  This results in us always
clearing the IT state bits in the PSR, even on CPUs where these bits
are reserved.  However, they're reserved for the IT state, so this
should cause no harm.

Cc: <stable@vger.kernel.org>
Fixes: e11a4689730b ("Clear the IT state when invoking a Thumb-2 signal handler")
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: H. Nikolaus Schaller <hns@goldelico.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/signal.c