Re: [PATCH bpf-next v4 5/6] bpf: Add an iterator selftest for bpf_sk_storage_get

2020-12-03 Thread Martin KaFai Lau
On Wed, Dec 02, 2020 at 09:55:26PM +0100, Florent Revest wrote: > The eBPF program iterates over all files and tasks. For all socket > files, it stores the tgid of the last task it encountered with a handle > to that socket. This is a heuristic for finding the "owner" of a socket > similar to what'

[PATCH bpf-next v4 5/6] bpf: Add an iterator selftest for bpf_sk_storage_get

2020-12-02 Thread Florent Revest
The eBPF program iterates over all files and tasks. For all socket files, it stores the tgid of the last task it encountered with a handle to that socket. This is a heuristic for finding the "owner" of a socket similar to what's done by lsof, ss, netstat or fuser. Potentially, this information coul