llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Re: "Bad or missing .orc_unwind table. Disabling unwinder." Clang 19 problem? 6.12.8 problem?
       [not found] ` <20250113214122.g4lluwpzj3tnamx3@jpoimboe>
@ 2025-01-13 23:58   ` Josh Poimboeuf
  2025-01-14  9:51     ` Nathan Chancellor
  0 siblings, 1 reply; 5+ messages in thread
From: Josh Poimboeuf @ 2025-01-13 23:58 UTC (permalink / raw)
  To: Klaus Kusche, Nathan Chancellor
  Cc: peterz, linux-kernel, llvm, Nick Desaulniers

On Mon, Jan 13, 2025 at 01:41:24PM -0800, Josh Poimboeuf wrote:
> On Mon, Jan 13, 2025 at 06:29:10PM +0100, Klaus Kusche wrote:
> > 
> > Hello,
> > 
> > I've submitted a bug report to kernel bugzilla,
> > but it was closed with a hint that I should contact
> > the maintainers and LKML.
> > 
> > https://bugzilla.kernel.org/show_bug.cgi?id=219685
> > 
> > You are listed as the maintainers for x86 stack unwinding.
> > Any ideas about that problem before I submit it to LKML?
> > 
> > Is it possibly related to 
> > 
> > https://bugzilla.kernel.org/show_bug.cgi?id=219686
> > 
> > which appeared at the same time?
> > Should it go to the clang maintainers?
> 
> Hi Klaus,
> 
> Thanks for reporting it.  Indeed it's probably related to the build
> warning:
> 
>   vmlinux.o: warning: objtool: start_unlink_intr+0xb7: can't find switch jump table
> 
> It's probably a kernel bug, possibly triggered by the new compiler.
> I'll see if I can recreate.

[adding some folks]

Nathan, I think this is a Clang 19 issue, where one of the jump table
entries is pointing past the end of the function.  When we saw this in
the past I think it was due to some leftover optimization, where the
jump table entry ended up unused so it was harmless.  Are you aware of
any recent bugs in that area?

Maybe objtool should just ignore such entries?

-- 
Josh

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: "Bad or missing .orc_unwind table. Disabling unwinder." Clang 19 problem? 6.12.8 problem?
  2025-01-13 23:58   ` "Bad or missing .orc_unwind table. Disabling unwinder." Clang 19 problem? 6.12.8 problem? Josh Poimboeuf
@ 2025-01-14  9:51     ` Nathan Chancellor
  2025-01-14  9:59       ` Klaus Kusche
  2025-05-29 13:56       ` 6.15.0: objtool "unexpected end of section" errors with clang 20.1.5 and lto Klaus Kusche
  0 siblings, 2 replies; 5+ messages in thread
From: Nathan Chancellor @ 2025-01-14  9:51 UTC (permalink / raw)
  To: Josh Poimboeuf; +Cc: Klaus Kusche, peterz, linux-kernel, llvm, Nick Desaulniers

Hi Josh,

On Mon, Jan 13, 2025 at 03:58:35PM -0800, Josh Poimboeuf wrote:
> On Mon, Jan 13, 2025 at 01:41:24PM -0800, Josh Poimboeuf wrote:
> > On Mon, Jan 13, 2025 at 06:29:10PM +0100, Klaus Kusche wrote:
> > > 
> > > Hello,
> > > 
> > > I've submitted a bug report to kernel bugzilla,
> > > but it was closed with a hint that I should contact
> > > the maintainers and LKML.
> > > 
> > > https://bugzilla.kernel.org/show_bug.cgi?id=219685
> > > 
> > > You are listed as the maintainers for x86 stack unwinding.
> > > Any ideas about that problem before I submit it to LKML?
> > > 
> > > Is it possibly related to 
> > > 
> > > https://bugzilla.kernel.org/show_bug.cgi?id=219686
> > > 
> > > which appeared at the same time?
> > > Should it go to the clang maintainers?
> > 
> > Hi Klaus,
> > 
> > Thanks for reporting it.  Indeed it's probably related to the build
> > warning:
> > 
> >   vmlinux.o: warning: objtool: start_unlink_intr+0xb7: can't find switch jump table
> > 
> > It's probably a kernel bug, possibly triggered by the new compiler.
> > I'll see if I can recreate.
> 
> [adding some folks]

Thanks for the CC, there was also an issue filed on our GitHub but I
have not had the chance to reply to it yet.

https://github.com/ClangBuiltLinux/linux/issues/2064

> Nathan, I think this is a Clang 19 issue, where one of the jump table
> entries is pointing past the end of the function.  When we saw this in
> the past I think it was due to some leftover optimization, where the
> jump table entry ended up unused so it was harmless.  Are you aware of
> any recent bugs in that area?

I am not aware of any recent bugs there but if you or Klaus have a
configuration file that triggers this, I would be happy to bisect LLVM
to see what change introduced it to give us a better understanding of
what is happening here.

> Maybe objtool should just ignore such entries?

This may be worth doing, especially in the face of the --Werror flag
that is being proposed.

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: "Bad or missing .orc_unwind table. Disabling unwinder." Clang 19 problem? 6.12.8 problem?
  2025-01-14  9:51     ` Nathan Chancellor
