From: Daniel Borkmann <daniel@iogearbox.net>
To: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: netdev@vger.kernel.org, oss-drivers@netronome.com,
alexei.starovoitov@gmail.com
Subject: Re: [PATCH net-next 01/12] bpf: verifier: set reg_type on context accesses in second pass
Date: Thu, 12 Oct 2017 23:46:38 +0200 [thread overview]
Message-ID: <59DFE2BE.4090603@iogearbox.net> (raw)
In-Reply-To: <20171012143950.58c1b601@cakuba.netronome.com>
On 10/12/2017 11:39 PM, Jakub Kicinski wrote:
> On Thu, 12 Oct 2017 23:33:21 +0200, Daniel Borkmann wrote:
>> On 10/12/2017 10:56 PM, Jakub Kicinski wrote:
>>> On Thu, 12 Oct 2017 22:43:10 +0200, Daniel Borkmann wrote:
>> [...]
>>>> It would be nice to keep the reg_type setting in one place, meaning
>>>> the callbacks themselves, so we wouldn't need to maintain this in
>>>> multiple places.
>>>
>>> Hm.. I though this was the smallest and simplest change. I could
>>> translate the offsets but that seems wobbly. Or try to consolidate the
>>> call into the same if () branch? Not sure..
>>
>> Different callbacks for post-verification would be good at min as it
>> would allow to keep all the context access info in one place for a
>> given type at least.
>
> Sorry to be clear - you're suggesting adding a new callback to struct
> bpf_verifier_ops, or swapping the struct bpf_verifier_ops for a
> special post-verification one?
Either way is fine by me.
>>> As a bonus info I discovered there is a bug in -net with how things are
>>> converted. We allow arithmetic on context pointers but then only
>>> look at the insn.off in the converter... I'm working on a fix.
>>
>> Ohh well, good catch, indeed! :( Can you also add coverage to the
>> bpf selftests for this?
>
> Will do!
Thanks,
Daniel
next prev parent reply other threads:[~2017-10-12 21:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-12 17:34 [PATCH net-next 00/12] nfp: bpf: support direct packet access Jakub Kicinski
2017-10-12 17:34 ` [PATCH net-next 01/12] bpf: verifier: set reg_type on context accesses in second pass Jakub Kicinski
2017-10-12 20:43 ` Daniel Borkmann
2017-10-12 20:56 ` Jakub Kicinski
2017-10-12 21:33 ` Daniel Borkmann
2017-10-12 21:39 ` Jakub Kicinski
2017-10-12 21:46 ` Daniel Borkmann [this message]
2017-10-12 17:34 ` [PATCH net-next 02/12] nfp: bpf: reorder arguments to emit_ld_field_any() Jakub Kicinski
2017-10-12 17:34 ` [PATCH net-next 03/12] nfp: bpf: add missing return in jne_imm optimization Jakub Kicinski
2017-10-12 17:34 ` [PATCH net-next 04/12] nfp: bpf: fix compare instructions Jakub Kicinski
2017-10-12 17:34 ` [PATCH net-next 05/12] nfp: bpf: add mov helper Jakub Kicinski
2017-10-12 17:34 ` [PATCH net-next 06/12] nfp: bpf: implement byte swap instruction Jakub Kicinski
2017-10-12 17:34 ` [PATCH net-next 07/12] nfp: bpf: support BPF offload only on little endian Jakub Kicinski
2017-10-12 17:34 ` [PATCH net-next 08/12] nfp: bpf: fix context accesses Jakub Kicinski
2017-10-12 17:34 ` [PATCH net-next 09/12] nfp: bpf: separate I/O from checks for legacy data load Jakub Kicinski
2017-10-12 17:34 ` [PATCH net-next 10/12] nfp: bpf: add support for direct packet access - read Jakub Kicinski
2017-10-12 17:34 ` [PATCH net-next 11/12] nfp: bpf: direct packet access - write Jakub Kicinski
2017-10-12 17:34 ` [PATCH net-next 12/12] nfp: bpf: support direct packet access in TC Jakub Kicinski
2017-10-14 18:13 ` [PATCH net-next 00/12] nfp: bpf: support direct packet access David Miller
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=59DFE2BE.4090603@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=alexei.starovoitov@gmail.com \
--cc=jakub.kicinski@netronome.com \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).