pahole: Add --btf_features_strict to reject unknown BTF features

--btf_features is used to specify the list of requested features
for BTF encoding.  However, it is not strict in rejecting requests
with unknown features; this allows us to use the same parameters
regardless of pahole version.  --btf_features_strict carries out
the same encoding with the same feature set, but will fail if an
unrecognized feature is specified.


  pahole -J --btf_features=enum64,foo

will succeed, while

  pahole -J --btf_features_strict=enum64,foo

will not.

Suggested-by: Andrii Nakryiko <>
Suggested-by: Eduard Zingerman <>
Signed-off-by: Alan Maguire <>
Acked-by: Andrii Nakryiko <>
Acked-by: Eduard Zingerman <>
Acked-by: Jiri Olsa <>
Tested-by: Arnaldo Carvalho de Melo <>
Cc: Alexei Starovoitov <>
Cc: Andrii Nakryiko <>
Cc: Daniel Borkmann <>
Cc: Hao Luo <>
Cc: John Fastabend <>
Cc: KP Singh <>
Cc: Martin KaFai Lau <>
Cc: Mykola Lysenko <>
Cc: Song Liu <>
Cc: Stanislav Fomichev <>
Cc: Yonghong Song <>
Signed-off-by: Arnaldo Carvalho de Melo <>
2 files changed