On 10/4/22 4:11 PM, Daniel Borkmann wrote:
Add support for forced detach operation of tc BPF link. This detaches the link but without destroying it. It has the same semantics as auto-detaching of BPF link due to e.g. net device being destroyed for tc or XDP BPF link. Meaning, in this case the BPF link is still a valid kernel object, but is defunct given it is not attached anywhere anymore. It still holds a reference to the BPF program, though. This functionality allows users with enough access rights to manually force-detach attached tc BPF link without killing respective owner process and to then introspect/debug the BPF assets. Similar LINK_DETACH exists also for other BPF link types.
Reviewed-by: Martin KaFai Lau <martin.lau@xxxxxxxxxx>