On Tue, Jun 28, 2022 at 5:13 PM Ard Biesheuvel ardb@kernel.org wrote:
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 Signed-off-by: Ard Biesheuvel ardb@kernel.org
A genuine piece of art to track this down. Thanks! Reviewed-by: Linus Walleij linus.walleij@linaro.org
Yours, Linus Walleij