From: Jiong Wang <jiong.wang@netronome.com>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: Jiong Wang <jiong.wang@netronome.com>,
ast@kernel.org, netdev@vger.kernel.org,
oss-drivers@netronome.com
Subject: Re: [PATCH bpf-next v3 03/16] bpf: verifier support JMP32
Date: Sat, 26 Jan 2019 11:02:55 +0000 [thread overview]
Message-ID: <87a7jnptpc.fsf@netronome.com> (raw)
In-Reply-To: <3e7a469a-8707-9d51-e1a9-0d57a489fcf7@iogearbox.net>
Daniel Borkmann writes:
> On 01/25/2019 01:10 AM, Jiong Wang wrote:
>> This patch teach verifier about the new BPF_JMP32 instruction class.
>> Verifier need to treat it similar as the existing BPF_JMP class.
>> A BPF_JMP32 insn needs to go through all checks that have been done on
>> BPF_JMP.
>>
>> Also, verifier is doing runtime optimizations based on the extra info
>> conditional jump instruction could offer, especially when the comparison is
>> between constant and register that the value range of the register could be
>> improved based on the comparison results. These code are updated
>> accordingly.
>>
>> Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
>> Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
>
> Series looks good to me, but if I spot this correctly one thing that has
> not been addressed here is proper rebase on top of Jakub's dead code
> removal, e.g. in opt_hard_wire_dead_code_branches() where we check in
> insn_is_cond_jump() for jump opcodes it still only tests for BPF_JMP
> class whereas BPF_JMP32 handling needs to be taught here as well.
Thanks for catching this. Yes, insn_is_cond_jump() should be updated for
JMP32 as well. JMP32 is guaranteed to be with condition jump operation only
otherwise the earlier do_check will complain use of reserved encoding bits.
I am going to teach insn_is_cond_jump to return true for JMP32. And search
the commits, there is another similar new helper function in nfp driver
jit.
Will fix both places, and re-spin v4.
Thanks.
Regards,
Jiong
next prev parent reply other threads:[~2019-01-26 11:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-25 0:10 [PATCH bpf-next v3 00/16] bpf: propose new jmp32 instructions Jiong Wang
2019-01-25 0:10 ` [PATCH bpf-next v3 01/16] bpf: allocate 0x06 to new eBPF instruction class JMP32 Jiong Wang
2019-01-25 0:10 ` [PATCH bpf-next v3 02/16] bpf: refactor verifier min/max code for condition jump Jiong Wang
2019-01-25 0:10 ` [PATCH bpf-next v3 03/16] bpf: verifier support JMP32 Jiong Wang
2019-01-26 0:36 ` Daniel Borkmann
2019-01-26 11:02 ` Jiong Wang [this message]
2019-01-25 0:10 ` [PATCH bpf-next v3 04/16] bpf: disassembler " Jiong Wang
2019-01-25 0:10 ` [PATCH bpf-next v3 05/16] tools: bpftool: teach cfg code about JMP32 Jiong Wang
2019-01-25 0:10 ` [PATCH bpf-next v3 06/16] bpf: interpreter support for JMP32 Jiong Wang
2019-01-25 0:10 ` [PATCH bpf-next v3 07/16] bpf: JIT blinds support JMP32 Jiong Wang
2019-01-25 0:10 ` [PATCH bpf-next v3 08/16] x86_64: bpf: implement jitting of JMP32 Jiong Wang
2019-01-25 0:10 ` [PATCH bpf-next v3 09/16] x32: " Jiong Wang
2019-01-25 0:10 ` [PATCH bpf-next v3 10/16] arm64: " Jiong Wang
2019-01-25 0:10 ` [PATCH bpf-next v3 11/16] arm: " Jiong Wang
2019-01-25 0:10 ` [PATCH bpf-next v3 12/16] ppc: " Jiong Wang
2019-01-25 6:22 ` Sandipan Das
2019-01-25 0:10 ` [PATCH bpf-next v3 13/16] s390: " Jiong Wang
2019-01-25 0:10 ` [PATCH bpf-next v3 14/16] nfp: " Jiong Wang
2019-01-25 0:10 ` [PATCH bpf-next v3 15/16] selftests: bpf: functional and min/max reasoning unit tests for JMP32 Jiong Wang
2019-01-25 0:10 ` [PATCH bpf-next v3 16/16] selftests: bpf: makefile support sub-register code-gen test mode Jiong Wang
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=87a7jnptpc.fsf@netronome.com \
--to=jiong.wang@netronome.com \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--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).