diff options
| author | Florent Revest <[email protected]> | 2020-12-04 12:36:08 +0100 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2020-12-04 22:32:40 +0100 |
| commit | bd9b327e58f98aa7126291bf12b50720c660e787 (patch) | |
| tree | c675f7887871b6279c14de91bfb4722e006f4baf /scripts/gcc-plugins/sancov_plugin.c | |
| parent | 593f6d41abbbc63e1ad297f7a36ab6060a812f0c (diff) | |
selftests/bpf: Add an iterator selftest for bpf_sk_storage_get
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 could be used from a cgroup_skb/*gress hook to try to
associate network traffic with processes.
The test makes sure that a socket it created is tagged with prog_tests's
pid.
Signed-off-by: Florent Revest <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Acked-by: Martin KaFai Lau <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'scripts/gcc-plugins/sancov_plugin.c')
0 files changed, 0 insertions, 0 deletions