Netdev List
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Jakub Kicinski <jakub.kicinski@netronome.com>,
	alexei.starovoitov@gmail.com
Cc: oss-drivers@netronome.com, netdev@vger.kernel.org
Subject: Re: [PATCH bpf] nfp: bpf: allow zero-length capabilities
Date: Wed, 9 May 2018 18:18:49 +0200	[thread overview]
Message-ID: <c8b97f7e-4918-e29f-2b8f-02814c28bf96@iogearbox.net> (raw)
In-Reply-To: <20180509024241.24032-1-jakub.kicinski@netronome.com>

On 05/09/2018 04:42 AM, Jakub Kicinski wrote:
> Some BPF capabilities carry no value, they simply indicate feature
> is present.  Our capability parsing loop will exit early if last
> capability is zero-length because it's looking for more than 8 bytes
> of data (8B is our TLV header length).  Allow the last capability to
> be zero-length.
> 
> This bug would lead to driver failing to probe with the following error
> if the last capability FW advertises is zero-length:
> 
>     nfp: BPF capabilities left after parsing, parsed:92 total length:100
>     nfp: invalid BPF capabilities at offset:92
> 
> Note the "parsed" and "length" values are 8 apart.
> 
> No shipping FW runs into this issue, but we can't guarantee that will
> remain the case.
> 
> Fixes: 77a844ee650c ("nfp: bpf: prepare for parsing BPF FW capabilities")
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>

Applied to bpf tree, thanks!

      reply	other threads:[~2018-05-09 16:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09  2:42 [PATCH bpf] nfp: bpf: allow zero-length capabilities Jakub Kicinski
2018-05-09 16:18 ` Daniel Borkmann [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=c8b97f7e-4918-e29f-2b8f-02814c28bf96@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=alexei.starovoitov@gmail.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox