netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: daniel@iogearbox.net
Cc: netdev@vger.kernel.org, fengc@google.com, ast@kernel.org
Subject: Re: [PATCH net-next] bpf: cgroup skb progs cannot access ld_abs/ind
Date: Tue, 06 Jun 2017 16:40:05 -0400 (EDT)	[thread overview]
Message-ID: <20170606.164005.76474638904598005.davem@davemloft.net> (raw)
In-Reply-To: <1851c3df45588eb96803995a3ceff32819612386.1496766858.git.daniel@iogearbox.net>

From: Daniel Borkmann <daniel@iogearbox.net>
Date: Tue,  6 Jun 2017 18:38:04 +0200

> Commit fb9a307d11d6 ("bpf: Allow CGROUP_SKB eBPF program to
> access sk_buff") enabled programs of BPF_PROG_TYPE_CGROUP_SKB
> type to use ld_abs/ind instructions. However, at this point,
> we cannot use them, since offsets relative to SKF_LL_OFF will
> end up pointing skb_mac_header(skb) out of bounds since in the
> egress path it is not yet set at that point in time, but only
> after __dev_queue_xmit() did a general reset on the mac header.
> bpf_internal_load_pointer_neg_helper() will then end up reading
> data from a wrong offset.
> 
> BPF_PROG_TYPE_CGROUP_SKB programs can use bpf_skb_load_bytes()
> already to access packet data, which is also more flexible than
> the insns carried over from cBPF.
> 
> Fixes: fb9a307d11d6 ("bpf: Allow CGROUP_SKB eBPF program to access sk_buff")
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
> Acked-by: Alexei Starovoitov <ast@kernel.org>

Aha, I see, applied.

Thanks!

      reply	other threads:[~2017-06-06 20:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-06 16:38 [PATCH net-next] bpf: cgroup skb progs cannot access ld_abs/ind Daniel Borkmann
2017-06-06 20:40 ` 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=20170606.164005.76474638904598005.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=fengc@google.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).