@ 2025-01-14  9:59       ` Klaus Kusche
  2025-01-14 17:18         ` Nathan Chancellor
  2025-05-29 13:56       ` 6.15.0: objtool "unexpected end of section" errors with clang 20.1.5 and lto Klaus Kusche
  1 sibling, 1 reply; 5+ messages in thread
From: Klaus Kusche @ 2025-01-14  9:59 UTC (permalink / raw)
  To: Nathan Chancellor, Josh Poimboeuf
  Cc: peterz, linux-kernel, llvm, Nick Desaulniers


Hello,

On 14/01/2025 10:51, Nathan Chancellor wrote:
> Hi Josh,
> 
>> Nathan, I think this is a Clang 19 issue, where one of the jump table
>> entries is pointing past the end of the function.  When we saw this in
>> the past I think it was due to some leftover optimization, where the
>> jump table entry ended up unused so it was harmless.  Are you aware of
>> any recent bugs in that area?
> 
> I am not aware of any recent bugs there but if you or Klaus have a
> configuration file that triggers this, I would be happy to bisect LLVM
> to see what change introduced it to give us a better understanding of
> what is happening here.

Kernel .config files are attached to both

https://bugzilla.kernel.org/show_bug.cgi?id=219685

https://bugzilla.kernel.org/show_bug.cgi?id=219686

-- 
Prof. Dr. Klaus Kusche
Privat: Söllmnitz 32 d, D-07554 Gera/Söllmnitz
036695/859909 klaus.kusche@computerix.info https://www.computerix.info
Dienstlich: DHGE Gera, Weg der Freundschaft 4, D-07546 Gera
0365/4341-306 klaus.kusche@dhge.de https://www.dhge.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: "Bad or missing .orc_unwind table. Disabling unwinder." Clang 19 problem? 6.12.8 problem?
  2025-01-14  9:59       ` Klaus Kusche
@ 2025-01-14 17:18         ` Nathan Chancellor
  0 siblings, 0 replies; 5+ messages in thread
From: Nathan Chancellor @ 2025-01-14 17:18 UTC (permalink / raw)
  To: Klaus Kusche, Josh Poimboeuf; +Cc: peterz, linux-kernel, llvm, Nick Desaulniers

On Tue, Jan 14, 2025 at 10:59:44AM +0100, Klaus Kusche wrote:
> On 14/01/2025 10:51, Nathan Chancellor wrote:
> >> Nathan, I think this is a Clang 19 issue, where one of the jump table
> >> entries is pointing past the end of the function.  When we saw this in
> >> the past I think it was due to some leftover optimization, where the
> >> jump table entry ended up unused so it was harmless.  Are you aware of
> >> any recent bugs in that area?
> > 
> > I am not aware of any recent bugs there but if you or Klaus have a
> > configuration file that triggers this, I would be happy to bisect LLVM
> > to see what change introduced it to give us a better understanding of
> > what is happening here.
> 
> Kernel .config files are attached to both
> 
> https://bugzilla.kernel.org/show_bug.cgi?id=219685
> 
> https://bugzilla.kernel.org/show_bug.cgi?id=219686

Thanks a lot, I missed that since I do not interact with Bugzilla much.

I bisected this change in behavior to LLVM commit 64ed699b3d81 ("Reland
"[SimplifyCFG] When only one case value is missing, replace default with
that case (#76669)"") [1]. I can see how that would cause this issue but
I am not sure how it is specifically interacting with this particular
kernel code. I am going to try and tease out a reproducer for this and
report it upstream but it would still probably be good to consider if
objtool could handle this, especially in the face of the upcoming
--Werror.

[1]: https://github.com/llvm/llvm-project/commit/64ed699b3d811407e5a9f1111f63e11dc7f7dd80

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* 6.15.0: objtool "unexpected end of section" errors with clang 20.1.5 and lto
  2025-01-14  9:51     ` Nathan Chancellor
  2025-01-14  9:59       ` Klaus Kusche
@ 2025-05-29 13:56       ` Klaus Kusche
  1 sibling, 0 replies; 5+ messages in thread
From: Klaus Kusche @ 2025-05-29 13:56 UTC (permalink / raw)
  To: Nathan Chancellor, Josh Poimboeuf
  Cc: peterz, linux-kernel, llvm, Nick Desaulniers


Hello,

Compiling 6.15.0 with clang 20.1.5 and full lto, 
I got several error messages "unexpected end of section".

See https://bugzilla.kernel.org/show_bug.cgi?id=220174

(kernel .config attached to bugzilla bug)

Klaus Kusche

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-05-29 14:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <b248a0fb-e182-42e3-abf5-83945ee992f6@computerix.info>
     [not found] ` <20250113214122.g4lluwpzj3tnamx3@jpoimboe>
2025-01-13 23:58   ` "Bad or missing .orc_unwind table. Disabling unwinder." Clang 19 problem? 6.12.8 problem? Josh Poimboeuf
2025-01-14  9:51     ` Nathan Chancellor
2025-01-14  9:59       ` Klaus Kusche
2025-01-14 17:18         ` Nathan Chancellor
2025-05-29 13:56       ` 6.15.0: objtool "unexpected end of section" errors with clang 20.1.5 and lto Klaus Kusche

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).