Re: [PATCH] ARM: alignment: advance IT state after emulating Thumb instruction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 28, 2022 at 5:13 PM Ard Biesheuvel <ardb@xxxxxxxxxx> 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@xxxxxxxxxxxxxxx>
> Signed-off-by: Ard Biesheuvel <ardb@xxxxxxxxxx>

A genuine piece of art to track this down. Thanks!
Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Yours,
Linus Walleij



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux