]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - include/linux/proc_fs.h
net: bpf: Add netlink and ipv6_route bpf_iter targets
authorYonghong Song <yhs@fb.com>
Sat, 9 May 2020 17:59:10 +0000 (10:59 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 10 May 2020 00:05:26 +0000 (17:05 -0700)
commit138d0be35b141e09f6b267c6ae4094318d4e4491
tree76a12178ba458cf724b25df390e3d66ccd5ecfbf
parent6086d29def80edd78f9832ea6eafa74e3818f6a7
net: bpf: Add netlink and ipv6_route bpf_iter targets

This patch added netlink and ipv6_route targets, using
the same seq_ops (except show() and minor changes for stop())
for /proc/net/{netlink,ipv6_route}.

The net namespace for these targets are the current net
namespace at file open stage, similar to
/proc/net/{netlink,ipv6_route} reference counting
the net namespace at seq_file open stage.

Since module is not supported for now, ipv6_route is
supported only if the IPV6 is built-in, i.e., not compiled
as a module. The restriction can be lifted once module
is properly supported for bpf_iter.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200509175910.2476329-1-yhs@fb.com
fs/proc/proc_net.c
include/linux/proc_fs.h
net/ipv6/ip6_fib.c
net/ipv6/route.c
net/netlink/af_netlink.c