lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 2 Sep 2022 10:06:28 -0700 From: Alexei Starovoitov <alexei.starovoitov@...il.com> To: Florian Westphal <fw@...len.de> Cc: Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>, Martin KaFai Lau <martin.lau@...ux.dev>, "David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, Network Development <netdev@...r.kernel.org>, Toke Høiland-Jørgensen <toke@...nel.org>, netfilter-devel <netfilter-devel@...r.kernel.org>, bpf <bpf@...r.kernel.org> Subject: Re: [PATCH nf-next] netfilter: nf_tables: add ebpf expression On Thu, Sep 1, 2022 at 3:14 AM Florian Westphal <fw@...len.de> wrote: > > Daniel Borkmann <daniel@...earbox.net> wrote: > > On 8/31/22 7:26 PM, Alexei Starovoitov wrote: > > > On Wed, Aug 31, 2022 at 8:53 AM Florian Westphal <fw@...len.de> wrote: > > > As a minimum we shouldn't step on the same rakes. > > > xt_ebpf would be the same dead code as xt_bpf. > > > > +1, and on top, the user experience will just be horrible. :( > > Compared to what? > > > > > If you are open to BPF_PROG_TYPE_NETFILTER I can go that route > > > > as well, raw bpf program attachment via NF_HOOK and the bpf dispatcher, > > > > but it will take significantly longer to get there. > > > > > > > > It involves reviving > > > > https://lore.kernel.org/netfilter-devel/20211014121046.29329-1-fw@strlen.de/ > > > > > > I missed it earlier. What is the end goal ? > > > Optimize nft run-time with on the fly generation of bpf byte code ? > > > > Or rather to provide a pendant to nft given existence of xt_bpf, and the > > latter will be removed at some point? (If so, can't we just deprecate the > > old xt_bpf?) > > See my reply to Alexey, immediate goal was to get rid of the indirect > calls by providing a tailored/jitted equivalent of nf_hook_slow(). > > The next step could be to allow implementation of netfilter hooks > (i.e., kernel modules that call nf_register_net_hook()) in bpf > but AFAIU it requires addition of BPF_PROG_TYPE_NETFILTER etc. We were adding new prog and maps types in the past. Now new features are being added differently. All of the networking either works with sk_buff-s or xdp frames. We try hard not to add any new uapi helpers. Everything is moving to kfuncs. Other sub-systems should be able to use bpf without touching the bpf core. See hid-bpf as an example. It needs several verifier improvements, but doesn't need new prog types, helpers, etc. > After that, yes, one could think about how to jit nft_do_chain() and > all the rest of the nft machinery. Sounds like a ton of work. All that just to accelerate nft a bit? I think there are more impactful projects to work on. For example, accelerating classic iptables with bpf would immediately help a bunch of users.
Powered by blists - more mailing lists