From: David Miller <davem@davemloft.net>
To: ast@fb.com
Cc: daniel@iogearbox.net, g.borello@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] bpf: Preserve const register type on const OR alu ops
Date: Mon, 05 Dec 2016 13:41:08 -0500 (EST) [thread overview]
Message-ID: <20161205.134108.1458706052974202517.davem@davemloft.net> (raw)
In-Reply-To: <1480797093-1050393-1-git-send-email-ast@fb.com>
From: Alexei Starovoitov <ast@fb.com>
Date: Sat, 3 Dec 2016 12:31:33 -0800
> From: Gianluca Borello <g.borello@gmail.com>
>
> Occasionally, clang (e.g. version 3.8.1) translates a sum between two
> constant operands using a BPF_OR instead of a BPF_ADD. The verifier is
> currently not handling this scenario, and the destination register type
> becomes UNKNOWN_VALUE even if it's still storing a constant. As a result,
> the destination register cannot be used as argument to a helper function
> expecting a ARG_CONST_STACK_*, limiting some use cases.
>
> Modify the verifier to handle this case, and add a few tests to make sure
> all combinations are supported, and stack boundaries are still verified
> even with BPF_OR.
>
> Signed-off-by: Gianluca Borello <g.borello@gmail.com>
> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Applied, but...
> diff --git a/tools/testing/selftests/bpf/.gitignore b/tools/testing/selftests/bpf/.gitignore
> index 3c59f96e3ed8..071431bedde8 100644
> --- a/tools/testing/selftests/bpf/.gitignore
> +++ b/tools/testing/selftests/bpf/.gitignore
> @@ -1,2 +1,3 @@
> test_verifier
> test_maps
> +test_lru_map
This had nothing to do with this change, nor was it mentioned in the
commit message.
Please do not do this in the future.
prev parent reply other threads:[~2016-12-05 18:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-03 20:31 [PATCH net-next] bpf: Preserve const register type on const OR alu ops Alexei Starovoitov
2016-12-03 23:41 ` Daniel Borkmann
2016-12-05 18:41 ` David Miller [this message]
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=20161205.134108.1458706052974202517.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ast@fb.com \
--cc=daniel@iogearbox.net \
--cc=g.borello@gmail.com \
--cc=netdev@vger.kernel.org \
/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).