On Sun, 2013-12-15 at 23:08 -0500, David Long wrote:From: "David A. Long" <dave.long@xxxxxxxxxx>
Using Rabin Vincent's ARM uprobes patches as a base, enable uprobes
support on ARM.
Caveats:
- Thumb is not supported
- XOL abort/trap handling is not implemented
I shall repeat my comment from version one of the patch...
What are the consequences of this, e.g. is it possible for a probe to
get stuck in an infinite loop of faulting? I hope there are no integrity
issues for the kernel itself.
Would be good if someone familiar with uprobes working could answer
that.
I've a few other comments...
+const union decode_item uprobes_probes_actions[] = {
+ [PROBES_EMULATE_NONE] {.handler = probes_simulate_nop},
There is a missing '=' in the line above. Interesting that GCC doesn't
complain (I tried compiling this patch and it didn't).
+bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs)
+{
+ void *addr;
'addr' is not used so this line can be deleted
+ probes_opcode_t opcode;
+
+ if (!auprobe->simulate)
+ return false;
+
+ addr = (void *) regs->ARM_pc;
and so can this line ^^^
+ opcode = __mem_to_opcode_arm(*(unsigned int *) auprobe->insn);
+
+ auprobe->asi.insn_singlestep(opcode, &auprobe->asi, regs);
+
+ return true;
+}
+
[rest of patch snipped]