bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yonghong Song <yhs@fb.com>
To: John Fastabend <john.fastabend@gmail.com>,
	<alexei.starovoitov@gmail.com>, <daniel@iogearbox.net>
Cc: <netdev@vger.kernel.org>, <bpf@vger.kernel.org>
Subject: Re: [RFC PATCH 2/4] bpf: verifier, do explicit u32 bounds tracking
Date: Sun, 8 Mar 2020 22:39:52 -0700	[thread overview]
Message-ID: <a756c2f3-daaf-be08-48c8-6b92c24c48c9@fb.com> (raw)
In-Reply-To: <5e62e95b61bdf_5f672ade5903a5b83c@john-XPS-13-9370.notmuch>

On 3/6/20 4:22 PM, John Fastabend wrote:
> John Fastabend wrote:
>> It is not possible for the current verifier to track u32 alu ops and jmps
>> correctly. This can result in the verifier aborting with errors even though
>> the program should be verifiable. Cilium code base has hit this but worked
>> around it by changing int variables to u64 variables and marking a few
>> things volatile. It would be better to avoid these tricks.
> Quick bit of clarification, originally I tried to just track u32 hence
> the title and above u32 reference. After runnning some programs I realized
> this wasn't really enough to handle all cases so I added the signed 32-bit
> bounds tracker. If I missed some spots in the descriptions that was just
> because I missed it in the proof reading here. u32 above should be 32-bit
> subreg.
> I also forgot to give Yonhong credit. Sorry Yonghong! The original alu ops
> tracking patch came from him.

John, thanks for working on this! Hopefully this will resolve tricky 
32bit subreg tracking issues. I will look at the RFC in the next couple 
of days!

  reply	other threads:[~2020-03-09  5:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-07  0:10 [RFC bpf PATCH 0/4] rfc for 32-bit subreg verifier tracking John Fastabend
2020-03-07  0:10 ` [RFC PATCH 1/4] bpf: verifer, refactor adjust_scalar_min_max_vals John Fastabend
2020-03-07  0:11 ` [RFC PATCH 2/4] bpf: verifier, do explicit u32 bounds tracking John Fastabend
2020-03-07  0:22   ` John Fastabend
2020-03-09  5:39     ` Yonghong Song [this message]
2020-03-09 23:58   ` Alexei Starovoitov
2020-03-10 17:04     ` John Fastabend
2020-03-10 17:12     ` Edward Cree
2020-03-10 19:24       ` John Fastabend
2020-03-10 19:41         ` Edward Cree
2020-03-10 17:52   ` Yonghong Song
2020-03-10 19:54     ` John Fastabend
2020-03-07  0:11 ` [RFC PATCH 3/4] bpf: verifier, do_refine_retval_range may clamp umin to 0 incorrectly John Fastabend
2020-03-07  0:11 ` [RFC PATCH 4/4] bpf: selftests, bpf_get_stack return value add <0 John Fastabend

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a756c2f3-daaf-be08-48c8-6b92c24c48c9@fb.com \
    --to=yhs@fb.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=netdev@vger.kernel.org \


* 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).