• Jon Medhurst's avatar
    ARM: kprobes: Fix emulation of LDRD and STRD instructions · 5c6b76fc
    Jon Medhurst authored
    The decoding of these instructions got the register indexed and
    immediate indexed forms the wrong way around, causing incorrect
    emulation.
    
    Instructions like "LDRD Rx, [Rx]" were corrupting Rx because the base
    register writeback was being performed unconditionally, overwriting the
    value just loaded from memory. The fix is to only writeback the base
    register when that form of the instruction is used. Note, now that we
    reject probing writeback with PC the emulation code doesn't need the
    check rn!=15.
    Signed-off-by: default avatarJon Medhurst <tixy@yxit.co.uk>
    Signed-off-by: default avatarNicolas Pitre <nicolas.pitre@linaro.org>
    5c6b76fc
kprobes-decode.c 53.1 KB