All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: William Tu <u9012063@gmail.com>
Cc: netdev@vger.kernel.org, Mihai Budiu <mbudiu@vmware.com>, ast@kernel.org
Subject: Re: [PATCH v2 net-next] bpf: enable verifier to add 0 to packet ptr
Date: Fri, 03 Feb 2017 21:39:44 +0100	[thread overview]
Message-ID: <5894EA90.4090807@iogearbox.net> (raw)
In-Reply-To: <1486142565-2794-1-git-send-email-u9012063@gmail.com>

[ please keep us Cc'ed ;) ]

On 02/03/2017 06:22 PM, William Tu wrote:
> The patch fixes the case when adding a zero value to the packet
> pointer.  The verifer reports the following error:
>    [...]
>      R0=imm0,min_value=0,max_value=0
>      R1=pkt(id=0,off=0,r=4)
>      R2=pkt_end R3=fp-12
>      R4=imm4,min_value=4,max_value=4
>      R5=pkt(id=0,off=4,r=4)
>    269: (bf) r2 = r0	// r2 becomes imm0
>    270: (77) r2 >>= 3
>    271: (bf) r4 = r1	// r4 becomes pkt ptr
>    272: (0f) r4 += r2	// r4 += 0
>    addition of negative constant to packet pointer is not allowed
>
> Signed-off-by: William Tu <u9012063@gmail.com>
> Signed-off-by: Mihai Budiu <mbudiu@vmware.com>

Acked-by: Daniel Borkmann <daniel@iogearbox.net>

Thanks!

  reply	other threads:[~2017-02-03 20:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-03 17:22 [PATCH v2 net-next] bpf: enable verifier to add 0 to packet ptr William Tu
2017-02-03 20:39 ` Daniel Borkmann [this message]
2017-02-03 20:55 ` Alexei Starovoitov
2017-02-03 21:10   ` William Tu
2017-02-03 22:29     ` Daniel Borkmann
2017-02-03 22:53       ` Alexei Starovoitov
2017-02-03 23:28         ` William Tu

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=5894EA90.4090807@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=ast@kernel.org \
    --cc=mbudiu@vmware.com \
    --cc=netdev@vger.kernel.org \
    --cc=u9012063@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.