From: Jiong Wang <jiong.wang@netronome.com>
To: daniel@iogearbox.net, ast@kernel.org
Cc: netdev@vger.kernel.org, oss-drivers@netronome.com,
Jiong Wang <jiong.wang@netronome.com>
Subject: [PATCH bpf-next 0/7] bpf: support BPF_ALU | BPF_ARSH
Date: Tue, 4 Dec 2018 15:55:15 -0500 [thread overview]
Message-ID: <1543956922-8620-1-git-send-email-jiong.wang@netronome.com> (raw)
BPF_ALU | BPF_ARSH | BPF_* were rejected by commit: 7891a87efc71
("bpf: arsh is not supported in 32 bit alu thus reject it"). As explained
in the commit message, this is due to there is no complete support for them
on interpreter and various JIT compilation back-ends.
This patch set is a follow-up which completes the missing bits. This also
pave the way for running bpf program compiled with ALU32 instruction
enabled by specifing -mattr=+alu32 to LLVM for which case there is likely
to have more BPF_ALU | BPF_ARSH insns that will trigger the rejection code.
test_verifier.c is updated accordingly.
I have tested this patch set on x86-64 and NFP, I need help of review and
test on the arch changes (mips/ppc/s390).
Note, there might be merge confict on mips change which is better to be
applied on top of:
commit: 20b880a05f06 ("mips: bpf: fix encoding bug for mm_srlv32_op"),
which is on mips-fixes branch at the moment.
Thanks.
Jiong Wang (7):
mips: bpf: implement jitting of BPF_ALU | BPF_ARSH | BPF_X
ppc: bpf: implement jitting of BPF_ALU | BPF_ARSH | BPF_*
s390: bpf: implement jitting of BPF_ALU | BPF_ARSH | BPF_*
nfp: bpf: implement jitting of BPF_ALU | BPF_ARSH | BPF_*
bpf: interpreter support BPF_ALU | BPF_ARSH
bpf: verifier remove the rejection on BPF_ALU | BPF_ARSH
selftests: bpf: update testcases for BPF_ALU | BPF_ARSH
arch/mips/include/asm/uasm.h | 1 +
arch/mips/include/uapi/asm/inst.h | 1 +
arch/mips/mm/uasm-micromips.c | 1 +
arch/mips/mm/uasm-mips.c | 1 +
arch/mips/mm/uasm.c | 9 ++---
arch/mips/net/ebpf_jit.c | 4 +++
arch/powerpc/include/asm/ppc-opcode.h | 2 ++
arch/powerpc/net/bpf_jit.h | 4 +++
arch/powerpc/net/bpf_jit_comp64.c | 6 ++++
arch/s390/net/bpf_jit_comp.c | 12 +++++++
drivers/net/ethernet/netronome/nfp/bpf/jit.c | 45 ++++++++++++++++++++++++
kernel/bpf/core.c | 52 ++++++++++++++++------------
kernel/bpf/verifier.c | 5 ---
tools/testing/selftests/bpf/test_verifier.c | 29 +++++++++++++---
14 files changed, 137 insertions(+), 35 deletions(-)
--
2.7.4
next reply other threads:[~2018-12-04 20:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-04 20:55 Jiong Wang [this message]
2018-12-04 20:55 ` [PATCH bpf-next 1/7] mips: bpf: implement jitting of BPF_ALU | BPF_ARSH | BPF_X Jiong Wang
2018-12-05 0:02 ` Paul Burton
2018-12-05 11:07 ` Jiong Wang
2018-12-04 20:55 ` [PATCH bpf-next 2/7] ppc: bpf: implement jitting of BPF_ALU | BPF_ARSH | BPF_* Jiong Wang
2018-12-05 6:37 ` Sandipan Das
2018-12-05 11:28 ` Jiong Wang
2018-12-05 19:39 ` David Miller
2018-12-04 20:55 ` [PATCH bpf-next 3/7] s390: " Jiong Wang
2018-12-04 20:55 ` [PATCH bpf-next 4/7] nfp: " Jiong Wang
2018-12-04 20:55 ` [PATCH bpf-next 5/7] bpf: interpreter support BPF_ALU | BPF_ARSH Jiong Wang
2018-12-04 20:55 ` [PATCH bpf-next 6/7] bpf: verifier remove the rejection on " Jiong Wang
2018-12-04 20:55 ` [PATCH bpf-next 7/7] selftests: bpf: update testcases for " 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=1543956922-8620-1-git-send-email-jiong.wang@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).