scripts: require pahole v1.16 when generating BTF
PATCH 1/1 scripts: require pahole v1.16 when generating BTF
bpf_iter requires the kernel BTF to be generated with pahole >= 1.16, since otherwise the function definitions that the iterator attaches to are not included. This failure mode is indistiguishable from trying to attach to an iterator that really doesn't exist.
Since it's really easy to miss this requirement, bump the pahole version check used at build time to at least 1.16.
--- scripts/link-vmlinux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/link-vmlinux.sh +2 -2
@@ -143,8 +143,8 @@ gen_btf() fi pahole_ver=$(${PAHOLE} --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/') - if [ "${pahole_ver}" -lt "113" ]; then - echo >&2 "BTF: ${1}: pahole version $(${PAHOLE} --version) is too old, need at least v1.13" + if [ "${pahole_ver}" -lt "116" ]; then + echo >&2 "BTF: ${1}: pahole version $(${PAHOLE} --version) is too old, need at least v1.16" return 1 fi
Signature · 1 line
2.25.1
Quoted 6 lines · Lorenz Bauer
bpf_iterrequires the kernel BTF to be generated with pahole >= 1.16, since otherwise the function definitions that the iterator attaches to are not included. This failure mode is indistiguishable from trying to attach to an iterator that really doesn't exist.
Quoted 6 lines
Since it's really easy to miss this requirement, bump the pahole version check used at build time to at least 1.16.
Fixes 15d83c4d7cef ("bpf: Allow loading of a bpf_iter program")Suggested-by Ivan Babrou <[email protected]>Signed-off-by Lorenz Bauer <[email protected]>
Alexei Starovoitov
AppliedQuoted 9 lines · Yonghong Song
Quoted 6 lines · Lorenz Bauer
bpf_iterrequires the kernel BTF to be generated with pahole >= 1.16, since otherwise the function definitions that the iterator attaches to are not included. This failure mode is indistiguishable from trying to attach to an iterator that really doesn't exist.
Quoted 8 lines
Quoted 6 lines
Since it's really easy to miss this requirement, bump the pahole version check used at build time to at least 1.16.
Fixes 15d83c4d7cef ("bpf: Allow loading of a bpf_iter program")Suggested-by Ivan Babrou <[email protected]>Signed-off-by Lorenz Bauer <[email protected]>Acked-by Yonghong Song <[email protected]>
Applied. Thanks