public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@kernel.org>
To: stable@vger.kernel.org
Cc: bpf@vger.kernel.org, "Arnaldo Carvalho de Melo" <acme@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"Martin Rodriguez Reboredo" <yakoyoku@gmail.com>,
	"Andrii Nakryiko" <andrii@kernel.org>,
	"Javier Martinez Canillas" <javierm@redhat.com>,
	"Ilya Leoshkevich" <iii@linux.ibm.com>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Philip Müller" <philm@manjaro.org>
Subject: [PATCH stable 5.10 5/5] kbuild: Add skip_encoding_btf_enum64 option to pahole
Date: Wed, 19 Oct 2022 10:56:04 +0200	[thread overview]
Message-ID: <20221019085604.1017583-6-jolsa@kernel.org> (raw)
In-Reply-To: <20221019085604.1017583-1-jolsa@kernel.org>

From: Martin Rodriguez Reboredo <yakoyoku@gmail.com>

New pahole (version 1.24) generates by default new BTF_KIND_ENUM64 BTF tag,
which is not supported by stable kernel.

As a result the kernel with CONFIG_DEBUG_INFO_BTF option will fail to
compile with following error:

  BTFIDS  vmlinux
FAILED: load BTF from vmlinux: Invalid argument

New pahole provides --skip_encoding_btf_enum64 option to skip BTF_KIND_ENUM64
generation and produce BTF supported by stable kernel.

Adding this option to scripts/pahole-flags.sh.

This change does not have equivalent commit in linus tree, because linus tree
has support for BTF_KIND_ENUM64 tag, so it does not need to be disabled.

Signed-off-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 scripts/pahole-flags.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/pahole-flags.sh b/scripts/pahole-flags.sh
index 27445cb72974..8c82173e42e5 100755
--- a/scripts/pahole-flags.sh
+++ b/scripts/pahole-flags.sh
@@ -14,4 +14,8 @@ if [ "${pahole_ver}" -ge "118" ] && [ "${pahole_ver}" -le "121" ]; then
 	extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_vars"
 fi
 
+if [ "${pahole_ver}" -ge "124" ]; then
+	extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_enum64"
+fi
+
 echo ${extra_paholeopt}
-- 
2.37.3


  parent reply	other threads:[~2022-10-19 13:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-19  8:55 [PATCH stable 5.10 0/5] kbuild: Fix compilation for latest pahole release Jiri Olsa
2022-10-19  8:56 ` [PATCH stable 5.10 1/5] bpf: Generate BTF_KIND_FLOAT when linking vmlinux Jiri Olsa
2022-10-19  8:56 ` [PATCH stable 5.10 2/5] kbuild: Quote OBJCOPY var to avoid a pahole call break the build Jiri Olsa
2022-10-19 10:28   ` Greg KH
2022-10-19 11:18     ` Jiri Olsa
2022-10-19  8:56 ` [PATCH stable 5.10 3/5] kbuild: skip per-CPU BTF generation for pahole v1.18-v1.21 Jiri Olsa
2022-10-19  8:56 ` [PATCH stable 5.10 4/5] kbuild: Unify options for BTF generation for vmlinux and modules Jiri Olsa
2022-10-19  8:56 ` Jiri Olsa [this message]
2022-10-19 14:55 ` [PATCH stable 5.10 0/5] kbuild: Fix compilation for latest pahole release Greg KH
2022-10-19 15:30   ` Jiri Olsa
2022-10-26 16:44 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221019085604.1017583-6-jolsa@kernel.org \
    --to=jolsa@kernel.org \
    --cc=acme@kernel.org \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=iii@linux.ibm.com \
    --cc=javierm@redhat.com \
    --cc=nathan@kernel.org \
    --cc=philm@manjaro.org \
    --cc=stable@vger.kernel.org \
    --cc=yakoyoku@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox