1 From 7b99f75942da332e3f4f865e55a10fec95a30d4f Mon Sep 17 00:00:00 2001
2 From: Alan Maguire <alan.maguire@oracle.com>
3 Date: Wed, 10 May 2023 14:02:41 +0100
4 Subject: bpf: Add --skip_encoding_btf_inconsistent_proto, --btf_gen_optimized to pahole flags for v1.25
6 From: Alan Maguire <alan.maguire@oracle.com>
8 commit 7b99f75942da332e3f4f865e55a10fec95a30d4f upstream.
10 v1.25 of pahole supports filtering out functions with multiple inconsistent
11 function prototypes or optimized-out parameters from the BTF representation.
12 These present problems because there is no additional info in BTF saying which
13 inconsistent prototype matches which function instance to help guide attachment,
14 and functions with optimized-out parameters can lead to incorrect assumptions
15 about register contents.
17 So for now, filter out such functions while adding BTF representations for
18 functions that have "."-suffixes (foo.isra.0) but not optimized-out parameters.
19 This patch assumes that below linked changes land in pahole for v1.25.
21 Issues with pahole filtering being too aggressive in removing functions
22 appear to be resolved now, but CI and further testing will confirm.
24 Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
25 Acked-by: Jiri Olsa <jolsa@kernel.org>
26 Link: https://lore.kernel.org/r/20230510130241.1696561-1-alan.maguire@oracle.com
27 Signed-off-by: Alexei Starovoitov <ast@kernel.org>
28 Signed-off-by: Jiri Olsa <jolsa@kernel.org>
29 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
31 scripts/pahole-flags.sh | 3 +++
32 1 file changed, 3 insertions(+)
34 --- a/scripts/pahole-flags.sh
35 +++ b/scripts/pahole-flags.sh
36 @@ -23,5 +23,8 @@ if [ "${pahole_ver}" -ge "124" ]; then
37 # see PAHOLE_HAS_LANG_EXCLUDE
38 extra_paholeopt="${extra_paholeopt} --lang_exclude=rust"
40 +if [ "${pahole_ver}" -ge "125" ]; then
41 + extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_inconsistent_proto --btf_gen_optimized"
44 echo ${extra_paholeopt}