BPF List
 help / color / mirror / Atom feed
From: Yonghong Song <yonghong.song@linux.dev>
To: Alan Maguire <almagui@kernel.org>, bpf@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Eduard Zingerman <eddyz87@gmail.com>,
	kernel-team@fb.com
Subject: Re: [PATCH bpf-next 2/2] kbuild, bpf: Remove pahole version checks below v1.24
Date: Mon, 23 Nov 2026 18:36:30 -0800	[thread overview]
Message-ID: <9469ded7-6a6b-4753-9165-a5224660529f@linux.dev> (raw)
In-Reply-To: <a29d9ea3-1d36-46e8-914a-32753afb0725@kernel.org>



On 11/23/26 3:18 PM, Alan Maguire wrote:
> On 11/23/26 11:10 PM, Yonghong Song wrote:
>> The previous patch makes CONFIG_DEBUG_INFO_BTF require pahole v1.24, so
>> the Kconfig checks for an older pahole always pass with
>> CONFIG_DEBUG_INFO_BTF.
>>
>> Remove CONFIG_PAHOLE_HAS_LANG_EXCLUDE (pahole v1.24), which is always
>> set with CONFIG_DEBUG_INFO_BTF. Drop it from the dependency of
>> CONFIG_RUST on !CONFIG_DEBUG_INFO_BTF, and always pass
>> --lang_exclude=rust in scripts/Makefile.btf, which is only included
>> with CONFIG_DEBUG_INFO_BTF.
>>
>> CONFIG_PAHOLE_HAS_BTF_TAG (pahole v1.23) is still needed, since
>> btf_type_tag is only used with clang, but it no longer needs the pahole
>> version. Every user of it also checks CONFIG_DEBUG_INFO_BTF, so make it
>> depend on CONFIG_CC_IS_CLANG only.
>>
>> The pahole flags and the resulting config are unchanged, except that
>> CONFIG_PAHOLE_HAS_LANG_EXCLUDE is gone.
>>
>> Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
> one suggestion below, but
>
> Acked-by: Alan Maguire <almagui@kernel.org>
>
>> ---
>>   init/Kconfig         |  2 +-
>>   lib/Kconfig.debug    | 12 +-----------
>>   scripts/Makefile.btf |  2 +-
>>   3 files changed, 3 insertions(+), 13 deletions(-)
>>
>> diff --git a/init/Kconfig b/init/Kconfig
>> index c8a7cfa60a6e..ca7f20462d0c 100644
>> --- a/init/Kconfig
>> +++ b/init/Kconfig
>> @@ -2065,7 +2065,7 @@ config RUST
>>   	depends on !MODVERSIONS || GENDWARFKSYMS
>>   	depends on !GCC_PLUGIN_RANDSTRUCT
>>   	depends on !RANDSTRUCT
>> -	depends on !DEBUG_INFO_BTF || (PAHOLE_HAS_LANG_EXCLUDE && !LTO)
>> +	depends on !DEBUG_INFO_BTF || !LTO
>>   	depends on !CFI || HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC
>>   	select CFI_ICALL_NORMALIZE_INTEGERS if CFI
>>   	depends on !KASAN || CC_IS_CLANG
>> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
>> index 9479034afe5a..c6123d52576e 100644
>> --- a/lib/Kconfig.debug
>> +++ b/lib/Kconfig.debug
>> @@ -409,22 +409,12 @@ config DEBUG_INFO_BTF
>>   	  DWARF type info into equivalent deduplicated BTF type info.
>>   
>>   config PAHOLE_HAS_BTF_TAG
>> -	def_bool PAHOLE_VERSION >= 123
>> -	depends on CC_IS_CLANG
>> +	def_bool CC_IS_CLANG
>>   	help
>>   	  Decide whether pahole emits btf_tag attributes (btf_type_tag and
>>   	  btf_decl_tag) or not. Currently only clang compiler implements
>>   	  these attributes, so make the config depend on CC_IS_CLANG.
>>
> While we're in the area, should we fix this to reflect that gcc has BTF tag
> support now?

I am not an expert for gcc BTF tag thing. I guess some testing are needed if
we want to removing 'depends on CC_IS_CLANG'. This can be a follow-up.

>> -config PAHOLE_HAS_LANG_EXCLUDE
>> -	def_bool PAHOLE_VERSION >= 124
>> -	help
>> -	  Support for the --lang_exclude flag which makes pahole exclude
>> -	  compilation units from the supplied language. Used in Kbuild to
>> -	  omit Rust CUs which are not supported in version 1.24 of pahole,
>> -	  otherwise it would emit malformed kernel and module binaries when
>> -	  using DEBUG_INFO_BTF_MODULES.
>> -
>>   config PAHOLE_HAS_INLINE
>>   	def_bool PAHOLE_VERSION >= 132
>>   	help
>> diff --git a/scripts/Makefile.btf b/scripts/Makefile.btf
>> index 02ff1702e1e8..8cd8c88d4580 100644
>> --- a/scripts/Makefile.btf
>> +++ b/scripts/Makefile.btf
>> @@ -20,7 +20,7 @@ pahole-flags-$(call test-ge, $(pahole-ver), 131) += --btf_features=layout
>>   
>>   endif
>>   
>> -pahole-flags-$(CONFIG_PAHOLE_HAS_LANG_EXCLUDE)		+= --lang_exclude=rust
>> +pahole-flags-y						+= --lang_exclude=rust
>>   
>>   btf-inline := $(CONFIG_DEBUG_INFO_BTF_INLINE)
>>   ifneq ($(btf-inline),)


  reply	other threads:[~2026-11-24  2:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 23:10 [PATCH bpf-next 1/2] lib/Kconfig.debug: Set the minimum required pahole version to v1.24 Yonghong Song
2026-11-23 23:10 ` [PATCH bpf-next 2/2] kbuild, bpf: Remove pahole version checks below v1.24 Yonghong Song
2026-11-23 23:18   ` Alan Maguire
2026-11-24  2:36     ` Yonghong Song [this message]
2026-11-23 23:41   ` bot+bpf-ci
2026-11-24  2:28     ` Yonghong Song
2026-11-23 23:19 ` [PATCH bpf-next 1/2] lib/Kconfig.debug: Set the minimum required pahole version to v1.24 Alan Maguire

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9469ded7-6a6b-4753-9165-a5224660529f@linux.dev \
    --to=yonghong.song@linux.dev \
    --cc=almagui@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=kernel-team@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox