* [PATCH stable 5.15] bpf: Add --skip_encoding_btf_inconsistent_proto, --btf_gen_optimized to pahole flags for v1.25
@ 2024-01-22 8:03 Jiri Olsa
2024-01-22 17:46 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Jiri Olsa @ 2024-01-22 8:03 UTC (permalink / raw)
To: stable; +Cc: bpf, Daniel Borkmann, Alan Maguire, Arnaldo Carvalho de Melo
From: Alan Maguire <alan.maguire@oracle.com>
commit 7b99f75942da332e3f4f865e55a10fec95a30d4f upstream.
[ small context conflict because of not backported --lang_exclude=rust
option, which is not needed in 5.15 ]
v1.25 of pahole supports filtering out functions with multiple inconsistent
function prototypes or optimized-out parameters from the BTF representation.
These present problems because there is no additional info in BTF saying which
inconsistent prototype matches which function instance to help guide attachment,
and functions with optimized-out parameters can lead to incorrect assumptions
about register contents.
So for now, filter out such functions while adding BTF representations for
functions that have "."-suffixes (foo.isra.0) but not optimized-out parameters.
This patch assumes that below linked changes land in pahole for v1.25.
Issues with pahole filtering being too aggressive in removing functions
appear to be resolved now, but CI and further testing will confirm.
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/r/20230510130241.1696561-1-alan.maguire@oracle.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
scripts/pahole-flags.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/pahole-flags.sh b/scripts/pahole-flags.sh
index d38fa6d84d62..5c724f697100 100755
--- a/scripts/pahole-flags.sh
+++ b/scripts/pahole-flags.sh
@@ -20,5 +20,8 @@ fi
if [ "${pahole_ver}" -ge "124" ]; then
extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_enum64"
fi
+if [ "${pahole_ver}" -ge "125" ]; then
+ extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_inconsistent_proto --btf_gen_optimized"
+fi
echo ${extra_paholeopt}
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH stable 5.15] bpf: Add --skip_encoding_btf_inconsistent_proto, --btf_gen_optimized to pahole flags for v1.25
2024-01-22 8:03 [PATCH stable 5.15] bpf: Add --skip_encoding_btf_inconsistent_proto, --btf_gen_optimized to pahole flags for v1.25 Jiri Olsa
@ 2024-01-22 17:46 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2024-01-22 17:46 UTC (permalink / raw)
To: Jiri Olsa
Cc: stable, bpf, Daniel Borkmann, Alan Maguire,
Arnaldo Carvalho de Melo
On Mon, Jan 22, 2024 at 09:03:29AM +0100, Jiri Olsa wrote:
> From: Alan Maguire <alan.maguire@oracle.com>
>
> commit 7b99f75942da332e3f4f865e55a10fec95a30d4f upstream.
>
> [ small context conflict because of not backported --lang_exclude=rust
> option, which is not needed in 5.15 ]
>
> v1.25 of pahole supports filtering out functions with multiple inconsistent
> function prototypes or optimized-out parameters from the BTF representation.
> These present problems because there is no additional info in BTF saying which
> inconsistent prototype matches which function instance to help guide attachment,
> and functions with optimized-out parameters can lead to incorrect assumptions
> about register contents.
>
> So for now, filter out such functions while adding BTF representations for
> functions that have "."-suffixes (foo.isra.0) but not optimized-out parameters.
> This patch assumes that below linked changes land in pahole for v1.25.
>
> Issues with pahole filtering being too aggressive in removing functions
> appear to be resolved now, but CI and further testing will confirm.
>
> Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
> Acked-by: Jiri Olsa <jolsa@kernel.org>
> Link: https://lore.kernel.org/r/20230510130241.1696561-1-alan.maguire@oracle.com
> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
> scripts/pahole-flags.sh | 3 +++
> 1 file changed, 3 insertions(+)
Now queued up, thanks.
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-22 17:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-22 8:03 [PATCH stable 5.15] bpf: Add --skip_encoding_btf_inconsistent_proto, --btf_gen_optimized to pahole flags for v1.25 Jiri Olsa
2024-01-22 17:46 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox