summaryrefslogtreecommitdiffstats
path: root/arch/mips/mm
diff options
context:
space:
mode:
authorManeesh Soni2011-11-08 12:38:26 +0100
committerRalf Baechle2011-12-07 23:04:03 +0100
commit6457a396bbc20656009eaf950ca165912a943520 (patch)
tree5a940616d2b1b55f182d4022a39c4d37a9cda1e7 /arch/mips/mm
parentMIPS Kprobes: Refactor branch emulation (diff)
downloadkernel-qcow2-linux-6457a396bbc20656009eaf950ca165912a943520.tar.gz
kernel-qcow2-linux-6457a396bbc20656009eaf950ca165912a943520.tar.xz
kernel-qcow2-linux-6457a396bbc20656009eaf950ca165912a943520.zip
MIPS Kprobes: Support branch instructions probing
This patch provides support for kprobes on branch instructions. The branch instruction at the probed address is actually emulated and not executed out-of-line like other normal instructions. Instead the delay-slot instruction is copied and single stepped out of line. At the time of probe hit, the original branch instruction is evaluated and the target cp0_epc is computed similar to compute_retrun_epc(). It is also checked if the delay slot instruction can be skipped, which is true if there is a NOP in delay slot or branch is taken in case of branch likely instructions. Once the delay slot instruction is single stepped the normal execution resume with the cp0_epc updated the earlier computed cp0_epc as per the branch instructions. Signed-off-by: Maneesh Soni <manesoni@cisco.com> Signed-off-by: Victor Kamensky <kamensky@cisco.com> Cc: David Daney <david.daney@cavium.com> Cc: ananth@in.ibm.com Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2914/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mm')
0 files changed, 0 insertions, 0 deletions