[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y8p4CnJU6T7+17Sw@hirez.programming.kicks-ass.net>
Date: Fri, 20 Jan 2023 12:16:26 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Sandipan Das <sandipan.das@....com>
Cc: "Erhard F." <erhard_f@...lbox.org>, linux-kernel@...r.kernel.org,
Nick Desaulniers <ndesaulniers@...gle.com>,
Joao Moreira <joao@...rdrivepizza.com>
Subject: Re: [bisected] clang 15 built kernel fails to boot, stuck at
"Loading Linux 6.1.1 ...", gcc 12 built kernel with same config boots fine
On Fri, Jan 20, 2023 at 11:20:53AM +0530, Sandipan Das wrote:
> With the combination of defconfig+kvm_guest.config+localyesconfig, the only
> thing that made a difference was the compiler optimization choice. The kernel
> boots up with CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y but not with
> CONFIG_CC_OPTIMIZE_FOR_SIZE=y. Both Clang 15 and 16 kernel builds are affected.
*groan*..
0000000000000350 <amd_pmu_add_event>:
350: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 351: R_X86_64_NONE __fentry__-0x4
355: 48 83 bf 20 01 00 00 00 cmpq $0x0,0x120(%rdi)
35d: 0f 85 00 00 00 00 jne 363 <amd_pmu_add_event+0x13> 35f: R_X86_64_PLT32 __SCT__amd_pmu_branch_add-0x4
363: e9 00 00 00 00 jmp 368 <amd_pmu_add_event+0x18> 364: R_X86_64_PLT32 __x86_return_thunk-0x4
and static_call() can't deal with Jcc, I wonder why we've not seen that
before -- this isn't totally idiotic code-gen and esp. clang is known to
do this (see the retpoline thing).
Let me see if I can do something about that.
Powered by blists - more mailing lists