2022-09-06 13:59:04

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 5.15 102/107] kbuild: Add skip_encoding_btf_enum64 option to pahole

From: Martin Rodriguez Reboredo <[email protected]>

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 <[email protected]>
Signed-off-by: Jiri Olsa <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
scripts/pahole-flags.sh | 4 ++++
1 file changed, 4 insertions(+)

--- a/scripts/pahole-flags.sh
+++ b/scripts/pahole-flags.sh
@@ -17,4 +17,8 @@ if [ "${pahole_ver}" -ge "121" ]; then
extra_paholeopt="${extra_paholeopt} --btf_gen_floats"
fi

+if [ "${pahole_ver}" -ge "124" ]; then
+ extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_enum64"
+fi
+
echo ${extra_paholeopt}



2022-09-16 11:24:40

by Thorsten Leemhuis

[permalink] [raw]
Subject: Re: [PATCH 5.15 102/107] kbuild: Add skip_encoding_btf_enum64 option to pahole

On 06.09.22 14:31, Greg Kroah-Hartman wrote:
> From: Martin Rodriguez Reboredo <[email protected]>
>
> New pahole (version 1.24) generates by default new BTF_KIND_ENUM64 BTF tag,
> which is not supported by stable kernel.

Martin, when you wrote "not supported by stable kernel", did you mean
just 5.15.y or 5.19.y as well? Because I ran into...

> 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

...this compile error when compiling 5.19.9 for F37 and from a quick
look into this it seems this was caused by a update of dwarves to 1.24
that recently landed in that distribution. This patch seems to fix the
problem (it got past the point of the error, but modules are still
compiling).

Ciao, Thorsten

> 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 <[email protected]>
> Signed-off-by: Jiri Olsa <[email protected]>
> Signed-off-by: Greg Kroah-Hartman <[email protected]>
> ---
> scripts/pahole-flags.sh | 4 ++++
> 1 file changed, 4 insertions(+)
>
> --- a/scripts/pahole-flags.sh
> +++ b/scripts/pahole-flags.sh
> @@ -17,4 +17,8 @@ if [ "${pahole_ver}" -ge "121" ]; then
> extra_paholeopt="${extra_paholeopt} --btf_gen_floats"
> fi
>
> +if [ "${pahole_ver}" -ge "124" ]; then
> + extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_enum64"
> +fi
> +
> echo ${extra_paholeopt}
>
>

2022-09-16 13:54:26

by Jiri Olsa

[permalink] [raw]
Subject: Re: [PATCH 5.15 102/107] kbuild: Add skip_encoding_btf_enum64 option to pahole

On Fri, Sep 16, 2022 at 11:21:46AM +0100, Thorsten Leemhuis wrote:
> On 06.09.22 14:31, Greg Kroah-Hartman wrote:
> > From: Martin Rodriguez Reboredo <[email protected]>
> >
> > New pahole (version 1.24) generates by default new BTF_KIND_ENUM64 BTF tag,
> > which is not supported by stable kernel.
>
> Martin, when you wrote "not supported by stable kernel", did you mean
> just 5.15.y or 5.19.y as well? Because I ran into...
>
> > 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
>
> ...this compile error when compiling 5.19.9 for F37 and from a quick
> look into this it seems this was caused by a update of dwarves to 1.24
> that recently landed in that distribution. This patch seems to fix the
> problem (it got past the point of the error, but modules are still
> compiling).

hi,
IIUC Martin planned to send that for 5.19, I can do that if needed

jirka

>
> Ciao, Thorsten
>
> > 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 <[email protected]>
> > Signed-off-by: Jiri Olsa <[email protected]>
> > Signed-off-by: Greg Kroah-Hartman <[email protected]>
> > ---
> > scripts/pahole-flags.sh | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > --- a/scripts/pahole-flags.sh
> > +++ b/scripts/pahole-flags.sh
> > @@ -17,4 +17,8 @@ if [ "${pahole_ver}" -ge "121" ]; then
> > extra_paholeopt="${extra_paholeopt} --btf_gen_floats"
> > fi
> >
> > +if [ "${pahole_ver}" -ge "124" ]; then
> > + extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_enum64"
> > +fi
> > +
> > echo ${extra_paholeopt}
> >
> >

Subject: Re: [PATCH 5.15 102/107] kbuild: Add skip_encoding_btf_enum64 option to pahole

On 9/16/22 07:21, Thorsten Leemhuis wrote:
> On 06.09.22 14:31, Greg Kroah-Hartman wrote:
>> From: Martin Rodriguez Reboredo <[email protected]>
>>
>> New pahole (version 1.24) generates by default new BTF_KIND_ENUM64 BTF tag,
>> which is not supported by stable kernel.
>
> Martin, when you wrote "not supported by stable kernel", did you mean
> just 5.15.y or 5.19.y as well? Because I ran into...
>
>> 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
>
> ...this compile error when compiling 5.19.9 for F37 and from a quick
> look into this it seems this was caused by a update of dwarves to 1.24
> that recently landed in that distribution. This patch seems to fix the
> problem (it got past the point of the error, but modules are still
> compiling).

Thorsten, by stable I've meant both current stable and longterm, i.e.
5.19 and below, and yes, I didn't sent a patch according to the stable
submission guidelines for 5.19 in time so I apologize for that. Gonna
send the patch for it. Thanks for reminding me.