linux/tools/include/uapi
Florian Westphal 132328e8e8 bpf: netfilter: Add BPF_NETFILTER bpf_attach_type
Andrii Nakryiko writes:

 And we currently don't have an attach type for NETLINK BPF link.
 Thankfully it's not too late to add it. I see that link_create() in
 kernel/bpf/syscall.c just bypasses attach_type check. We shouldn't
 have done that. Instead we need to add BPF_NETLINK attach type to enum
 bpf_attach_type. And wire all that properly throughout the kernel and
 libbpf itself.

This adds BPF_NETFILTER and uses it.  This breaks uabi but this
wasn't in any non-rc release yet, so it should be fine.

v2: check link_attack prog type in link_create too

Fixes: 84601d6ee6 ("bpf: add bpf_link support for BPF_NETFILTER programs")
Suggested-by: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/CAEf4BzZ69YgrQW7DHCJUT_X+GqMq_ZQQPBwopaJJVGFD5=d5Vg@mail.gmail.com/
Link: https://lore.kernel.org/bpf/20230605131445.32016-1-fw@strlen.de
History 2023-06-05 15:01:43 -07:00
..
asm selftests/bpf: Fix build error for LoongArch 2023-02-15 08:47:53 -08:00
asm-generic open: return EINVAL for O_DIRECTORY | O_CREAT 2023-03-22 11:06:55 +01:00
drm tools headers UAPI: Sync the i915_drm.h with the kernel sources 2023-05-10 14:19:20 -03:00
linux bpf: netfilter: Add BPF_NETFILTER bpf_attach_type 2023-06-05 15:01:43 -07:00
sound tools include UAPI: Sync the sound/asound.h copy with the kernel sources 2023-05-10 14:19:20 -03:00