]> Git Repo - linux.git/commit
kretprobes: Ensure probe location is at function entry
authorNaveen N. Rao <[email protected]>
Wed, 22 Feb 2017 13:53:37 +0000 (19:23 +0530)
committerArnaldo Carvalho de Melo <[email protected]>
Fri, 3 Mar 2017 22:07:17 +0000 (19:07 -0300)
commit90ec5e89e393c76e19afc845d8f88a5dc8315919
tree95fe1e1d60938f6a3102ce9bbff8ed99cdb072b4
parent583359646fde8526ea9456618cc24dc359b34094
kretprobes: Ensure probe location is at function entry

kretprobes can be registered by specifying an absolute address or by
specifying offset to a symbol. However, we need to ensure this falls at
function entry so as to be able to determine the return address.

Validate the same during kretprobe registration. By default, there
should not be any offset from a function entry, as determined through a
kallsyms_lookup(). Introduce arch_function_offset_within_entry() as a
way for architectures to override this.

Signed-off-by: Naveen N. Rao <[email protected]>
Acked-by: Masami Hiramatsu <[email protected]>
Cc: Ananth N Mavinakayanahalli <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/f1583bc4839a3862cfc2acefcc56f9c8837fa2ba.1487770934.git.naveen.n.rao@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
include/linux/kprobes.h
kernel/kprobes.c
This page took 0.059251 seconds and 4 git commands to generate.