Re: [GIT PULL] objtool fixes

From: Linus Torvalds
Date: Thu Apr 03 2025 - 12:07:00 EST


On Thu, 3 Apr 2025 at 08:43, Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:
>
> # OBJTOOL ANNOTATION
> 911: .pushsection .discard.annotate_insn,"M",@progbits,8; .long 911b - .; .long 6; .popsection

Josh, what's wrong with just disassembling the damn instruction?

It's what objtool does.

By all means add annotations for when the kernel does something
*special*, and the annotation is "this violates the usual rules".
Those kinds of annotations make perfect sense, and are a "don't
complain about this, because I know I'm doing something odd".

So annotations for things like non-standard stack frames etc are a good thing.

But dammit, clac/stac is *not* that. Quite the reverse. clac/stac *is*
the usual rule. clac/stac *is* the annotation.

Linus