summaryrefslogtreecommitdiff
path: root/include/linux/trace_events.h
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@fb.com>2016-04-07 04:43:28 +0300
committerDavid S. Miller <davem@davemloft.net>2016-04-08 04:04:26 +0300
commit32bbe0078afe86a8bf4c67c6b3477781b15e94dc (patch)
tree8c5290f51108de3a2c98cb7171942fb9d5e36ab2 /include/linux/trace_events.h
parent9940d67c93b5bb7ddcf862b41b1847cb728186c4 (diff)
downloadlinux-32bbe0078afe86a8bf4c67c6b3477781b15e94dc.tar.xz
bpf: sanitize bpf tracepoint access
during bpf program loading remember the last byte of ctx access and at the time of attaching the program to tracepoint check that the program doesn't access bytes beyond defined in tracepoint fields This also disallows access to __dynamic_array fields, but can be relaxed in the future. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/trace_events.h')
-rw-r--r--include/linux/trace_events.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
index 56f795e6a093..fe6441203b59 100644
--- a/include/linux/trace_events.h
+++ b/include/linux/trace_events.h
@@ -569,6 +569,7 @@ extern int trace_define_field(struct trace_event_call *call, const char *type,
int is_signed, int filter_type);
extern int trace_add_event_call(struct trace_event_call *call);
extern int trace_remove_event_call(struct trace_event_call *call);
+extern int trace_event_get_offsets(struct trace_event_call *call);
#define is_signed_type(type) (((type)(-1)) < (type)1)