]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: sanitize bpf tracepoint access
authorAlexei Starovoitov <ast@fb.com>
Thu, 7 Apr 2016 01:43:28 +0000 (18:43 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Apr 2016 01:04:26 +0000 (21:04 -0400)
commitdddc8bbf135d7acf8dba722f6ce61a756aff7e34
tree8c5290f51108de3a2c98cb7171942fb9d5e36ab2
parent3171bc7252c5912d90804fd49d85ac3351bc39f6
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>
include/linux/bpf.h
include/linux/trace_events.h
kernel/bpf/verifier.c
kernel/events/core.c
kernel/trace/trace_events.c