Skip to content

tools: bpftool: update prog names list and fix segfault

Quentin Monnet bpf netdev 1 version Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2tools: bpftool: skip type probe if name is not foundtools/bpf/bpftool/feature.c+8 -01 reply
2/2tools: bpftool: add LSM type to array of prog namestools/bpf/bpftool/prog.c+1 -01 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchSong Liu
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH bpf-next 0/2] tools: bpftool: update prog names list and fix segfault

Although probing features with bpftool works fine if bpftool's array of program and map type names lack the latest kernel additions, it can crash if there are some types missing _in the middle_ of the arrays. The case recently occurred with the addition of the "sk_lookup" name, which skipped the "lsm" in the list.

Let's update the list, and let's make sure it does not crash bpftool again if we omit other types again in the future.

Quentin Monnet (2):
tools: bpftool: skip type probe if name is not found
tools: bpftool: add LSM type to array of prog names

 tools/bpf/bpftool/feature.c | 8 ++++++++
 tools/bpf/bpftool/prog.c    | 1 +
 2 files changed, 9 insertions(+)
Signature · 1 line
2.20.1