linux/include/uapi
Jesper Dangaard Brouer 281920b7e0 bpf: Devmap adjust uapi for attach bpf program
V2:
- Defer changing BPF-syscall to start at file-descriptor 1
- Use {} to zero initialise struct.

The recent commit fbee97feed ("bpf: Add support to attach bpf program to a
devmap entry"), introduced ability to attach (and run) a separate XDP
bpf_prog for each devmap entry. A bpf_prog is added via a file-descriptor.
As zero were a valid FD, not using the feature requires using value minus-1.
The UAPI is extended via tail-extending struct bpf_devmap_val and using
map->value_size to determine the feature set.

This will break older userspace applications not using the bpf_prog feature.
Consider an old userspace app that is compiled against newer kernel
uapi/bpf.h, it will not know that it need to initialise the member
bpf_prog.fd to minus-1. Thus, users will be forced to update source code to
get program running on newer kernels.

This patch remove the minus-1 checks, and have zero mean feature isn't used.

Followup patches either for kernel or libbpf should handle and avoid
returning file-descriptor zero in the first place.

Fixes: fbee97feed ("bpf: Add support to attach bpf program to a devmap entry")
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/159170950687.2102545.7235914718298050113.stgit@firesoul
2020-06-09 11:36:18 -07:00
..
asm-generic vfs: add faccessat2 syscall 2020-05-14 16:44:25 +02:00
drm drm: Generalized NV Block Linear DRM format mod 2020-05-22 10:53:33 +10:00
linux bpf: Devmap adjust uapi for attach bpf program 2020-06-09 11:36:18 -07:00
misc crypto: hisilicon - register zip engine to uacce 2020-02-22 09:25:42 +08:00
mtd mtd: abi: do not use C++ style comments in uapi header 2019-07-07 20:31:29 +02:00
rdma docs: fix broken references to text files 2020-04-20 15:35:59 -06:00
scsi uapi: revert flexible-array conversions 2020-05-04 11:30:15 -05:00
sound Revert "ALSA: uapi: Drop asound.h inclusion from asoc.h" 2020-03-31 11:01:12 +02:00
video
xen
Kbuild kbuild: re-implement Makefile.headersinst without recursion 2019-06-15 19:57:02 +09:00