From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: John Fastabend <john.fastabend@gmail.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
daniel@iogearbox.net
Subject: Re: [net PATCH 1/2] bpf: bpf_compute_data uses incorrect cb structure
Date: Fri, 27 Oct 2017 12:43:30 -0700 [thread overview]
Message-ID: <20171027194328.xfzxgesclwijkjz2@ast-mbp> (raw)
In-Reply-To: <20171027164534.28498.39170.stgit@john-Precision-Tower-5810>
On Fri, Oct 27, 2017 at 09:45:34AM -0700, John Fastabend wrote:
> SK_SKB program types use bpf_compute_data to store the end of the
> packet data. However, bpf_compute_data assumes the cb is stored in the
> qdisc layer format. But, for SK_SKB this is the wrong layer of the
> stack for this type.
>
> It happens to work (sort of!) because in most cases nothing happens
> to be overwritten today. This is very fragile and error prone.
> Fortunately, we have another hole in tcp_skb_cb we can use so lets
> put the data_end value there.
>
> Note, SK_SKB program types do not use data_meta, they are failed by
> sk_skb_is_valid_access().
>
> Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
next prev parent reply other threads:[~2017-10-27 19:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-27 16:45 [net PATCH 0/2] sockmap fixes John Fastabend
2017-10-27 16:45 ` [net PATCH 1/2] bpf: bpf_compute_data uses incorrect cb structure John Fastabend
2017-10-27 19:43 ` Alexei Starovoitov [this message]
2017-10-27 16:45 ` [net PATCH 2/2] bpf: rename sk_actions to align with bpf infrastructure John Fastabend
2017-10-27 19:44 ` Alexei Starovoitov
2017-10-29 2:19 ` [net PATCH 0/2] sockmap fixes David Miller
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=20171027194328.xfzxgesclwijkjz2@ast-mbp \
--to=alexei.starovoitov@gmail.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=john.fastabend@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