Revert "arm64: probes: Remove broken LDR (literal) uprobe support"
This reverts commit ff921f0c79
.
This commit is contained in:
parent
1b5a5af29c
commit
b53604d807
1 changed files with 5 additions and 11 deletions
|
@ -99,6 +99,10 @@ arm_probe_decode_insn(probe_opcode_t insn, struct arch_probe_insn *api)
|
||||||
aarch64_insn_is_blr(insn) ||
|
aarch64_insn_is_blr(insn) ||
|
||||||
aarch64_insn_is_ret(insn)) {
|
aarch64_insn_is_ret(insn)) {
|
||||||
api->handler = simulate_br_blr_ret;
|
api->handler = simulate_br_blr_ret;
|
||||||
|
} else if (aarch64_insn_is_ldr_lit(insn)) {
|
||||||
|
api->handler = simulate_ldr_literal;
|
||||||
|
} else if (aarch64_insn_is_ldrsw_lit(insn)) {
|
||||||
|
api->handler = simulate_ldrsw_literal;
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* Instruction cannot be stepped out-of-line and we don't
|
* Instruction cannot be stepped out-of-line and we don't
|
||||||
|
@ -136,17 +140,6 @@ arm_kprobe_decode_insn(kprobe_opcode_t *addr, struct arch_specific_insn *asi)
|
||||||
probe_opcode_t insn = le32_to_cpu(*addr);
|
probe_opcode_t insn = le32_to_cpu(*addr);
|
||||||
probe_opcode_t *scan_end = NULL;
|
probe_opcode_t *scan_end = NULL;
|
||||||
unsigned long size = 0, offset = 0;
|
unsigned long size = 0, offset = 0;
|
||||||
struct arch_probe_insn *api = &asi->api;
|
|
||||||
|
|
||||||
if (aarch64_insn_is_ldr_lit(insn)) {
|
|
||||||
api->handler = simulate_ldr_literal;
|
|
||||||
decoded = INSN_GOOD_NO_SLOT;
|
|
||||||
} else if (aarch64_insn_is_ldrsw_lit(insn)) {
|
|
||||||
api->handler = simulate_ldrsw_literal;
|
|
||||||
decoded = INSN_GOOD_NO_SLOT;
|
|
||||||
} else {
|
|
||||||
decoded = arm_probe_decode_insn(insn, &asi->api);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If there's a symbol defined in front of and near enough to
|
* If there's a symbol defined in front of and near enough to
|
||||||
|
@ -164,6 +157,7 @@ arm_kprobe_decode_insn(kprobe_opcode_t *addr, struct arch_specific_insn *asi)
|
||||||
else
|
else
|
||||||
scan_end = addr - MAX_ATOMIC_CONTEXT_SIZE;
|
scan_end = addr - MAX_ATOMIC_CONTEXT_SIZE;
|
||||||
}
|
}
|
||||||
|
decoded = arm_probe_decode_insn(insn, &asi->api);
|
||||||
|
|
||||||
if (decoded != INSN_REJECTED && scan_end)
|
if (decoded != INSN_REJECTED && scan_end)
|
||||||
if (is_probed_address_atomic(addr - 1, scan_end))
|
if (is_probed_address_atomic(addr - 1, scan_end))
|
||||||
|
|
Loading…
Add table
Reference in a new issue