01 Dec, 2011

2 commits

  • The SWP instruction is deprecated on ARMv6 and with ARMv7 it will be
    UNDEFINED when CONFIG_SWP_EMULATE is selected. In this case, probing a
    SWP instruction will cause an oops when the kprobes emulation code
    executes an undefined instruction.

    As the SWP instruction should be rare or non-existent in kernels for
    ARMv6 and later, we can simply avoid these problems by not allowing
    probing of these.

    Reported-by: Leif Lindholm
    Tested-by: Leif Lindholm
    Acked-by: Nicolas Pitre
    Signed-off-by: Jon Medhurst
    Signed-off-by: Russell King

    Jon Medhurst (Tixy)
     
  • There is a kprobes testcase for the instruction "strd r2, [r3], r4".
    This has unpredictable behaviour as it uses r3 for register writeback
    addressing and also stores it to memory.

    On a cortex A9, this testcase would fail because the instruction writes
    the updated value of r3 to memory, whereas the kprobes emulation code
    writes the original value.

    Fix this by changing testcase to used r5 instead of r3.

    Reported-by: Leif Lindholm
    Tested-by: Leif Lindholm
    Acked-by: Nicolas Pitre
    Signed-off-by: Jon Medhurst
    Signed-off-by: Russell King

    Jon Medhurst (Tixy)
     

21 Sep, 2011

1 commit