summaryrefslogtreecommitdiff
path: root/kernel/trace/trace_kprobe.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2013-11-25 08:42:47 +0400
committerSteven Rostedt <rostedt@goodmis.org>2014-01-03 05:57:05 +0400
commitb7e0bf341f6cfa92ae0a0e3d0c3496729595e1e9 (patch)
tree0831ae7ab363f3789c5cb14bbf4973bfe17287bc /kernel/trace/trace_kprobe.c
parent72fd293aa9ae8f4f48d6042be43fe81551c639f2 (diff)
downloadlinux-b7e0bf341f6cfa92ae0a0e3d0c3496729595e1e9.tar.xz
tracing/uprobes: Add @+file_offset fetch method
Enable to fetch data from a file offset. Currently it only supports fetching from same binary uprobe set. It'll translate the file offset to a proper virtual address in the process. The syntax is "@+OFFSET" as it does similar to normal memory fetching (@ADDR) which does no address translation. Suggested-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: zhangwei(Jovi) <jovi.zhangwei@huawei.com> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'kernel/trace/trace_kprobe.c')
-rw-r--r--kernel/trace/trace_kprobe.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index f94a56915e69..ce0ed8afb77e 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -239,6 +239,14 @@ DEFINE_BASIC_FETCH_FUNCS(symbol)
DEFINE_FETCH_symbol(string)
DEFINE_FETCH_symbol(string_size)
+/* kprobes don't support file_offset fetch methods */
+#define fetch_file_offset_u8 NULL
+#define fetch_file_offset_u16 NULL
+#define fetch_file_offset_u32 NULL
+#define fetch_file_offset_u64 NULL
+#define fetch_file_offset_string NULL
+#define fetch_file_offset_string_size NULL
+
/* Fetch type information table */
const struct fetch_type kprobes_fetch_type_table[] = {
/* Special types */