WSL2-Linux-Kernel/arch/arm/probes
Ard Biesheuvel 2a098504d7 ARM: 9214/1: alignment: advance IT state after emulating Thumb instruction
commit e5c46fde75 upstream.

After emulating a misaligned load or store issued in Thumb mode, we have
to advance the IT state by hand, or it will get out of sync with the
actual instruction stream, which means we'll end up applying the wrong
condition code to subsequent instructions. This might corrupt the
program state rather catastrophically.

So borrow the it_advance() helper from the probing code, and use it on
CPSR if the emulated instruction is Thumb.

Cc: <stable@vger.kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-21 21:24:12 +02:00
..
kprobes ARM: 9170/1: fix panic when kasan and kprobe are enabled 2022-02-01 17:27:07 +01:00
uprobes ARM: 9071/1: uprobes: Don't hook on thumb instructions 2021-04-18 19:14:45 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
decode-arm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
decode-arm.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 159 2019-05-30 11:26:37 -07:00
decode-thumb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
decode-thumb.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 159 2019-05-30 11:26:37 -07:00
decode.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
decode.h ARM: 9214/1: alignment: advance IT state after emulating Thumb instruction 2022-07-21 21:24:12 +02:00