[PATCH] objtool: Remove btrfs_assertfail() from the noreturn exceptions list

From: Ingo Molnar
Date: Wed Jun 28 2023 - 05:32:33 EST



* Ingo Molnar <mingo@xxxxxxxxxx> wrote:

>
> * Ingo Molnar <mingo@xxxxxxxxxx> wrote:
>
> > Linus,
> >
> > Please pull the latest objtool/core git tree from:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git objtool-core-2023-06-27
> >
> > # HEAD: 301cf77e21317b3465c5e2bb0188df24bbf1c2e2 x86/orc: Make the is_callthunk() definition depend on CONFIG_BPF_JIT=y
>
> I forgot to mention that there's a new conflict when you merge this, in
> tools/objtool/check.c, plus a semantic conflict in the new
> tools/objtool/noreturns.h file - to remove the 'btrfs_assertfail' entry
> from the new tools/objtool/noreturns.h file.
>
> Our -tip CI conflict resolution can be double checked here:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/merge

I believe the (minor & silent) semantic conflict was overlooked in your
upstream merge:

6f612579be9d Merge tag 'objtool-core-2023-06-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

I've fixed it up with the attached patch.

[ There was no harm done to build correctness or functionality AFAICS,
because the extra leftover entry in upstream tools/objtool/noreturns.h is
now meaningless, as btrfs_assertfail() has become a macro that will not
show up as an ELF symbol. ]

Thanks,

Ingo

======================>
From: Ingo Molnar <mingo@xxxxxxxxxx>
Date: Wed, 28 Jun 2023 11:16:03 +0200
Subject: [PATCH] objtool: Remove btrfs_assertfail() from the noreturn
exceptions list

Upstream merge commit:

6f612579be9d Merge tag 'objtool-core-2023-06-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

... generated a (minor) semantic conflict that was not resolved: the btrfs_assertfail()
entry that was removed from the list in tools/objtool/check.c in:

b831306b3b7d ("btrfs: print assertion failure report and stack trace from the same line")

... because btrfs_assertfail() was changed from a noreturn function into
a macro.

But the list was moved to a different file, in a different enumeration format:

6245ce4ab670 ("objtool: Move noreturn function list to separate file")

And has to be removed from tools/objtool/noreturns.h post-merge as well.

Do it explicitly.

Cc: David Sterba <dsterba@xxxxxxxx>
Cc: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
tools/objtool/noreturns.h | 1 -
1 file changed, 1 deletion(-)

diff --git a/tools/objtool/noreturns.h b/tools/objtool/noreturns.h
index 1514e84d5cc4..e45c7cb1d5bc 100644
--- a/tools/objtool/noreturns.h
+++ b/tools/objtool/noreturns.h
@@ -14,7 +14,6 @@ NORETURN(__stack_chk_fail)
NORETURN(__ubsan_handle_builtin_unreachable)
NORETURN(arch_call_rest_init)
NORETURN(arch_cpu_idle_dead)
-NORETURN(btrfs_assertfail)
NORETURN(cpu_bringup_and_idle)
NORETURN(cpu_startup_entry)
NORETURN(do_exit)