bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf] scripts: require pahole v1.16 when generating BTF
@ 2020-06-08  9:42 Lorenz Bauer
  2020-06-08 17:33 ` Yonghong Song
  0 siblings, 1 reply; 3+ messages in thread
From: Lorenz Bauer @ 2020-06-08  9:42 UTC (permalink / raw)
  To: daniel, ast, yhs, bpf; +Cc: kernel-team, Lorenz Bauer, Ivan Babrou

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: 15d83c4d7cef ("bpf: Allow loading of a bpf_iter program")
Suggested-by: Ivan Babrou <ivan@cloudflare.com>
Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
---
 scripts/link-vmlinux.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index 3adef49250af..a37875904ca6 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -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
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf] scripts: require pahole v1.16 when generating BTF
  2020-06-08  9:42 [PATCH bpf] scripts: require pahole v1.16 when generating BTF Lorenz Bauer
@ 2020-06-08 17:33 ` Yonghong Song
  2020-06-09 18:08   ` Alexei Starovoitov
  0 siblings, 1 reply; 3+ messages in thread
From: Yonghong Song @ 2020-06-08 17:33 UTC (permalink / raw)
  To: Lorenz Bauer, daniel, ast, bpf; +Cc: kernel-team, Ivan Babrou


On 6/8/20 2:42 AM, Lorenz Bauer wrote:
> 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: 15d83c4d7cef ("bpf: Allow loading of a bpf_iter program")
> Suggested-by: Ivan Babrou <ivan@cloudflare.com>
> Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>

Acked-by: Yonghong Song <yhs@fb.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf] scripts: require pahole v1.16 when generating BTF
  2020-06-08 17:33 ` Yonghong Song
@ 2020-06-09 18:08   ` Alexei Starovoitov
  0 siblings, 0 replies; 3+ messages in thread
From: Alexei Starovoitov @ 2020-06-09 18:08 UTC (permalink / raw)
  To: Yonghong Song
  Cc: Lorenz Bauer, daniel, Alexei Starovoitov, bpf, kernel-team, Ivan Babrou

On Mon, Jun 8, 2020 at 10:33 AM Yonghong Song <yhs@fb.com> wrote:
>
>
> On 6/8/20 2:42 AM, Lorenz Bauer wrote:
> > 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: 15d83c4d7cef ("bpf: Allow loading of a bpf_iter program")
> > Suggested-by: Ivan Babrou <ivan@cloudflare.com>
> > Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
>
> Acked-by: Yonghong Song <yhs@fb.com>

Applied. Thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-09 18:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-08  9:42 [PATCH bpf] scripts: require pahole v1.16 when generating BTF Lorenz Bauer
2020-06-08 17:33 ` Yonghong Song
2020-06-09 18:08   ` Alexei Starovoitov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).