diff options
author | David S. Miller <davem@davemloft.net> | 2020-07-13 18:04:05 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-13 18:04:05 -0700 |
commit | 07dd1b7e68e4b83a1004b14dffd7e142c0bc79bd (patch) | |
tree | 06a5898494308d55fcecbb3dff647d93c01afe47 /net/core | |
parent | bfe4c40333065639cf0f364b8ea9e93270781699 (diff) | |
parent | 8afb259a9840fa953efb9a7835356a083ac8ec74 (diff) | |
download | linux-stable-07dd1b7e68e4b83a1004b14dffd7e142c0bc79bd.tar.gz linux-stable-07dd1b7e68e4b83a1004b14dffd7e142c0bc79bd.tar.bz2 linux-stable-07dd1b7e68e4b83a1004b14dffd7e142c0bc79bd.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next
Alexei Starovoitov says:
====================
pull-request: bpf-next 2020-07-13
The following pull-request contains BPF updates for your *net-next* tree.
We've added 36 non-merge commits during the last 7 day(s) which contain
a total of 62 files changed, 2242 insertions(+), 468 deletions(-).
The main changes are:
1) Avoid trace_printk warning banner by switching bpf_trace_printk to use
its own tracing event, from Alan.
2) Better libbpf support on older kernels, from Andrii.
3) Additional AF_XDP stats, from Ciara.
4) build time resolution of BTF IDs, from Jiri.
5) BPF_CGROUP_INET_SOCK_RELEASE hook, from Stanislav.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/filter.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index 0f22f5ad8e11..bdd2382e655d 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -75,6 +75,7 @@ #include <net/ipv6_stubs.h> #include <net/bpf_sk_storage.h> #include <net/transp_v6.h> +#include <linux/btf_ids.h> /** * sk_filter_trim_cap - run a packet through a socket filter @@ -3779,7 +3780,9 @@ static const struct bpf_func_proto bpf_skb_event_output_proto = { .arg5_type = ARG_CONST_SIZE_OR_ZERO, }; -static int bpf_skb_output_btf_ids[5]; +BTF_ID_LIST(bpf_skb_output_btf_ids) +BTF_ID(struct, sk_buff) + const struct bpf_func_proto bpf_skb_output_proto = { .func = bpf_skb_event_output, .gpl_only = true, @@ -4173,7 +4176,9 @@ static const struct bpf_func_proto bpf_xdp_event_output_proto = { .arg5_type = ARG_CONST_SIZE_OR_ZERO, }; -static int bpf_xdp_output_btf_ids[5]; +BTF_ID_LIST(bpf_xdp_output_btf_ids) +BTF_ID(struct, xdp_buff) + const struct bpf_func_proto bpf_xdp_output_proto = { .func = bpf_xdp_event_output, .gpl_only = true, @@ -6894,6 +6899,7 @@ static bool __sock_filter_check_attach_type(int off, case offsetof(struct bpf_sock, priority): switch (attach_type) { case BPF_CGROUP_INET_SOCK_CREATE: + case BPF_CGROUP_INET_SOCK_RELEASE: goto full_access; default: return false; |