From: Alexei Starovoitov Date: Sun, 2 Aug 2020 03:38:29 +0000 (-0700) Subject: Merge branch 'link_detach' X-Git-Tag: v5.9-rc1~133^2~23^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5a6b1a206d1f399c9ea19173bd9a945a657f1fbf;p=thirdparty%2Flinux.git Merge branch 'link_detach' Andrii Nakryiko says: ==================== This patch set adds new BPF link operation, LINK_DETACH, allowing processes with BPF link FD to force-detach it from respective BPF hook, similarly how BPF link is auto-detached when such BPF hook (e.g., cgroup, net_device, netns, etc) is removed. This facility allows admin to forcefully undo BPF link attachment, while process that created BPF link in the first place is left intact. Once force-detached, BPF link stays valid in the kernel as long as there is at least one FD open against it. It goes into defunct state, just like auto-detached BPF link. bpftool also got `link detach` command to allow triggering this in non-programmatic fashion. v1->v2: - improve error reporting in `bpftool link detach` (Song). ==================== Signed-off-by: Alexei Starovoitov --- 5a6b1a206d1f399c9ea19173bd9a945a657f1fbf