netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Holzheu <holzheu@linux.vnet.ibm.com>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: ast@fb.com, naveen.n.rao@linux.vnet.ibm.com, davem@davemloft.net,
	netdev@vger.kernel.org
Subject: Re: [PATCH bpf 1/5] bpf, s390x: do not reload skb pointers in non-skb context
Date: Tue, 9 Jan 2018 15:20:37 +0100	[thread overview]
Message-ID: <20180109152037.494db115@TP-holzheu> (raw)
In-Reply-To: <20171214200727.22230-2-daniel@iogearbox.net>

Am Thu, 14 Dec 2017 21:07:23 +0100
schrieb Daniel Borkmann <daniel@iogearbox.net>:

> The assumption of unconditionally reloading skb pointers on
> BPF helper calls where bpf_helper_changes_pkt_data() holds
> true is wrong. There can be different contexts where the
> BPF helper would enforce a reload such as in case of XDP.
> Here, we do have a struct xdp_buff instead of struct sk_buff
> as context, thus this will access garbage.
> 
> JITs only ever need to deal with cached skb pointer reload
> when ld_abs/ind was seen, therefore guard the reload behind
> SEEN_SKB only. Tested on s390x.

Hello Daniel,

Sorry for the late answer - I have been on vacation up to now.
Thanks for fixing / testing this for s390x.

Michael

  reply	other threads:[~2018-01-09 14:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-14 20:07 [PATCH bpf 0/5] Couple of BPF JIT fixes Daniel Borkmann
2017-12-14 20:07 ` [PATCH bpf 1/5] bpf, s390x: do not reload skb pointers in non-skb context Daniel Borkmann
2018-01-09 14:20   ` Michael Holzheu [this message]
2017-12-14 20:07 ` [PATCH bpf 2/5] bpf, ppc64: " Daniel Borkmann
2017-12-14 20:07 ` [PATCH bpf 3/5] bpf: guarantee r1 to be ctx in case of bpf_helper_changes_pkt_data Daniel Borkmann
2017-12-14 20:07 ` [PATCH bpf 4/5] bpf, sparc: fix usage of wrong reg for load_skb_regs after call Daniel Borkmann
2017-12-14 20:07 ` [PATCH bpf 5/5] bpf: add test case for ld_abs and helper changing pkt data Daniel Borkmann
2017-12-15 17:28 ` [PATCH bpf 0/5] Couple of BPF JIT fixes 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=20180109152037.494db115@TP-holzheu \
    --to=holzheu@linux.vnet.ibm.com \
    --cc=ast@fb.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=naveen.n.rao@linux.vnet.ibm.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).