* [PATCH 2/4] kbuild: Disable AutoFDO and Propeller flags for kernel modules
2025-10-10 21:01 [PATCH 1/4] kbuild: Fix Propeller flags xur
@ 2025-10-10 21:01 ` xur
2025-10-12 2:13 ` kernel test robot
2025-10-12 2:13 ` kernel test robot
2025-10-10 21:01 ` [PATCH 3/4] kbuild: Remove MFS flags from Propeller profile generate builds xur
2025-10-10 21:01 ` [PATCH 4/4] kbuild: Add config to assert profile accuracy for aggressive optimization xur
2 siblings, 2 replies; 8+ messages in thread
From: xur @ 2025-10-10 21:01 UTC (permalink / raw)
To: Alexey Gladkov, Alice Ryhl, Ard Biesheuvel, Bill Wendling,
Han Shen, Ingo Molnar, Josh Poimboeuf, Justin Stitt, Kees Cook,
Linus Walleij, Masahiro Yamada, Miguel Ojeda, Nathan Chancellor,
Nick Desaulniers, Nicolas Schier, Peter Zijlstra,
Tamir Duberstein, Thomas Gleixner, Thomas Weißschuh,
Yabin Cui, Sriraman Tallam
Cc: linux-kbuild, linux-kernel, llvm, Rong Xu
From: Rong Xu <xur@google.com>
AutoFDO and Propeller build currently does not support kernel modules,
but the corresponding build flags are still being set.
This change suppresses these build flags for modules. These flags can
be re-enabled once Propeller support for kernel modules is added.
Signed-off-by: Rong Xu <xur@google.com>
---
Makefile | 9 +++++----
scripts/Makefile.autofdo | 9 ++++++---
scripts/Makefile.lib | 9 ++++++---
scripts/Makefile.propeller | 12 ++++++++----
scripts/Makefile.vmlinux_o | 2 +-
5 files changed, 26 insertions(+), 15 deletions(-)
diff --git a/Makefile b/Makefile
index 6f88b1d3b40d9..f40bee23d5536 100644
--- a/Makefile
+++ b/Makefile
@@ -1230,14 +1230,15 @@ PHONY += vmlinux
# not for decompressors. LDFLAGS_vmlinux in arch/*/boot/compressed/Makefile is
# unrelated; the decompressors just happen to have the same base name,
# arch/*/boot/compressed/vmlinux.
-# Export LDFLAGS_vmlinux only to scripts/Makefile.vmlinux.
+# Export LDFLAGS_vmlinux only to scripts/Makefile.vmlinux, and
+# scripts/Makefile.vmlinux_o.
#
# _LDFLAGS_vmlinux is a workaround for the 'private export' bug:
# https://savannah.gnu.org/bugs/?61463
# For Make > 4.4, the following simple code will work:
-# vmlinux: private export LDFLAGS_vmlinux := $(LDFLAGS_vmlinux)
-vmlinux: private _LDFLAGS_vmlinux := $(LDFLAGS_vmlinux)
-vmlinux: export LDFLAGS_vmlinux = $(_LDFLAGS_vmlinux)
+# vmlinux vmlinux_o: private export LDFLAGS_vmlinux := $(LDFLAGS_vmlinux)
+vmlinux vmlinux_o: private _LDFLAGS_vmlinux := $(LDFLAGS_vmlinux)
+vmlinux vmlinux_o: export LDFLAGS_vmlinux = $(_LDFLAGS_vmlinux)
vmlinux: vmlinux.o $(KBUILD_LDS) modpost
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.vmlinux
diff --git a/scripts/Makefile.autofdo b/scripts/Makefile.autofdo
index 1caf2457e585c..5bcfcef273745 100644
--- a/scripts/Makefile.autofdo
+++ b/scripts/Makefile.autofdo
@@ -14,11 +14,14 @@ ifdef CLANG_AUTOFDO_PROFILE
endif
ifdef CONFIG_LTO_CLANG_THIN
+ _ldflags_autofdo := --mllvm=-enable-fs-discriminator=true --mllvm=-improved-fs-discriminator=true -plugin-opt=thinlto
+ _ldflags_autofdo += -plugin-opt=-split-machine-functions
ifdef CLANG_AUTOFDO_PROFILE
- KBUILD_LDFLAGS += --lto-sample-profile=$(CLANG_AUTOFDO_PROFILE)
+ _ldflags_autofdo += --lto-sample-profile=$(CLANG_AUTOFDO_PROFILE)
endif
- KBUILD_LDFLAGS += --mllvm=-enable-fs-discriminator=true --mllvm=-improved-fs-discriminator=true -plugin-opt=thinlto
- KBUILD_LDFLAGS += -plugin-opt=-split-machine-functions
+ # TODO: change LDFLAGS_vmlinux to KBUILD_LDFLAGS when kernel modules
+ # are supported.
+ LDFLAGS_vmlinux += $(_ldflags_autofdo)
endif
export CFLAGS_AUTOFDO_CLANG
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 53c02fc3b348a..0f6874e8d584d 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -108,20 +108,23 @@ endif
#
# Enable AutoFDO build flags except some files or directories we don't want to
# enable (depends on variables AUTOFDO_PROFILE_obj.o and AUTOFDO_PROFILE).
-#
+# TODO: change '$(part-of-builtin)' to '$(is-kernel-object)' when the AutoFDO
+# build supports modules.
ifeq ($(CONFIG_AUTOFDO_CLANG),y)
_c_flags += $(if $(patsubst n%,, \
- $(AUTOFDO_PROFILE_$(target-stem).o)$(AUTOFDO_PROFILE)$(is-kernel-object)), \
+ $(AUTOFDO_PROFILE_$(target-stem).o)$(AUTOFDO_PROFILE)$(part-of-builtin)), \
$(CFLAGS_AUTOFDO_CLANG))
endif
#
# Enable Propeller build flags except some files or directories we don't want to
# enable (depends on variables AUTOFDO_PROPELLER_obj.o and PROPELLER_PROFILE).
+# TODO: change '$(part-of-builtin)' to '$(is-kernel-object)' when the Propeller
+# build supports modules.
#
ifdef CONFIG_PROPELLER_CLANG
_c_flags += $(if $(patsubst n%,, \
- $(PROPELLER_PROFILE_$(target-stem).o)$(PROPELLER_PROFILE)$(is-kernel-object)), \
+ $(PROPELLER_PROFILE_$(target-stem).o)$(PROPELLER_PROFILE)$(part-of-builtin)), \
$(CFLAGS_PROPELLER_CLANG))
endif
diff --git a/scripts/Makefile.propeller b/scripts/Makefile.propeller
index 48a660128e256..fa018098506b8 100644
--- a/scripts/Makefile.propeller
+++ b/scripts/Makefile.propeller
@@ -3,7 +3,7 @@
# Enable available and selected Clang Propeller features.
ifdef CLANG_PROPELLER_PROFILE_PREFIX
CFLAGS_PROPELLER_CLANG := -fbasic-block-sections=list=$(CLANG_PROPELLER_PROFILE_PREFIX)_cc_profile.txt -ffunction-sections
- KBUILD_LDFLAGS += --symbol-ordering-file=$(CLANG_PROPELLER_PROFILE_PREFIX)_ld_profile.txt --no-warn-symbol-ordering
+ _ldflags_propeller := --symbol-ordering-file=$(CLANG_PROPELLER_PROFILE_PREFIX)_ld_profile.txt --no-warn-symbol-ordering
else
# Starting with Clang v20, the '-fbasic-block-sections=labels' option is
# deprecated. Use the recommended '-fbasic-block-address-map' option.
@@ -26,14 +26,18 @@ endif
ifdef CONFIG_LTO_CLANG_THIN
ifdef CLANG_PROPELLER_PROFILE_PREFIX
- KBUILD_LDFLAGS += --lto-basic-block-sections=$(CLANG_PROPELLER_PROFILE_PREFIX)_cc_profile.txt
+ _ldflags_propeller += --lto-basic-block-sections=$(CLANG_PROPELLER_PROFILE_PREFIX)_cc_profile.txt
else
ifeq ($(call test-ge, $(CONFIG_LLD_VERSION), 200000),y)
- KBUILD_LDFLAGS += --lto-basic-block-address-map
+ _ldflags_propeller += --lto-basic-block-address-map
else
- KBUILD_LDFLAGS += --lto-basic-block-sections=labels
+ _ldflags_propeller += --lto-basic-block-sections=labels
endif
endif
endif
+# TODO: change LDFLAGS_vmlinux to KBUILD_LDFLAGS when kernel modules
+# are supported.
+LDFLAGS_vmlinux += $(_ldflags_propeller)
+
export CFLAGS_PROPELLER_CLANG
diff --git a/scripts/Makefile.vmlinux_o b/scripts/Makefile.vmlinux_o
index 23c8751285d79..9c4f0841e5c5d 100644
--- a/scripts/Makefile.vmlinux_o
+++ b/scripts/Makefile.vmlinux_o
@@ -56,7 +56,7 @@ vmlinux-o-ld-args-$(CONFIG_BUILTIN_MODULE_RANGES) += -Map=$@.map
quiet_cmd_ld_vmlinux.o = LD $@
cmd_ld_vmlinux.o = \
- $(LD) ${KBUILD_LDFLAGS} -r -o $@ \
+ $(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_vmlinux) -r -o $@ \
$(vmlinux-o-ld-args-y) \
$(addprefix -T , $(initcalls-lds)) \
--whole-archive vmlinux.a --no-whole-archive \
--
2.51.0.740.g6adb054d12-goog
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 2/4] kbuild: Disable AutoFDO and Propeller flags for kernel modules
2025-10-10 21:01 ` [PATCH 2/4] kbuild: Disable AutoFDO and Propeller flags for kernel modules xur
@ 2025-10-12 2:13 ` kernel test robot
2025-10-14 19:02 ` Rong Xu
2025-10-12 2:13 ` kernel test robot
1 sibling, 1 reply; 8+ messages in thread
From: kernel test robot @ 2025-10-12 2:13 UTC (permalink / raw)
To: xur, Alexey Gladkov, Alice Ryhl, Ard Biesheuvel, Bill Wendling,
Han Shen, Ingo Molnar, Josh Poimboeuf, Justin Stitt, Kees Cook,
Linus Walleij, Masahiro Yamada, Miguel Ojeda, Nathan Chancellor,
Nick Desaulniers, Nicolas Schier, Peter Zijlstra,
Tamir Duberstein, Thomas Gleixner, Thomas Weißschuh,
Yabin Cui, Sriraman Tallam
Cc: oe-kbuild-all, linux-kbuild, linux-kernel, llvm, Rong Xu
Hi,
kernel test robot noticed the following build warnings:
[auto build test WARNING on kees/for-next/kspp]
[also build test WARNING on linus/master v6.17 next-20251010]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/xur-google-com/kbuild-Disable-AutoFDO-and-Propeller-flags-for-kernel-modules/20251011-050345
base: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/kspp
patch link: https://lore.kernel.org/r/20251010210134.2066321-2-xur%40google.com
patch subject: [PATCH 2/4] kbuild: Disable AutoFDO and Propeller flags for kernel modules
:::::: branch date: 26 hours ago
:::::: commit date: 26 hours ago
config: powerpc-allnoconfig (https://download.01.org/0day-ci/archive/20251012/202510120641.H3SMaB6Q-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251012/202510120641.H3SMaB6Q-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202510120641.H3SMaB6Q-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> powerpc-linux-ld: warning: orphan section `.head.text' from `arch/powerpc/kernel/head_book3s_32.o' being placed in section `.head.text'
>> powerpc-linux-ld: warning: orphan section `__ftr_alt_97' from `arch/powerpc/kernel/head_book3s_32.o' being placed in section `__ftr_alt_97'
>> powerpc-linux-ld: warning: orphan section `__mmu_ftr_fixup' from `arch/powerpc/kernel/head_book3s_32.o' being placed in section `__mmu_ftr_fixup'
>> powerpc-linux-ld: warning: orphan section `__ftr_fixup' from `arch/powerpc/kernel/head_book3s_32.o' being placed in section `__ftr_fixup'
>> powerpc-linux-ld: warning: orphan section `.export_symbol' from `arch/powerpc/kernel/fpu.o' being placed in section `.export_symbol'
>> powerpc-linux-ld: warning: orphan section `.export_symbol' from `init/main.o' being placed in section `.export_symbol'
>> powerpc-linux-ld: warning: orphan section `.init.text' from `init/main.o' being placed in section `.init.text'
>> powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `init/main.o' being placed in section `.rodata.str1.4'
>> powerpc-linux-ld: warning: orphan section `__bug_table' from `init/main.o' being placed in section `__bug_table'
>> powerpc-linux-ld: warning: orphan section `.ref.text' from `init/main.o' being placed in section `.ref.text'
>> powerpc-linux-ld: warning: orphan section `.text.unlikely' from `init/main.o' being placed in section `.text.unlikely'
>> powerpc-linux-ld: warning: orphan section `.data..read_mostly' from `init/main.o' being placed in section `.data..read_mostly'
>> powerpc-linux-ld: warning: orphan section `.data..ro_after_init' from `init/main.o' being placed in section `.data..ro_after_init'
>> powerpc-linux-ld: warning: orphan section `.discard.addressable' from `init/main.o' being placed in section `.discard.addressable'
>> powerpc-linux-ld: warning: orphan section `.init.data' from `init/main.o' being placed in section `.init.data'
>> powerpc-linux-ld: warning: orphan section `.init.rodata' from `init/main.o' being placed in section `.init.rodata'
>> powerpc-linux-ld: warning: orphan section `.init.setup' from `init/main.o' being placed in section `.init.setup'
>> powerpc-linux-ld: warning: orphan section `__param' from `init/main.o' being placed in section `__param'
>> powerpc-linux-ld: warning: orphan section `.export_symbol' from `init/version.o' being placed in section `.export_symbol'
>> powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `init/version.o' being placed in section `.rodata.str1.4'
powerpc-linux-ld: warning: orphan section `.init.text' from `init/version.o' being placed in section `.init.text'
powerpc-linux-ld: warning: orphan section `.discard.addressable' from `init/version.o' being placed in section `.discard.addressable'
powerpc-linux-ld: warning: orphan section `.init.rodata' from `init/version.o' being placed in section `.init.rodata'
powerpc-linux-ld: warning: orphan section `.init.setup' from `init/version.o' being placed in section `.init.setup'
powerpc-linux-ld: warning: orphan section `.note.Linux' from `init/version.o' being placed in section `.note.Linux'
powerpc-linux-ld: warning: orphan section `.init.text' from `init/do_mounts.o' being placed in section `.init.text'
powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `init/do_mounts.o' being placed in section `.rodata.str1.4'
powerpc-linux-ld: warning: orphan section `.text.unlikely' from `init/do_mounts.o' being placed in section `.text.unlikely'
powerpc-linux-ld: warning: orphan section `.init.data' from `init/do_mounts.o' being placed in section `.init.data'
powerpc-linux-ld: warning: orphan section `.init.rodata' from `init/do_mounts.o' being placed in section `.init.rodata'
powerpc-linux-ld: warning: orphan section `.init.setup' from `init/do_mounts.o' being placed in section `.init.setup'
powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `init/noinitramfs.o' being placed in section `.rodata.str1.4'
powerpc-linux-ld: warning: orphan section `.init.text' from `init/noinitramfs.o' being placed in section `.init.text'
powerpc-linux-ld: warning: orphan section `.initcallrootfs.init' from `init/noinitramfs.o' being placed in section `.initcallrootfs.init'
powerpc-linux-ld: warning: orphan section `.export_symbol' from `init/init_task.o' being placed in section `.export_symbol'
powerpc-linux-ld: warning: orphan section `.discard.addressable' from `init/init_task.o' being placed in section `.discard.addressable'
powerpc-linux-ld: warning: orphan section `.export_symbol' from `arch/powerpc/kernel/cputable.o' being placed in section `.export_symbol'
powerpc-linux-ld: warning: orphan section `.init.text' from `arch/powerpc/kernel/cputable.o' being placed in section `.init.text'
powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/cputable.o' being placed in section `.rodata.str1.4'
powerpc-linux-ld: warning: orphan section `__bug_table' from `arch/powerpc/kernel/cputable.o' being placed in section `__bug_table'
powerpc-linux-ld: warning: orphan section `.data..ro_after_init' from `arch/powerpc/kernel/cputable.o' being placed in section `.data..ro_after_init'
powerpc-linux-ld: warning: orphan section `.discard.addressable' from `arch/powerpc/kernel/cputable.o' being placed in section `.discard.addressable'
powerpc-linux-ld: warning: orphan section `.init.data' from `arch/powerpc/kernel/cputable.o' being placed in section `.init.data'
powerpc-linux-ld: warning: orphan section `.export_symbol' from `arch/powerpc/kernel/irq.o' being placed in section `.export_symbol'
powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/irq.o' being placed in section `.rodata.str1.4'
powerpc-linux-ld: warning: orphan section `__bug_table' from `arch/powerpc/kernel/irq.o' being placed in section `__bug_table'
powerpc-linux-ld: warning: orphan section `.init.text' from `arch/powerpc/kernel/irq.o' being placed in section `.init.text'
powerpc-linux-ld: warning: orphan section `.data..read_mostly' from `arch/powerpc/kernel/irq.o' being placed in section `.data..read_mostly'
powerpc-linux-ld: warning: orphan section `.discard.addressable' from `arch/powerpc/kernel/irq.o' being placed in section `.discard.addressable'
powerpc-linux-ld: warning: orphan section `.static_call_sites' from `arch/powerpc/kernel/irq.o' being placed in section `.static_call_sites'
powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/align.o' being placed in section `.rodata.str1.4'
powerpc-linux-ld: warning: orphan section `__ex_table' from `arch/powerpc/kernel/align.o' being placed in section `__ex_table'
powerpc-linux-ld: warning: orphan section `__bug_table' from `arch/powerpc/kernel/align.o' being placed in section `__bug_table'
powerpc-linux-ld: warning: orphan section `__ex_table' from `arch/powerpc/kernel/signal_32.o' being placed in section `__ex_table'
powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/signal_32.o' being placed in section `.rodata.str1.4'
powerpc-linux-ld: warning: orphan section `.export_symbol' from `arch/powerpc/kernel/pmc.o' being placed in section `.export_symbol'
powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/pmc.o' being placed in section `.rodata.str1.4'
powerpc-linux-ld: warning: orphan section `__bug_table' from `arch/powerpc/kernel/pmc.o' being placed in section `__bug_table'
powerpc-linux-ld: warning: orphan section `.discard.addressable' from `arch/powerpc/kernel/pmc.o' being placed in section `.discard.addressable'
powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/vdso.o' being placed in section `.rodata.str1.4'
powerpc-linux-ld: warning: orphan section `.init.text' from `arch/powerpc/kernel/vdso.o' being placed in section `.init.text'
powerpc-linux-ld: warning: orphan section `__bug_table' from `arch/powerpc/kernel/vdso.o' being placed in section `__bug_table'
powerpc-linux-ld: warning: orphan section `.data..ro_after_init' from `arch/powerpc/kernel/vdso.o' being placed in section `.data..ro_after_init'
powerpc-linux-ld: warning: orphan section `.initcall3.init' from `arch/powerpc/kernel/vdso.o' being placed in section `.initcall3.init'
powerpc-linux-ld: warning: orphan section `.export_symbol' from `arch/powerpc/kernel/process.o' being placed in section `.export_symbol'
powerpc-linux-ld: warning: orphan section `.init.text' from `arch/powerpc/kernel/process.o' being placed in section `.init.text'
powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/process.o' being placed in section `.rodata.str1.4'
powerpc-linux-ld: warning: orphan section `.text.unlikely' from `arch/powerpc/kernel/process.o' being placed in section `.text.unlikely'
powerpc-linux-ld: warning: orphan section `__ftr_alt_97' from `arch/powerpc/kernel/process.o' being placed in section `__ftr_alt_97'
powerpc-linux-ld: warning: orphan section `__ftr_fixup' from `arch/powerpc/kernel/process.o' being placed in section `__ftr_fixup'
powerpc-linux-ld: warning: orphan section `__bug_table' from `arch/powerpc/kernel/process.o' being placed in section `__bug_table'
powerpc-linux-ld: warning: orphan section `__ex_table' from `arch/powerpc/kernel/process.o' being placed in section `__ex_table'
powerpc-linux-ld: warning: orphan section `.discard.addressable' from `arch/powerpc/kernel/process.o' being placed in section `.discard.addressable'
powerpc-linux-ld: warning: orphan section `.init.rodata' from `arch/powerpc/kernel/process.o' being placed in section `.init.rodata'
powerpc-linux-ld: warning: orphan section `.init.setup' from `arch/powerpc/kernel/process.o' being placed in section `.init.setup'
powerpc-linux-ld: warning: orphan section `.initcallearly.init' from `arch/powerpc/kernel/process.o' being placed in section `.initcallearly.init'
powerpc-linux-ld: warning: orphan section `.export_symbol' from `arch/powerpc/kernel/idle.o' being placed in section `.export_symbol'
powerpc-linux-ld: warning: orphan section `.init.text' from `arch/powerpc/kernel/idle.o' being placed in section `.init.text'
powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/idle.o' being placed in section `.rodata.str1.4'
powerpc-linux-ld: warning: orphan section `.discard.addressable' from `arch/powerpc/kernel/idle.o' being placed in section `.discard.addressable'
powerpc-linux-ld: warning: orphan section `.init.rodata' from `arch/powerpc/kernel/idle.o' being placed in section `.init.rodata'
powerpc-linux-ld: warning: orphan section `.init.setup' from `arch/powerpc/kernel/idle.o' being placed in section `.init.setup'
powerpc-linux-ld: warning: orphan section `.initcall6.init' from `arch/powerpc/kernel/idle.o' being placed in section `.initcall6.init'
powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/signal.o' being placed in section `.rodata.str1.4'
powerpc-linux-ld: warning: orphan section `__bug_table' from `arch/powerpc/kernel/signal.o' being placed in section `__bug_table'
powerpc-linux-ld: warning: orphan section `.export_symbol' from `arch/powerpc/kernel/sysfs.o' being placed in section `.export_symbol'
powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/sysfs.o' being placed in section `.rodata.str1.4'
powerpc-linux-ld: warning: orphan section `__bug_table' from `arch/powerpc/kernel/sysfs.o' being placed in section `__bug_table'
powerpc-linux-ld: warning: orphan section `.init.text' from `arch/powerpc/kernel/sysfs.o' being placed in section `.init.text'
powerpc-linux-ld: warning: orphan section `.discard.addressable' from `arch/powerpc/kernel/sysfs.o' being placed in section `.discard.addressable'
powerpc-linux-ld: warning: orphan section `.initcall4.init' from `arch/powerpc/kernel/sysfs.o' being placed in section `.initcall4.init'
powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/cacheinfo.o' being placed in section `.rodata.str1.4'
powerpc-linux-ld: warning: orphan section `__bug_table' from `arch/powerpc/kernel/cacheinfo.o' being placed in section `__bug_table'
powerpc-linux-ld: warning: orphan section `.data..once' from `arch/powerpc/kernel/cacheinfo.o' being placed in section `.data..once'
powerpc-linux-ld: warning: orphan section `.export_symbol' from `arch/powerpc/kernel/time.o' being placed in section `.export_symbol'
powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/time.o' being placed in section `.rodata.str1.4'
powerpc-linux-ld: warning: orphan section `.init.text' from `arch/powerpc/kernel/time.o' being placed in section `.init.text'
powerpc-linux-ld: warning: orphan section `.data..once' from `arch/powerpc/kernel/time.o' being placed in section `.data..once'
powerpc-linux-ld: warning: orphan section `.data..read_mostly' from `arch/powerpc/kernel/time.o' being placed in section `.data..read_mostly'
powerpc-linux-ld: warning: orphan section `.data..ro_after_init' from `arch/powerpc/kernel/time.o' being placed in section `.data..ro_after_init'
powerpc-linux-ld: warning: orphan section `.discard.addressable' from `arch/powerpc/kernel/time.o' being placed in section `.discard.addressable'
powerpc-linux-ld: warning: orphan section `.export_symbol' from `arch/powerpc/kernel/prom.o' being placed in section `.export_symbol'
powerpc-linux-ld: warning: orphan section `.init.text' from `arch/powerpc/kernel/prom.o' being placed in section `.init.text'
powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/prom.o' being placed in section `.rodata.str1.4'
powerpc-linux-ld: warning: orphan section `__bug_table' from `arch/powerpc/kernel/prom.o' being placed in section `__bug_table'
powerpc-linux-ld: warning: orphan section `.discard.addressable' from `arch/powerpc/kernel/prom.o' being placed in section `.discard.addressable'
powerpc-linux-ld: warning: orphan section `.init.data' from `arch/powerpc/kernel/prom.o' being placed in section `.init.data'
powerpc-linux-ld: warning: orphan section `.init.rodata' from `arch/powerpc/kernel/prom.o' being placed in section `.init.rodata'
powerpc-linux-ld: warning: orphan section `.init.setup' from `arch/powerpc/kernel/prom.o' being placed in section `.init.setup'
powerpc-linux-ld: warning: orphan section `__ex_table' from `arch/powerpc/kernel/traps.o' being placed in section `__ex_table'
powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/traps.o' being placed in section `.rodata.str1.4'
powerpc-linux-ld: warning: orphan section `__bug_table' from `arch/powerpc/kernel/traps.o' being placed in section `__bug_table'
powerpc-linux-ld: warning: orphan section `.noinstr.text' from `arch/powerpc/kernel/traps.o' being placed in section `.noinstr.text'
powerpc-linux-ld: warning: orphan section `.text.unlikely' from `arch/powerpc/kernel/traps.o' being placed in section `.text.unlikely'
powerpc-linux-ld: warning: orphan section `.export_symbol' from `arch/powerpc/kernel/setup-common.o' being placed in section `.export_symbol'
powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/setup-common.o' being placed in section `.rodata.str1.4'
powerpc-linux-ld: warning: orphan section `.text.unlikely' from `arch/powerpc/kernel/setup-common.o' being placed in section `.text.unlikely'
powerpc-linux-ld: warning: orphan section `.init.text' from `arch/powerpc/kernel/setup-common.o' being placed in section `.init.text'
powerpc-linux-ld: warning: orphan section `.discard.addressable' from `arch/powerpc/kernel/setup-common.o' being placed in section `.discard.addressable'
powerpc-linux-ld: warning: orphan section `.init.data' from `arch/powerpc/kernel/setup-common.o' being placed in section `.init.data'
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/4] kbuild: Disable AutoFDO and Propeller flags for kernel modules
2025-10-12 2:13 ` kernel test robot
@ 2025-10-14 19:02 ` Rong Xu
0 siblings, 0 replies; 8+ messages in thread
From: Rong Xu @ 2025-10-14 19:02 UTC (permalink / raw)
To: kernel test robot
Cc: Alexey Gladkov, Alice Ryhl, Ard Biesheuvel, Bill Wendling,
Han Shen, Ingo Molnar, Josh Poimboeuf, Justin Stitt, Kees Cook,
Linus Walleij, Masahiro Yamada, Miguel Ojeda, Nathan Chancellor,
Nick Desaulniers, Nicolas Schier, Peter Zijlstra,
Tamir Duberstein, Thomas Gleixner, Thomas Weißschuh,
Yabin Cui, Sriraman Tallam, oe-kbuild-all, linux-kbuild,
linux-kernel, llvm
These new warnings are legit. We now pass LDFLAGS_vmlinux to the
linker with the orphan-handling option set to the appropriate warning
level. These warnings are similar to other existing warnings in the
buildlog and they are legit.
-Rong
On Sat, Oct 11, 2025 at 7:13 PM kernel test robot <lkp@intel.com> wrote:
>
> Hi,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on kees/for-next/kspp]
> [also build test WARNING on linus/master v6.17 next-20251010]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
> url: https://github.com/intel-lab-lkp/linux/commits/xur-google-com/kbuild-Disable-AutoFDO-and-Propeller-flags-for-kernel-modules/20251011-050345
> base: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/kspp
> patch link: https://lore.kernel.org/r/20251010210134.2066321-2-xur%40google.com
> patch subject: [PATCH 2/4] kbuild: Disable AutoFDO and Propeller flags for kernel modules
> :::::: branch date: 26 hours ago
> :::::: commit date: 26 hours ago
> config: powerpc-allnoconfig (https://download.01.org/0day-ci/archive/20251012/202510120641.H3SMaB6Q-lkp@intel.com/config)
> compiler: powerpc-linux-gcc (GCC) 15.1.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251012/202510120641.H3SMaB6Q-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/r/202510120641.H3SMaB6Q-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> >> powerpc-linux-ld: warning: orphan section `.head.text' from `arch/powerpc/kernel/head_book3s_32.o' being placed in section `.head.text'
> >> powerpc-linux-ld: warning: orphan section `__ftr_alt_97' from `arch/powerpc/kernel/head_book3s_32.o' being placed in section `__ftr_alt_97'
> >> powerpc-linux-ld: warning: orphan section `__mmu_ftr_fixup' from `arch/powerpc/kernel/head_book3s_32.o' being placed in section `__mmu_ftr_fixup'
> >> powerpc-linux-ld: warning: orphan section `__ftr_fixup' from `arch/powerpc/kernel/head_book3s_32.o' being placed in section `__ftr_fixup'
> >> powerpc-linux-ld: warning: orphan section `.export_symbol' from `arch/powerpc/kernel/fpu.o' being placed in section `.export_symbol'
> >> powerpc-linux-ld: warning: orphan section `.export_symbol' from `init/main.o' being placed in section `.export_symbol'
> >> powerpc-linux-ld: warning: orphan section `.init.text' from `init/main.o' being placed in section `.init.text'
> >> powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `init/main.o' being placed in section `.rodata.str1.4'
> >> powerpc-linux-ld: warning: orphan section `__bug_table' from `init/main.o' being placed in section `__bug_table'
> >> powerpc-linux-ld: warning: orphan section `.ref.text' from `init/main.o' being placed in section `.ref.text'
> >> powerpc-linux-ld: warning: orphan section `.text.unlikely' from `init/main.o' being placed in section `.text.unlikely'
> >> powerpc-linux-ld: warning: orphan section `.data..read_mostly' from `init/main.o' being placed in section `.data..read_mostly'
> >> powerpc-linux-ld: warning: orphan section `.data..ro_after_init' from `init/main.o' being placed in section `.data..ro_after_init'
> >> powerpc-linux-ld: warning: orphan section `.discard.addressable' from `init/main.o' being placed in section `.discard.addressable'
> >> powerpc-linux-ld: warning: orphan section `.init.data' from `init/main.o' being placed in section `.init.data'
> >> powerpc-linux-ld: warning: orphan section `.init.rodata' from `init/main.o' being placed in section `.init.rodata'
> >> powerpc-linux-ld: warning: orphan section `.init.setup' from `init/main.o' being placed in section `.init.setup'
> >> powerpc-linux-ld: warning: orphan section `__param' from `init/main.o' being placed in section `__param'
> >> powerpc-linux-ld: warning: orphan section `.export_symbol' from `init/version.o' being placed in section `.export_symbol'
> >> powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `init/version.o' being placed in section `.rodata.str1.4'
> powerpc-linux-ld: warning: orphan section `.init.text' from `init/version.o' being placed in section `.init.text'
> powerpc-linux-ld: warning: orphan section `.discard.addressable' from `init/version.o' being placed in section `.discard.addressable'
> powerpc-linux-ld: warning: orphan section `.init.rodata' from `init/version.o' being placed in section `.init.rodata'
> powerpc-linux-ld: warning: orphan section `.init.setup' from `init/version.o' being placed in section `.init.setup'
> powerpc-linux-ld: warning: orphan section `.note.Linux' from `init/version.o' being placed in section `.note.Linux'
> powerpc-linux-ld: warning: orphan section `.init.text' from `init/do_mounts.o' being placed in section `.init.text'
> powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `init/do_mounts.o' being placed in section `.rodata.str1.4'
> powerpc-linux-ld: warning: orphan section `.text.unlikely' from `init/do_mounts.o' being placed in section `.text.unlikely'
> powerpc-linux-ld: warning: orphan section `.init.data' from `init/do_mounts.o' being placed in section `.init.data'
> powerpc-linux-ld: warning: orphan section `.init.rodata' from `init/do_mounts.o' being placed in section `.init.rodata'
> powerpc-linux-ld: warning: orphan section `.init.setup' from `init/do_mounts.o' being placed in section `.init.setup'
> powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `init/noinitramfs.o' being placed in section `.rodata.str1.4'
> powerpc-linux-ld: warning: orphan section `.init.text' from `init/noinitramfs.o' being placed in section `.init.text'
> powerpc-linux-ld: warning: orphan section `.initcallrootfs.init' from `init/noinitramfs.o' being placed in section `.initcallrootfs.init'
> powerpc-linux-ld: warning: orphan section `.export_symbol' from `init/init_task.o' being placed in section `.export_symbol'
> powerpc-linux-ld: warning: orphan section `.discard.addressable' from `init/init_task.o' being placed in section `.discard.addressable'
> powerpc-linux-ld: warning: orphan section `.export_symbol' from `arch/powerpc/kernel/cputable.o' being placed in section `.export_symbol'
> powerpc-linux-ld: warning: orphan section `.init.text' from `arch/powerpc/kernel/cputable.o' being placed in section `.init.text'
> powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/cputable.o' being placed in section `.rodata.str1.4'
> powerpc-linux-ld: warning: orphan section `__bug_table' from `arch/powerpc/kernel/cputable.o' being placed in section `__bug_table'
> powerpc-linux-ld: warning: orphan section `.data..ro_after_init' from `arch/powerpc/kernel/cputable.o' being placed in section `.data..ro_after_init'
> powerpc-linux-ld: warning: orphan section `.discard.addressable' from `arch/powerpc/kernel/cputable.o' being placed in section `.discard.addressable'
> powerpc-linux-ld: warning: orphan section `.init.data' from `arch/powerpc/kernel/cputable.o' being placed in section `.init.data'
> powerpc-linux-ld: warning: orphan section `.export_symbol' from `arch/powerpc/kernel/irq.o' being placed in section `.export_symbol'
> powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/irq.o' being placed in section `.rodata.str1.4'
> powerpc-linux-ld: warning: orphan section `__bug_table' from `arch/powerpc/kernel/irq.o' being placed in section `__bug_table'
> powerpc-linux-ld: warning: orphan section `.init.text' from `arch/powerpc/kernel/irq.o' being placed in section `.init.text'
> powerpc-linux-ld: warning: orphan section `.data..read_mostly' from `arch/powerpc/kernel/irq.o' being placed in section `.data..read_mostly'
> powerpc-linux-ld: warning: orphan section `.discard.addressable' from `arch/powerpc/kernel/irq.o' being placed in section `.discard.addressable'
> powerpc-linux-ld: warning: orphan section `.static_call_sites' from `arch/powerpc/kernel/irq.o' being placed in section `.static_call_sites'
> powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/align.o' being placed in section `.rodata.str1.4'
> powerpc-linux-ld: warning: orphan section `__ex_table' from `arch/powerpc/kernel/align.o' being placed in section `__ex_table'
> powerpc-linux-ld: warning: orphan section `__bug_table' from `arch/powerpc/kernel/align.o' being placed in section `__bug_table'
> powerpc-linux-ld: warning: orphan section `__ex_table' from `arch/powerpc/kernel/signal_32.o' being placed in section `__ex_table'
> powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/signal_32.o' being placed in section `.rodata.str1.4'
> powerpc-linux-ld: warning: orphan section `.export_symbol' from `arch/powerpc/kernel/pmc.o' being placed in section `.export_symbol'
> powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/pmc.o' being placed in section `.rodata.str1.4'
> powerpc-linux-ld: warning: orphan section `__bug_table' from `arch/powerpc/kernel/pmc.o' being placed in section `__bug_table'
> powerpc-linux-ld: warning: orphan section `.discard.addressable' from `arch/powerpc/kernel/pmc.o' being placed in section `.discard.addressable'
> powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/vdso.o' being placed in section `.rodata.str1.4'
> powerpc-linux-ld: warning: orphan section `.init.text' from `arch/powerpc/kernel/vdso.o' being placed in section `.init.text'
> powerpc-linux-ld: warning: orphan section `__bug_table' from `arch/powerpc/kernel/vdso.o' being placed in section `__bug_table'
> powerpc-linux-ld: warning: orphan section `.data..ro_after_init' from `arch/powerpc/kernel/vdso.o' being placed in section `.data..ro_after_init'
> powerpc-linux-ld: warning: orphan section `.initcall3.init' from `arch/powerpc/kernel/vdso.o' being placed in section `.initcall3.init'
> powerpc-linux-ld: warning: orphan section `.export_symbol' from `arch/powerpc/kernel/process.o' being placed in section `.export_symbol'
> powerpc-linux-ld: warning: orphan section `.init.text' from `arch/powerpc/kernel/process.o' being placed in section `.init.text'
> powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/process.o' being placed in section `.rodata.str1.4'
> powerpc-linux-ld: warning: orphan section `.text.unlikely' from `arch/powerpc/kernel/process.o' being placed in section `.text.unlikely'
> powerpc-linux-ld: warning: orphan section `__ftr_alt_97' from `arch/powerpc/kernel/process.o' being placed in section `__ftr_alt_97'
> powerpc-linux-ld: warning: orphan section `__ftr_fixup' from `arch/powerpc/kernel/process.o' being placed in section `__ftr_fixup'
> powerpc-linux-ld: warning: orphan section `__bug_table' from `arch/powerpc/kernel/process.o' being placed in section `__bug_table'
> powerpc-linux-ld: warning: orphan section `__ex_table' from `arch/powerpc/kernel/process.o' being placed in section `__ex_table'
> powerpc-linux-ld: warning: orphan section `.discard.addressable' from `arch/powerpc/kernel/process.o' being placed in section `.discard.addressable'
> powerpc-linux-ld: warning: orphan section `.init.rodata' from `arch/powerpc/kernel/process.o' being placed in section `.init.rodata'
> powerpc-linux-ld: warning: orphan section `.init.setup' from `arch/powerpc/kernel/process.o' being placed in section `.init.setup'
> powerpc-linux-ld: warning: orphan section `.initcallearly.init' from `arch/powerpc/kernel/process.o' being placed in section `.initcallearly.init'
> powerpc-linux-ld: warning: orphan section `.export_symbol' from `arch/powerpc/kernel/idle.o' being placed in section `.export_symbol'
> powerpc-linux-ld: warning: orphan section `.init.text' from `arch/powerpc/kernel/idle.o' being placed in section `.init.text'
> powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/idle.o' being placed in section `.rodata.str1.4'
> powerpc-linux-ld: warning: orphan section `.discard.addressable' from `arch/powerpc/kernel/idle.o' being placed in section `.discard.addressable'
> powerpc-linux-ld: warning: orphan section `.init.rodata' from `arch/powerpc/kernel/idle.o' being placed in section `.init.rodata'
> powerpc-linux-ld: warning: orphan section `.init.setup' from `arch/powerpc/kernel/idle.o' being placed in section `.init.setup'
> powerpc-linux-ld: warning: orphan section `.initcall6.init' from `arch/powerpc/kernel/idle.o' being placed in section `.initcall6.init'
> powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/signal.o' being placed in section `.rodata.str1.4'
> powerpc-linux-ld: warning: orphan section `__bug_table' from `arch/powerpc/kernel/signal.o' being placed in section `__bug_table'
> powerpc-linux-ld: warning: orphan section `.export_symbol' from `arch/powerpc/kernel/sysfs.o' being placed in section `.export_symbol'
> powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/sysfs.o' being placed in section `.rodata.str1.4'
> powerpc-linux-ld: warning: orphan section `__bug_table' from `arch/powerpc/kernel/sysfs.o' being placed in section `__bug_table'
> powerpc-linux-ld: warning: orphan section `.init.text' from `arch/powerpc/kernel/sysfs.o' being placed in section `.init.text'
> powerpc-linux-ld: warning: orphan section `.discard.addressable' from `arch/powerpc/kernel/sysfs.o' being placed in section `.discard.addressable'
> powerpc-linux-ld: warning: orphan section `.initcall4.init' from `arch/powerpc/kernel/sysfs.o' being placed in section `.initcall4.init'
> powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/cacheinfo.o' being placed in section `.rodata.str1.4'
> powerpc-linux-ld: warning: orphan section `__bug_table' from `arch/powerpc/kernel/cacheinfo.o' being placed in section `__bug_table'
> powerpc-linux-ld: warning: orphan section `.data..once' from `arch/powerpc/kernel/cacheinfo.o' being placed in section `.data..once'
> powerpc-linux-ld: warning: orphan section `.export_symbol' from `arch/powerpc/kernel/time.o' being placed in section `.export_symbol'
> powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/time.o' being placed in section `.rodata.str1.4'
> powerpc-linux-ld: warning: orphan section `.init.text' from `arch/powerpc/kernel/time.o' being placed in section `.init.text'
> powerpc-linux-ld: warning: orphan section `.data..once' from `arch/powerpc/kernel/time.o' being placed in section `.data..once'
> powerpc-linux-ld: warning: orphan section `.data..read_mostly' from `arch/powerpc/kernel/time.o' being placed in section `.data..read_mostly'
> powerpc-linux-ld: warning: orphan section `.data..ro_after_init' from `arch/powerpc/kernel/time.o' being placed in section `.data..ro_after_init'
> powerpc-linux-ld: warning: orphan section `.discard.addressable' from `arch/powerpc/kernel/time.o' being placed in section `.discard.addressable'
> powerpc-linux-ld: warning: orphan section `.export_symbol' from `arch/powerpc/kernel/prom.o' being placed in section `.export_symbol'
> powerpc-linux-ld: warning: orphan section `.init.text' from `arch/powerpc/kernel/prom.o' being placed in section `.init.text'
> powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/prom.o' being placed in section `.rodata.str1.4'
> powerpc-linux-ld: warning: orphan section `__bug_table' from `arch/powerpc/kernel/prom.o' being placed in section `__bug_table'
> powerpc-linux-ld: warning: orphan section `.discard.addressable' from `arch/powerpc/kernel/prom.o' being placed in section `.discard.addressable'
> powerpc-linux-ld: warning: orphan section `.init.data' from `arch/powerpc/kernel/prom.o' being placed in section `.init.data'
> powerpc-linux-ld: warning: orphan section `.init.rodata' from `arch/powerpc/kernel/prom.o' being placed in section `.init.rodata'
> powerpc-linux-ld: warning: orphan section `.init.setup' from `arch/powerpc/kernel/prom.o' being placed in section `.init.setup'
> powerpc-linux-ld: warning: orphan section `__ex_table' from `arch/powerpc/kernel/traps.o' being placed in section `__ex_table'
> powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/traps.o' being placed in section `.rodata.str1.4'
> powerpc-linux-ld: warning: orphan section `__bug_table' from `arch/powerpc/kernel/traps.o' being placed in section `__bug_table'
> powerpc-linux-ld: warning: orphan section `.noinstr.text' from `arch/powerpc/kernel/traps.o' being placed in section `.noinstr.text'
> powerpc-linux-ld: warning: orphan section `.text.unlikely' from `arch/powerpc/kernel/traps.o' being placed in section `.text.unlikely'
> powerpc-linux-ld: warning: orphan section `.export_symbol' from `arch/powerpc/kernel/setup-common.o' being placed in section `.export_symbol'
> powerpc-linux-ld: warning: orphan section `.rodata.str1.4' from `arch/powerpc/kernel/setup-common.o' being placed in section `.rodata.str1.4'
> powerpc-linux-ld: warning: orphan section `.text.unlikely' from `arch/powerpc/kernel/setup-common.o' being placed in section `.text.unlikely'
> powerpc-linux-ld: warning: orphan section `.init.text' from `arch/powerpc/kernel/setup-common.o' being placed in section `.init.text'
> powerpc-linux-ld: warning: orphan section `.discard.addressable' from `arch/powerpc/kernel/setup-common.o' being placed in section `.discard.addressable'
> powerpc-linux-ld: warning: orphan section `.init.data' from `arch/powerpc/kernel/setup-common.o' being placed in section `.init.data'
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/4] kbuild: Disable AutoFDO and Propeller flags for kernel modules
2025-10-10 21:01 ` [PATCH 2/4] kbuild: Disable AutoFDO and Propeller flags for kernel modules xur
2025-10-12 2:13 ` kernel test robot
@ 2025-10-12 2:13 ` kernel test robot
2025-10-14 19:03 ` Rong Xu
1 sibling, 1 reply; 8+ messages in thread
From: kernel test robot @ 2025-10-12 2:13 UTC (permalink / raw)
To: xur, Alexey Gladkov, Alice Ryhl, Ard Biesheuvel, Bill Wendling,
Han Shen, Ingo Molnar, Josh Poimboeuf, Justin Stitt, Kees Cook,
Linus Walleij, Masahiro Yamada, Miguel Ojeda, Nathan Chancellor,
Nick Desaulniers, Nicolas Schier, Peter Zijlstra,
Tamir Duberstein, Thomas Gleixner, Thomas Weißschuh,
Yabin Cui, Sriraman Tallam
Cc: llvm, oe-kbuild-all, linux-kbuild, linux-kernel, Rong Xu
Hi,
kernel test robot noticed the following build errors:
[auto build test ERROR on kees/for-next/kspp]
[also build test ERROR on linus/master kees/for-next/pstore v6.17 next-20251010]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/xur-google-com/kbuild-Disable-AutoFDO-and-Propeller-flags-for-kernel-modules/20251011-050345
base: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/kspp
patch link: https://lore.kernel.org/r/20251010210134.2066321-2-xur%40google.com
patch subject: [PATCH 2/4] kbuild: Disable AutoFDO and Propeller flags for kernel modules
:::::: branch date: 26 hours ago
:::::: commit date: 26 hours ago
config: loongarch-defconfig (https://download.01.org/0day-ci/archive/20251012/202510120709.Wx3q4Ppg-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251012/202510120709.Wx3q4Ppg-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202510120709.Wx3q4Ppg-lkp@intel.com/
All errors (new ones prefixed by >>):
>> ld.lld: error: -r and -pie may not be used together
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/4] kbuild: Disable AutoFDO and Propeller flags for kernel modules
2025-10-12 2:13 ` kernel test robot
@ 2025-10-14 19:03 ` Rong Xu
0 siblings, 0 replies; 8+ messages in thread
From: Rong Xu @ 2025-10-14 19:03 UTC (permalink / raw)
To: kernel test robot
Cc: Alexey Gladkov, Alice Ryhl, Ard Biesheuvel, Bill Wendling,
Han Shen, Ingo Molnar, Josh Poimboeuf, Justin Stitt, Kees Cook,
Linus Walleij, Masahiro Yamada, Miguel Ojeda, Nathan Chancellor,
Nick Desaulniers, Nicolas Schier, Peter Zijlstra,
Tamir Duberstein, Thomas Gleixner, Thomas Weißschuh,
Yabin Cui, Sriraman Tallam, llvm, oe-kbuild-all, linux-kbuild,
linux-kernel
I'll filter -pie from vmlinux_o build (which produces a relocatable
object) in the new patch.
Thanks,
-Rong
On Sat, Oct 11, 2025 at 7:14 PM kernel test robot <lkp@intel.com> wrote:
>
> Hi,
>
> kernel test robot noticed the following build errors:
>
> [auto build test ERROR on kees/for-next/kspp]
> [also build test ERROR on linus/master kees/for-next/pstore v6.17 next-20251010]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
> url: https://github.com/intel-lab-lkp/linux/commits/xur-google-com/kbuild-Disable-AutoFDO-and-Propeller-flags-for-kernel-modules/20251011-050345
> base: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/kspp
> patch link: https://lore.kernel.org/r/20251010210134.2066321-2-xur%40google.com
> patch subject: [PATCH 2/4] kbuild: Disable AutoFDO and Propeller flags for kernel modules
> :::::: branch date: 26 hours ago
> :::::: commit date: 26 hours ago
> config: loongarch-defconfig (https://download.01.org/0day-ci/archive/20251012/202510120709.Wx3q4Ppg-lkp@intel.com/config)
> compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251012/202510120709.Wx3q4Ppg-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/r/202510120709.Wx3q4Ppg-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> >> ld.lld: error: -r and -pie may not be used together
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/4] kbuild: Remove MFS flags from Propeller profile generate builds
2025-10-10 21:01 [PATCH 1/4] kbuild: Fix Propeller flags xur
2025-10-10 21:01 ` [PATCH 2/4] kbuild: Disable AutoFDO and Propeller flags for kernel modules xur
@ 2025-10-10 21:01 ` xur
2025-10-10 21:01 ` [PATCH 4/4] kbuild: Add config to assert profile accuracy for aggressive optimization xur
2 siblings, 0 replies; 8+ messages in thread
From: xur @ 2025-10-10 21:01 UTC (permalink / raw)
To: Alexey Gladkov, Alice Ryhl, Ard Biesheuvel, Bill Wendling,
Han Shen, Ingo Molnar, Josh Poimboeuf, Justin Stitt, Kees Cook,
Linus Walleij, Masahiro Yamada, Miguel Ojeda, Nathan Chancellor,
Nick Desaulniers, Nicolas Schier, Peter Zijlstra,
Tamir Duberstein, Thomas Gleixner, Thomas Weißschuh,
Yabin Cui, Sriraman Tallam
Cc: linux-kbuild, linux-kernel, llvm, Rong Xu
From: Rong Xu <xur@google.com>
Propeller profile generation requires Machine Function Splitter (MFS)
to be disabled.
Signed-off-by: Rong Xu <xur@google.com>
---
scripts/Makefile.propeller | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/scripts/Makefile.propeller b/scripts/Makefile.propeller
index fa018098506b8..8c3e514dbcc04 100644
--- a/scripts/Makefile.propeller
+++ b/scripts/Makefile.propeller
@@ -13,8 +13,14 @@ else
else
CFLAGS_PROPELLER_CLANG := -fbasic-block-sections=labels
endif
+ # Disable Machine Function Splitter for Propeller.
+ # Propeller profile generation requires Machine Function Splitter to be disabled.
+ # We use -fno-split-machine-functions to override any prior AutoFDO/PGO flags
+ #(in Makefile.lib), assuming Propeller options are applied afterward.
+ CFLAGS_PROPELLER_CLANG += -fno-split-machine-functions
endif
+
# Propeller requires debug information to embed module names in the profiles.
# If CONFIG_DEBUG_INFO is not enabled, set -gmlt option. Skip this for AutoFDO,
# as the option should already be set.
@@ -33,6 +39,8 @@ ifdef CONFIG_LTO_CLANG_THIN
else
_ldflags_propeller += --lto-basic-block-sections=labels
endif
+ # Again, we need to disable Machine Function Splitter.
+ LDFLAGS_vmlinux := $(filter-out -plugin-opt=-split-machine-functions, $(LDFLAGS_vmlinux))
endif
endif
--
2.51.0.740.g6adb054d12-goog
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 4/4] kbuild: Add config to assert profile accuracy for aggressive optimization
2025-10-10 21:01 [PATCH 1/4] kbuild: Fix Propeller flags xur
2025-10-10 21:01 ` [PATCH 2/4] kbuild: Disable AutoFDO and Propeller flags for kernel modules xur
2025-10-10 21:01 ` [PATCH 3/4] kbuild: Remove MFS flags from Propeller profile generate builds xur
@ 2025-10-10 21:01 ` xur
2 siblings, 0 replies; 8+ messages in thread
From: xur @ 2025-10-10 21:01 UTC (permalink / raw)
To: Alexey Gladkov, Alice Ryhl, Ard Biesheuvel, Bill Wendling,
Han Shen, Ingo Molnar, Josh Poimboeuf, Justin Stitt, Kees Cook,
Linus Walleij, Masahiro Yamada, Miguel Ojeda, Nathan Chancellor,
Nick Desaulniers, Nicolas Schier, Peter Zijlstra,
Tamir Duberstein, Thomas Gleixner, Thomas Weißschuh,
Yabin Cui, Sriraman Tallam
Cc: linux-kbuild, linux-kernel, llvm, Rong Xu
From: Rong Xu <xur@google.com>
Adds a build config to AutoFDO to assert that the generated profile
accurately represents the intended workload. This enables Clang to
perform more aggressive optimizations.
Signed-off-by: Rong Xu <xur@google.com>
---
arch/Kconfig | 11 +++++++++++
scripts/Makefile.autofdo | 3 +++
2 files changed, 14 insertions(+)
diff --git a/arch/Kconfig b/arch/Kconfig
index ebe08b9186adc..6fdc676cb0fe4 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -886,6 +886,17 @@ config AUTOFDO_CLANG
If unsure, say N.
+config AUTOFDO_PROFILE_ACCURATE
+ bool "Assert AutoFDO profile is accurate (EXPERIMENTAL)"
+ depends on AUTOFDO_CLANG
+ help
+ This option asserts that the AutoFDO profile (specified
+ in CLANG_AUTOFDO_PROFILE) is collected from a representative
+ workload, allowing the Clang compiler to perform more
+ aggressive optimizations.
+
+ If unsure, say N.
+
config ARCH_SUPPORTS_PROPELLER_CLANG
bool
diff --git a/scripts/Makefile.autofdo b/scripts/Makefile.autofdo
index 5bcfcef273745..36abeae2accdc 100644
--- a/scripts/Makefile.autofdo
+++ b/scripts/Makefile.autofdo
@@ -11,6 +11,9 @@ endif
ifdef CLANG_AUTOFDO_PROFILE
CFLAGS_AUTOFDO_CLANG += -fprofile-sample-use=$(CLANG_AUTOFDO_PROFILE) -ffunction-sections
CFLAGS_AUTOFDO_CLANG += -fsplit-machine-functions
+ifdef CONFIG_AUTOFDO_PROFILE_ACCURATE
+ CFLAGS_AUTOFDO_CLANG += -fprofile-sample-accurate
+endif
endif
ifdef CONFIG_LTO_CLANG_THIN
--
2.51.0.740.g6adb054d12-goog
^ permalink raw reply related [flat|nested] 8+ messages in thread