From: Bagas Sanjaya <bagasdotme@gmail.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, x86@kernel.org
Cc: Uros Bizjak <ubizjak@gmail.com>, Ingo Molnar <mingo@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Breno Leitao <leitao@debian.org>,
Kent Overstreet <kent.overstreet@linux.dev>,
Takashi Iwai <tiwai@suse.de>,
"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
Mark Brown <broonie@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Arnd Bergmann <arnd@arndb.de>, Stas Sergeev <stsp2@yandex.ru>,
mrwizardwizard <terrym3201@protonmail.com>
Subject: Fwd: error: 'const_pcpu_hot' causes a section type conflict with 'pcpu_hot' when compiling with -flto
Date: Sat, 3 Aug 2024 10:55:45 +0700 [thread overview]
Message-ID: <Zq2qQW62G63dr70s@archie.me> (raw)
[-- Attachment #1: Type: text/plain, Size: 4678 bytes --]
Hi,
mrwizardwizard <terrym3201@protonmail.com> reported kernel FTBFS on bugzilla
(https://bugzilla.kernel.org/show_bug.cgi?id=219099) when the kernel
is built with LTO:
> Hello,
>
> when compiling linux kernel 6.9-6.10 with -flto
>
> compiler outputs:
>
> ./arch/x86/include/asm/current.h:42:25: error: 'const_pcpu_hot' causes a section type conflict with 'pcpu_hot' const_pcpu_hot);
>
He could reproduce the build error on mainline:
>> Can you reproduce above on current mainline (v6.11-rc1)?
>
>
> same messages
>
> mkdir -p /home/mrwizardwizard/Documents/Kernel/linux-6.11-rc1/tools/objtool && make O=/home/mrwizardwizard/Documents/Kernel/linux-6.11-rc1 subdir=tools/objtool --no-print-directory -C objtool
> INSTALL libsubcmd_headers
> CALL scripts/checksyscalls.sh
> CC init/main.o
> AS arch/x86/entry/entry.o
> AS arch/x86/entry/entry_64.o
> arch/x86/entry/entry_64.o: warning: objtool: __switch_to_asm+0x18: stack layout conflict in alternatives: .altinstr_replacement+0x1d
> CC arch/x86/entry/syscall_64.o
> In file included from ./include/asm-generic/percpu.h:7,
> from ./arch/x86/include/asm/percpu.h:616,
> from ./arch/x86/include/asm/current.h:11,
> from ./arch/x86/include/asm/processor.h:17,
> from ./arch/x86/include/asm/timex.h:5,
> from ./include/linux/timex.h:67,
> from ./include/linux/time32.h:13,
> from ./include/linux/time.h:60,
> from ./include/linux/stat.h:19,
> from ./include/linux/module.h:13,
> from init/main.c:17:
> ./arch/x86/include/asm/current.h:42:25: error: 'const_pcpu_hot' causes a section type conflict with 'pcpu_hot'
> 42 | const_pcpu_hot);
> | ^~~~~~~~~~~~~~
> ./arch/x86/include/asm/current.h:38:42: note: 'pcpu_hot' was declared here
> 38 | DECLARE_PER_CPU_ALIGNED(struct pcpu_hot, pcpu_hot);
> | ^~~~~~~~
> make[3]: *** [scripts/Makefile.build:244: init/main.o] Error 1
> make[2]: *** [scripts/Makefile.build:485: init] Error 2
> make[2]: *** Waiting for unfinished jobs....
> CC arch/x86/entry/common.o
> CC arch/x86/events/core.o
> CC arch/x86/entry/vdso/vma.o
> In file included from ./include/asm-generic/percpu.h:7,
> from ./arch/x86/include/asm/percpu.h:616,
> from ./arch/x86/include/asm/current.h:11,
> from ./include/linux/sched.h:12,
> from ./include/linux/ptrace.h:6,
> from ./include/uapi/asm-generic/bpf_perf_event.h:4,
> from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
> from ./include/uapi/linux/bpf_perf_event.h:11,
> from ./include/linux/perf_event.h:18,
> from arch/x86/events/core.c:15:
> ./arch/x86/include/asm/current.h:42:25: error: 'const_pcpu_hot' causes a section type conflict with 'pcpu_hot'
> 42 | const_pcpu_hot);
> | ^~~~~~~~~~~~~~
> ./arch/x86/include/asm/current.h:38:42: note: 'pcpu_hot' was declared here
> 38 | DECLARE_PER_CPU_ALIGNED(struct pcpu_hot, pcpu_hot);
> | ^~~~~~~~
> make[4]: *** [scripts/Makefile.build:244: arch/x86/events/core.o] Error 1
> make[3]: *** [scripts/Makefile.build:485: arch/x86/events] Error 2
> make[3]: *** Waiting for unfinished jobs....
> AR arch/x86/entry/vsyscall/built-in.a
> CC arch/x86/entry/vdso/extable.o
> LDS arch/x86/entry/vdso/vdso.lds
> AS arch/x86/entry/vdso/vdso-note.o
> CC arch/x86/entry/vdso/vclock_gettime.o
> CC arch/x86/entry/vdso/vgetcpu.o
> CC arch/x86/entry/vdso/vgetrandom.o
> AS arch/x86/entry/vdso/vgetrandom-chacha.o
> HOSTCC arch/x86/entry/vdso/vdso2c
> VDSO arch/x86/entry/vdso/vdso64.so.dbg
> OBJCOPY arch/x86/entry/vdso/vdso64.so
> VDSO2C arch/x86/entry/vdso/vdso-image-64.c
> CC arch/x86/entry/vdso/vdso-image-64.o
> AR arch/x86/entry/vdso/built-in.a
> AS arch/x86/entry/thunk.o
> AR arch/x86/entry/built-in.a
> make[2]: *** [scripts/Makefile.build:485: arch/x86] Error 2
> make[1]: *** [/home/mrwizardwizard/Documents/Kernel/linux-6.11-rc1/Makefile:1927: .] Error 2
> make: *** [Makefile:224: __sub-make] Error
For the full build log, see Bugzilla link.
Thanks.
--
An old man doll... just what I always wanted! - Clara
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next reply other threads:[~2024-08-03 3:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-03 3:55 Bagas Sanjaya [this message]
2024-08-07 14:08 ` Fwd: error: 'const_pcpu_hot' causes a section type conflict with 'pcpu_hot' when compiling with -flto Thomas Gleixner
2024-08-07 14:37 ` Uros Bizjak
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=Zq2qQW62G63dr70s@archie.me \
--to=bagasdotme@gmail.com \
--cc=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=broonie@kernel.org \
--cc=dave.hansen@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=jpoimboe@kernel.org \
--cc=kent.overstreet@linux.dev \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=stsp2@yandex.ru \
--cc=terrym3201@protonmail.com \
--cc=tglx@linutronix.de \
--cc=tiwai@suse.de \
--cc=torvalds@linux-foundation.org \
--cc=ubizjak@gmail.com \
--cc=x86@kernel.org \
/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