From: Daniel Borkmann <dborkman@redhat•com>
To: Alexei Starovoitov <ast@plumgrid•com>
Cc: Hagen Paul Pfeifer <hagen@jauu•net>,
"David S. Miller" <davem@davemloft•net>,
Ingo Molnar <mingo@kernel•org>, Will Drewry <wad@chromium•org>,
Steven Rostedt <rostedt@goodmis•org>,
Peter Zijlstra <a.p.zijlstra@chello•nl>,
"H. Peter Anvin" <hpa@zytor•com>, Jesse Gross <jesse@nicira•com>,
Thomas Gleixner <tglx@linutronix•de>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi•com>,
Tom Zanussi <tom.zanussi@linux•intel.com>,
Jovi Zhangwei <jovi.zhangwei@gmail•com>,
Eric Dumazet <edumazet@google•com>,
Linus Torvalds <torvalds@linux-foundation•org>,
Andrew Morton <akpm@linux-foundation•org>,
Frederic Weisbecker <fweisbec@gmail•com>,
Arnaldo Carvalho de Melo <acme@infradead•org>,
Pekka Enberg <penberg@iki•fi>,
Arjan van de Ven <arjan@infradead•org>,
Christoph Hellwig <hch@infradead•org>,
linux-kernel@vger•kernel.org, netdev@vger•kernel.org
Subject: Re: [PATCH v4 net-next 1/3] Extended BPF interpreter and converter
Date: Tue, 04 Mar 2014 19:31:11 +0100 [thread overview]
Message-ID: <53161BEF.1050200@redhat.com> (raw)
In-Reply-To: <CAMEtUuxHgcroQBPLFa9U=df6KznwkjARin8a3RfH4MdbB2rc7g@mail.gmail.com>
On 03/04/2014 06:53 PM, Alexei Starovoitov wrote:
> On Tue, Mar 4, 2014 at 6:28 AM, Hagen Paul Pfeifer <hagen@jauu•net> wrote:
>> If all issues raised by Daniel are addresed:
>>
>> Acked-by: Hagen Paul Pfeifer <hagen@jauu•net>
>
> Thanks!
>
>> But ...
>>
>>> Future work:
>>>
>>> 0. seccomp
>>>
>>> 1. add extended BPF JIT for x86_64
>>>
>>> 2. add inband old/new demux and extended BPF verifier, so that new programs
>>> can be loaded through old sk_attach_filter() and sk_unattached_filter_create()
>>> interfaces
>>>
>>> 3. tracing filters systemtap-like with extended BPF
>>>
>>> 4. OVS with extended BPF
>>>
>>> 5. nftables with extended BPF
>>
>> ... this is shit (not your fault). (Jitted) BPF envolved into a direction
>> which is just not the right way to do it. You try to fix things, bypass
>> architectural shortcomings of BPF, perf issues because and so on.
>>
>> The right direction is to write a new general purpose in-kernel interpreter
>> from scratch. Capability layers should provide an compatible API for BPF and
I think ebpf would have the potential to be *the* general purpose
in-kernel interpreter actually (if we undertake all this effort of
migration) as its already designed to be in a more generic context
than the traditional interpreter which is restricted to skb (or NULL).
>> seccomp. You have the knowledge to do exactly this, you nearly already did
>> this - you should start this undertake!
>
> this insn set evolved over few years.
> Initially we had nft-like high level state machine, but it wasn't fast,
> then kprobe-like pure x86_64 which was fast, but very hard to analyze
> from safety point of view. Then reduced x86-64 insn set and finally ebpf.
> I think any brand new instruction set will have steep learning curve,
> just because
> it's all new. ebpf tries to reuse as much as possible. opcode encoding
> is the same,
> instruction size is fixed at 8 bytes and so on. Yeah, these
> restrictions make few
> things not 100% optimal, but imo common look and feel is more important.
> What ebpf has already should be enough to do all of the above 'future work'.
> Built-in JIT-ability of ebpf is the key to performance.
> Ability to call some kernel functions from ebpf make it ultimately extensible.
> socket filters and seccomp don't use this feature yet, but tracing filters will.
>
> Regards,
> Alexei
next prev parent reply other threads:[~2014-03-04 18:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-04 5:18 [PATCH v4 net-next 0/3] Extended BPF, converter, seccomp, doc Alexei Starovoitov
2014-03-04 5:18 ` [PATCH v4 net-next 1/3] Extended BPF interpreter and converter Alexei Starovoitov
2014-03-04 9:59 ` Daniel Borkmann
2014-03-04 17:09 ` Alexei Starovoitov
2014-03-04 18:23 ` Daniel Borkmann
2014-03-04 14:28 ` Hagen Paul Pfeifer
2014-03-04 17:53 ` Alexei Starovoitov
2014-03-04 18:31 ` Daniel Borkmann [this message]
2014-03-04 5:18 ` [PATCH v4 net-next 2/3] RFC: convert seccomp to use extended BPF Alexei Starovoitov
2014-03-04 5:18 ` [PATCH v4 net-next 3/3] Extended BPF documentation Alexei Starovoitov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53161BEF.1050200@redhat.com \
--to=dborkman@redhat$(echo .)com \
--cc=a.p.zijlstra@chello$(echo .)nl \
--cc=acme@infradead$(echo .)org \
--cc=akpm@linux-foundation$(echo .)org \
--cc=arjan@infradead$(echo .)org \
--cc=ast@plumgrid$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=fweisbec@gmail$(echo .)com \
--cc=hagen@jauu$(echo .)net \
--cc=hch@infradead$(echo .)org \
--cc=hpa@zytor$(echo .)com \
--cc=jesse@nicira$(echo .)com \
--cc=jovi.zhangwei@gmail$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=masami.hiramatsu.pt@hitachi$(echo .)com \
--cc=mingo@kernel$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=penberg@iki$(echo .)fi \
--cc=rostedt@goodmis$(echo .)org \
--cc=tglx@linutronix$(echo .)de \
--cc=tom.zanussi@linux$(echo .)intel.com \
--cc=torvalds@linux-foundation$(echo .)org \
--cc=wad@chromium$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox