Debian Codegraph @

vmtest/patches/5.10-kbuild-Add-skip_encoding_btf_enum64-option-to-pahole.patch

raw
1 From ecad3312111798d84dac1ce6a853e0ac9de8d505 Mon Sep 17 00:00:00 2001
2 Message-Id: <ecad3312111798d84dac1ce6a853e0ac9de8d505.1676500453.git.osandov@osandov.com>
3 From: Martin Rodriguez Reboredo <[email protected]>
4 Date: Wed, 19 Oct 2022 10:56:04 +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 ---
28 scripts/pahole-flags.sh | 4 ++++
29 1 file changed, 4 insertions(+)
30
31 diff --git a/scripts/pahole-flags.sh b/scripts/pahole-flags.sh
32 index 27445cb72974..8c82173e42e5 100755
33 --- a/scripts/pahole-flags.sh
34 +++ b/scripts/pahole-flags.sh
35 @@ -14,4 +14,8 @@ if [ "${pahole_ver}" -ge "118" ] && [ "${pahole_ver}" -le "121" ]; then
36 extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_vars"
37 fi
38
39 +if [ "${pahole_ver}" -ge "124" ]; then
40 + extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_enum64"
41 +fi
42 +
43 echo ${extra_paholeopt}
44 --
45 2.30.2
46