Skip to content

Commit d0e0257

Browse files
rostedtacmel
authored andcommitted
trace/kprobes: Add back warning about offset in return probes
Let's not remove the warning about offsets and return probes when the offset is invalid. Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/20170227115204.00f92846@gandalf.local.home Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent f1c4d1a commit d0e0257

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎kernel/trace/trace_kprobe.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,11 @@ static int create_trace_kprobe(int argc, char **argv)
695695
pr_info("Failed to parse symbol.\n");
696696
return ret;
697697
}
698+
if (offset && is_return &&
699+
!arch_function_offset_within_entry(offset)) {
700+
pr_info("Given offset is not valid for return probe.\n");
701+
return -EINVAL;
702+
}
698703
}
699704
argc -= 2; argv += 2;
700705

0 commit comments

Comments
 (0)