| 1 |
From b775fbf532dc01ae53a6fc56168fd30cb4b0c658 Mon Sep 17 00:00:00 2001 |
| 2 |
Message-Id: <b775fbf532dc01ae53a6fc56168fd30cb4b0c658.1676496954.git.osandov@osandov.com> |
| 3 |
From: Martin Rodriguez Reboredo <[email protected]> |
| 4 |
Date: Sun, 4 Sep 2022 15:19:01 +0200 |
| 5 |
Subject: [PATCH] kbuild: Add skip_encoding_btf_enum64 option to pahole |
| 6 |
|
| 7 |
New pahole (version 1.24) generates by default new BTF_KIND_ENUM64 BTF tag, |
| 8 |
which is not supported by stable kernel. |
| 9 |
|
| 10 |
As a result the kernel with CONFIG_DEBUG_INFO_BTF option will fail to |
| 11 |
compile with following error: |
| 12 |
|
| 13 |
BTFIDS vmlinux |
| 14 |
FAILED: load BTF from vmlinux: Invalid argument |
| 15 |
|
| 16 |
New pahole provides --skip_encoding_btf_enum64 option to skip BTF_KIND_ENUM64 |
| 17 |
generation and produce BTF supported by stable kernel. |
| 18 |
|
| 19 |
Adding this option to scripts/pahole-flags.sh. |
| 20 |
|
| 21 |
This change does not have equivalent commit in linus tree, because linus tree |
| 22 |
has support for BTF_KIND_ENUM64 tag, so it does not need to be disabled. |
| 23 |
|
| 24 |
Signed-off-by: Martin Rodriguez Reboredo <[email protected]> |
| 25 |
Signed-off-by: Jiri Olsa <[email protected]> |
| 26 |
Signed-off-by: Greg Kroah-Hartman <[email protected]> |
| 27 |
[Omar: fold in "kbuild: fix up permissions on scripts/pahole-flags.sh"] |
| 28 |
Signed-off-by: Omar Sandoval <[email protected]> |
| 29 |
--- |
| 30 |
scripts/pahole-flags.sh | 4 ++++ |
| 31 |
1 file changed, 4 insertions(+) |
| 32 |
|
| 33 |
diff --git a/scripts/pahole-flags.sh b/scripts/pahole-flags.sh |
| 34 |
index e6093adf4c06..7acee326aa6c 100755 |
| 35 |
--- a/scripts/pahole-flags.sh |
| 36 |
+++ b/scripts/pahole-flags.sh |
| 37 |
@@ -17,4 +17,8 @@ if [ "${pahole_ver}" -ge "121" ]; then |
| 38 |
extra_paholeopt="${extra_paholeopt} --btf_gen_floats" |
| 39 |
fi |
| 40 |
|
| 41 |
+if [ "${pahole_ver}" -ge "124" ]; then |
| 42 |
+ extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_enum64" |
| 43 |
+fi |
| 44 |
+ |
| 45 |
echo ${extra_paholeopt} |
| 46 |
-- |
| 47 |
2.30.2 |
| 48 |
|