aboutsummaryrefslogtreecommitdiff
path: root/scripts/gcc-plugins/sancov_plugin.c
diff options
context:
space:
mode:
authorFlorent Revest <[email protected]>2020-12-04 12:36:05 +0100
committerDaniel Borkmann <[email protected]>2020-12-04 22:32:40 +0100
commit4f19cab76136e800a3f04d8c9aa4d8e770e3d3d8 (patch)
tree3b5e5f07da31f2a2a81b858765e00c8ff0265daa /scripts/gcc-plugins/sancov_plugin.c
parentdba4a9256bb4d78ef89aaad5f49787aa27fcd5b4 (diff)
bpf: Add a bpf_sock_from_file helper
While eBPF programs can check whether a file is a socket by file->f_op == &socket_file_ops, they cannot convert the void private_data pointer to a struct socket BTF pointer. In order to do this a new helper wrapping sock_from_file is added. This is useful to tracing programs but also other program types inheriting this set of helpers such as iterators or LSM programs. Signed-off-by: Florent Revest <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: KP Singh <[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