On Wed, Jan 11, 2023 at 11:16 AM Eric Curtin <ecurtin@xxxxxxxxxx> wrote: > > On Wed, 11 Jan 2023 at 15:34, Neal Gompa <neal@xxxxxxxxx> wrote: > > > > On Wed, Jan 11, 2023 at 10:21 AM Martin Rodriguez Reboredo > > <yakoyoku@xxxxxxxxx> wrote: > > > > > > Version 1.24 of pahole has the capability to exclude compilation units > > > (CUs) of specific languages [1] [2]. Rust, as of writing, is not > > > currently supported by pahole and if it's used with a build that has > > > BTF debugging enabled it results in malformed kernel and module > > > binaries [3]. So it's better for pahole to exclude Rust CUs until > > > support for it arrives. > > > > > > Link: https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=49358dfe2aaae4e90b072332c3e324019826783f [1] > > > Link: https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=8ee363790b7437283c53090a85a9fec2f0b0fbc4 [2] > > > Link: https://github.com/Rust-for-Linux/linux/issues/735 [3] > > > > > > Co-developed-by: Eric Curtin <ecurtin@xxxxxxxxxx> > > > Signed-off-by: Eric Curtin <ecurtin@xxxxxxxxxx> > > > Signed-off-by: Martin Rodriguez Reboredo <yakoyoku@xxxxxxxxx> > > > --- > > > V2 -> V3: Enable pahole option upon comparing with version 1.24 > > > V1 -> V2: Removed dependency on auto.conf > > > > > > init/Kconfig | 2 +- > > > lib/Kconfig.debug | 9 +++++++++ > > > scripts/pahole-flags.sh | 4 ++++ > > > 3 files changed, 14 insertions(+), 1 deletion(-) > > > > > > diff --git a/init/Kconfig b/init/Kconfig > > > index 694f7c160c9c..360aef8d7292 100644 > > > --- a/init/Kconfig > > > +++ b/init/Kconfig > > > @@ -1913,7 +1913,7 @@ config RUST > > > depends on !MODVERSIONS > > > depends on !GCC_PLUGINS > > > depends on !RANDSTRUCT > > > - depends on !DEBUG_INFO_BTF > > > + depends on !DEBUG_INFO_BTF || PAHOLE_HAS_LANG_EXCLUDE > > > > Does the order matter here? I'd rather it prefer a fixed pahole and > > disable BTF only if we can't use pahole properly. > > The order won't matter. > Then it looks good to me! Reviewed-by: Neal Gompa <neal@xxxxxxxxx> -- 真実はいつも一つ!/ Always, there's only one truth!