From: Yonghong Song <yhs@fb.com>
To: <bpf@vger.kernel.org>
Cc: Alexei Starovoitov <ast@fb.com>,
Daniel Borkmann <daniel@iogearbox.net>, <kernel-team@fb.com>
Subject: [PATCH bpf-next 0/2] bpf: provide better register bounds after jmp32 instructions
Date: Wed, 20 Nov 2019 17:40:24 -0800 [thread overview]
Message-ID: <20191121014024.1700638-1-yhs@fb.com> (raw)
With latest llvm, bpf selftest test_progs, which has +alu32 enabled, failed for
strobemeta.o and a few other subtests. The reason is due to that
verifier did not provide better var_off.mask after jmp32 instructions.
This patch set addressed this issue and after the fix, test_progs passed
with alu32.
Patch #1 provided detailed explanation of the problem and the fix.
Patch #2 added three tests in test_verifier.
Yonghong Song (2):
bpf: provide better register bounds after jmp32 instructions
tools/bpf: add verifier tests for better jmp32 register bounds
kernel/bpf/verifier.c | 32 +++++++-
tools/testing/selftests/bpf/verifier/jmp32.c | 83 ++++++++++++++++++++
2 files changed, 111 insertions(+), 4 deletions(-)
--
2.17.1
next reply other threads:[~2019-11-21 1:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-21 1:40 Yonghong Song [this message]
2019-11-21 1:40 ` [PATCH bpf-next 1/2] bpf: provide better register bounds after jmp32 instructions Yonghong Song
2019-11-21 4:59 ` Alexei Starovoitov
2019-11-21 16:36 ` Yonghong Song
2019-11-21 1:40 ` [PATCH bpf-next 2/2] tools/bpf: add verifier tests for better jmp32 register bounds Yonghong Song
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=20191121014024.1700638-1-yhs@fb.com \
--to=yhs@fb.com \
--cc=ast@fb.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.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).