From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Edward Cree <ecree@solarflare.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>,
ast@kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH bpf 1/4] bpf: fix partial copy of map_ptr when dst is scalar
Date: Thu, 1 Nov 2018 16:18:53 -0300 [thread overview]
Message-ID: <20181101191853.GC20495@kernel.org> (raw)
In-Reply-To: <eb077319-4b9a-d48d-b467-fb11301c4470@solarflare.com>
Em Thu, Nov 01, 2018 at 07:17:29PM +0000, Edward Cree escreveu:
> On 31/10/18 23:05, Daniel Borkmann wrote:
> > ALU operations on pointers such as scalar_reg += map_value_ptr are
> > handled in adjust_ptr_min_max_vals(). Problem is however that map_ptr
> > and range in the register state share a union, so transferring state
> > through dst_reg->range = ptr_reg->range is just buggy as any new
> > map_ptr in the dst_reg is then truncated (or null) for subsequent
> > checks. Fix this by adding a raw member and use it for copying state
> > over to dst_reg.
> >
> > Fixes: f1174f77b50c ("bpf/verifier: rework value tracking")
> > Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
> > Cc: Edward Cree <ecree@solarflare.com>
> > Acked-by: Alexei Starovoitov <ast@kernel.org>
> > ---
> Acked-by: Edward Cree <ecree@solarflare.com>
> (though I apparently missed the 63-minute window to hit the git record...)
Those guys are fast! :-)
- Arnaldo
next prev parent reply other threads:[~2018-11-02 4:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-31 23:05 [PATCH bpf 0/4] BPF fixes and tests Daniel Borkmann
2018-10-31 23:05 ` [PATCH bpf 1/4] bpf: fix partial copy of map_ptr when dst is scalar Daniel Borkmann
2018-11-01 19:17 ` Edward Cree
2018-11-01 19:18 ` Arnaldo Carvalho de Melo [this message]
2018-10-31 23:05 ` [PATCH bpf 2/4] bpf: don't set id on after map lookup with ptr_to_map_val return Daniel Borkmann
2018-11-01 1:11 ` Roman Gushchin
2018-10-31 23:05 ` [PATCH bpf 3/4] bpf: add various test cases to test_verifier Daniel Borkmann
2018-10-31 23:05 ` [PATCH bpf 4/4] bpf: test make sure to run unpriv test cases in test_verifier Daniel Borkmann
2018-11-01 0:08 ` [PATCH bpf 0/4] BPF fixes and tests Alexei Starovoitov
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=20181101191853.GC20495@kernel.org \
--to=acme@kernel.org \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=ecree@solarflare.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).