linux/include
Andrii Nakryiko 73b11c2ab0 bpf: Add support for forced LINK_DETACH command
Add LINK_DETACH command to force-detach bpf_link without destroying it. It has
the same behavior as auto-detaching of bpf_link due to cgroup dying for
bpf_cgroup_link or net_device being destroyed for bpf_xdp_link. In such case,
bpf_link is still a valid kernel object, but is defuncts and doesn't hold BPF
program attached to corresponding BPF hook. This functionality allows users
with enough access rights to manually force-detach attached bpf_link without
killing respective owner process.

This patch implements LINK_DETACH for cgroup, xdp, and netns links, mostly
re-using existing link release handling code.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20200731182830.286260-2-andriin@fb.com
2020-08-01 20:38:28 -07:00
..
acpi Merge branch 'acpica' 2020-06-10 17:27:28 +02:00
asm-generic Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
clocksource
crypto crypto: af_alg - fix use-after-free in af_alg_accept() due to bh_lock_sock() 2020-06-18 17:09:54 +10:00
drm drm/edid: Replace zero-length array with flexible-array 2020-06-15 23:08:31 -05:00
dt-bindings - qcom : 2020-06-11 12:42:14 -07:00
keys RxRPC: Replace zero-length array with flexible-array 2020-06-15 23:08:32 -05:00
kunit
kvm
linux bpf: Add support for forced LINK_DETACH command 2020-08-01 20:38:28 -07:00
math-emu
media media updates for v5.8-rc1 2020-06-13 13:09:38 -07:00
misc
net bpf, xdp: Remove XDP_QUERY_PROG and XDP_QUERY_PROG_HW XDP commands 2020-07-25 20:37:02 -07:00
pcmcia
ras
rdma dynamic_debug: add an option to enable dynamic debug for modules only 2020-06-08 11:05:56 -07:00
scsi SCSI misc on 20200605 2020-06-05 15:11:50 -07:00
soc net: mscc: ocelot: extend watermark encoding function 2020-07-13 17:40:02 -07:00
sound ASoC: Fixes for v5.8 2020-07-17 18:19:02 +02:00
target scsi: target: Rename target_setup_cmd_from_cdb() to target_cmd_parse_cdb() 2020-06-09 21:57:26 -04:00
trace bpf: cpumap: Implement XDP_REDIRECT for eBPF programs attached to map entries 2020-07-16 17:00:32 +02:00
uapi bpf: Add support for forced LINK_DETACH command 2020-08-01 20:38:28 -07:00
vdso
video
xen xen: netif.h: add a new extra type for XDP 2020-07-01 15:25:14 -07:00