[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <14c56104-074e-4449-abd6-1290ec506390@linux.dev>
Date: Thu, 30 Jan 2025 08:30:52 -0800
From: Yonghong Song <yonghong.song@...ux.dev>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>, Song Liu <song@...nel.org>,
LKML <linux-kernel@...r.kernel.org>, Kernel Team <kernel-team@...com>
Subject: Re: objtool failure caused some kernel functionality not working
On 1/30/25 12:25 AM, Josh Poimboeuf wrote:
> On Wed, Jan 29, 2025 at 11:10:14PM -0800, Yonghong Song wrote:
>> The llvm18 does not have issues. I tried to bisect what changed in llvm19 and
>> found the following llvm patch is responsible:
>>
>> https://github.com/llvm/llvm-project/pull/96089
>>
>> Basically, the compiler might be able to create a jump target which actually
>> not possible at runtime. For example, in one of examples in the above llvm patch, something
>> like
>> if i >= 3 goto out; /* i unsigned */
>> switch i, label default_unreachable:
>> case 0: goto label1;
>> case 1: goto label2;
>> case 2: goto label3;
>> label1: ...; return;
>> label2: ...; return;
>> label3: ...; return;
>> default_unreachable:
>>
>> I think that this should be a valid code from compiler perspective.
>>
>> Can we fix objtool to handle jump target which is immediately after the func body?Thanks, Yonghong
> I actually have a fix for that, can you try this?
>
> https://git.kernel.org/pub/scm/linux/kernel/git/jpoimboe/linux.git/commit/?h=objtool/core&id=fbb454b7bb39955c324693e73a5cf7e448632553
I applied the above fix and now the kernel works fine and /sys/kernel/debug/tracing/available_filter_functions
can display tracable functions properly.
The fix is in your personal branch. Any plan to send it to upstream repo?
The fix also makes sense to me. So
Tested-by: Yonghong Song <yonghong.song@...ux.dev>
Acked-by: Yonghong Song <yonghong.song@...ux.dev>
Powered by blists - more mailing lists