android_kernel_xiaomi_sm7250/arch/arm/probes
Ard Biesheuvel b1ef24a9eb ARM: 9214/1: alignment: advance IT state after emulating Thumb instruction
commit e5c46fde75e43c15a29b40e5fc5641727f97ae47 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:09:26 +02:00
..
kprobes ARM: 9139/1: kprobes: fix arch_init_kprobes() prototype 2021-11-02 18:26:43 +01:00
uprobes ARM: 9071/1: uprobes: Don't hook on thumb instructions 2021-04-28 13:16:51 +02:00
decode-arm.c ARM: kprobes: introduces checker 2015-01-09 09:36:51 +00:00
decode-arm.h ARM: kprobes: introduces checker 2015-01-09 09:36:51 +00:00
decode-thumb.c ARM: kprobes: introduces checker 2015-01-09 09:36:51 +00:00
decode-thumb.h ARM: kprobes: introduces checker 2015-01-09 09:36:51 +00:00
decode.c ARM: kprobes: check register usage for probed instruction. 2015-01-13 16:10:48 +00:00
decode.h ARM: 9214/1: alignment: advance IT state after emulating Thumb instruction 2022-07-21 21:09:26 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00