]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: convert relevant helper args to ARG_PTR_TO_RAW_STACK
authorDaniel Borkmann <daniel@iogearbox.net>
Tue, 12 Apr 2016 22:10:52 +0000 (00:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Apr 2016 01:40:41 +0000 (21:40 -0400)
commit477c7e5faa017eb6e568de9048f3e74132d72a18
treee42352604c4f0db159881faff4b7cef49393d878
parent20409f4598d457da62c309ee0872df230758bcfd
bpf: convert relevant helper args to ARG_PTR_TO_RAW_STACK

This patch converts all helpers that can use ARG_PTR_TO_RAW_STACK as argument
type. For tc programs this is bpf_skb_load_bytes(), bpf_skb_get_tunnel_key(),
bpf_skb_get_tunnel_opt(). For tracing, this optimizes bpf_get_current_comm()
and bpf_probe_read(). The check in bpf_skb_load_bytes() for MAX_BPF_STACK can
also be removed since the verifier already makes sure we stay within bounds
on stack buffers.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/bpf/helpers.c
kernel/trace/bpf_trace.c
net/core/filter.c