diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-05-08 19:42:40 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-05-09 18:17:17 +0200 |
commit | 26aeb9daa02cd37178321cf915efd3d5eb8b0511 (patch) | |
tree | b72892101d3d1061974fb4086fe5d1b198f6ca0a /tools/perf/scripts/python/call-graph-from-sql.py | |
parent | 3148dedfe79e422f448a10250d3e2cdf8b7ee617 (diff) |
nfp: bpf: allow zero-length capabilities
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>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions