Skip to content

Commit 21a85bd

Browse files
lmbAlexei Starovoitov
authored andcommitted
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. Fixes: 15d83c4 ("bpf: Allow loading of a bpf_iter program") Suggested-by: Ivan Babrou <[email protected]> Signed-off-by: Lorenz Bauer <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Yonghong Song <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent 75e68e5 commit 21a85bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/link-vmlinux.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ gen_btf()
143143
fi
144144

145145
pahole_ver=$(${PAHOLE} --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/')
146-
if [ "${pahole_ver}" -lt "113" ]; then
147-
echo >&2 "BTF: ${1}: pahole version $(${PAHOLE} --version) is too old, need at least v1.13"
146+
if [ "${pahole_ver}" -lt "116" ]; then
147+
echo >&2 "BTF: ${1}: pahole version $(${PAHOLE} --version) is too old, need at least v1.16"
148148
return 1
149149
fi
150150

0 commit comments

Comments
 (0)