diff options
author | Oleg Nesterov <oleg@redhat.com> | 2012-08-08 12:07:03 -0400 |
---|---|---|
committer | Oleg Nesterov <oleg@redhat.com> | 2012-08-28 12:21:20 -0400 |
commit | ded86e7c8fc4404414c4700010c9962ea8bd083a (patch) | |
tree | 39528d3fd485701e239fed27e2f646c5fd0d53d5 /kernel | |
parent | 61559a8165da2b6bab7621ac36379c6280efacb6 (diff) |
uprobes: Remove "verify" argument from set_orig_insn()
Nobody does set_orig_insn(verify => false), and I think nobody will.
Remove this argument. IIUC set_orig_insn(verify => false) was needed
to single-step without xol area.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/events/uprobes.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index 610e1c8050cf..1666632e6edf 100644 --- a/kernel/events/uprobes.c +++ b/kernel/events/uprobes.c | |||
@@ -345,24 +345,22 @@ int __weak set_swbp(struct arch_uprobe *auprobe, struct mm_struct *mm, unsigned | |||
345 | * @mm: the probed process address space. | 345 | * @mm: the probed process address space. |
346 | * @auprobe: arch specific probepoint information. | 346 | * @auprobe: arch specific probepoint information. |
347 | * @vaddr: the virtual address to insert the opcode. | 347 | * @vaddr: the virtual address to insert the opcode. |
348 | * @verify: if true, verify existance of breakpoint instruction. | ||
349 | * | 348 | * |
350 | * For mm @mm, restore the original opcode (opcode) at @vaddr. | 349 | * For mm @mm, restore the original opcode (opcode) at @vaddr. |
351 | * Return 0 (success) or a negative errno. | 350 | * Return 0 (success) or a negative errno. |
352 | */ | 351 | */ |
353 | int __weak | 352 | int __weak |
354 | set_orig_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, unsigned long vaddr, bool verify) | 353 | set_orig_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, unsigned long vaddr) |
355 | { | 354 | { |
356 | if (verify) { | 355 | int result; |
357 | int result; | 356 | |
357 | result = is_swbp_at_addr(mm, vaddr); | ||
358 | if (!result) | ||
359 | return -EINVAL; | ||
358 | 360 | ||
359 | result = is_swbp_at_addr(mm, vaddr); | 361 | if (result != 1) |
360 | if (!result) | 362 | return result; |
361 | return -EINVAL; | ||
362 | 363 | ||
363 | if (result != 1) | ||
364 | return result; | ||
365 | } | ||
366 | return write_opcode(auprobe, mm, vaddr, *(uprobe_opcode_t *)auprobe->insn); | 364 | return write_opcode(auprobe, mm, vaddr, *(uprobe_opcode_t *)auprobe->insn); |
367 | } | 365 | } |
368 | 366 | ||
@@ -697,7 +695,7 @@ install_breakpoint(struct uprobe *uprobe, struct mm_struct *mm, | |||
697 | static void | 695 | static void |
698 | remove_breakpoint(struct uprobe *uprobe, struct mm_struct *mm, unsigned long vaddr) | 696 | remove_breakpoint(struct uprobe *uprobe, struct mm_struct *mm, unsigned long vaddr) |
699 | { | 697 | { |
700 | set_orig_insn(&uprobe->arch, mm, vaddr, true); | 698 | set_orig_insn(&uprobe->arch, mm, vaddr); |
701 | } | 699 | } |
702 | 700 | ||
703 | /* | 701 | /* |