public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: linux-kernel@vger.kernel.org
Cc: linux-tip-commits@vger.kernel.org,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	x86@kernel.org
Subject: Re: [tip: objtool/core] x86: Convert unreachable() to BUG()
Date: Mon, 16 Dec 2024 10:32:15 +0100	[thread overview]
Message-ID: <20241216093215.GD12338@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <173313812188.412.17754446990942244796.tip-bot2@tip-bot2>

On Mon, Dec 02, 2024 at 11:15:21AM -0000, tip-bot2 for Peter Zijlstra wrote:
> The following commit has been merged into the objtool/core branch of tip:
> 
> Commit-ID:     2190966fbc14ca2cd4ea76eefeb96a47d8e390df
> Gitweb:        https://git.kernel.org/tip/2190966fbc14ca2cd4ea76eefeb96a47d8e390df
> Author:        Peter Zijlstra <peterz@infradead.org>
> AuthorDate:    Thu, 28 Nov 2024 10:39:02 +01:00
> Committer:     Peter Zijlstra <peterz@infradead.org>
> CommitterDate: Mon, 02 Dec 2024 12:01:43 +01:00
> 
> x86: Convert unreachable() to BUG()
> 
> Avoid unreachable() as it can (and will in the absence of UBSAN)
> generate fallthrough code. Use BUG() so we get a UD2 trap (with
> unreachable annotation).
> 
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
> Link: https://lore.kernel.org/r/20241128094312.028316261@infradead.org


Urgh, one got lost:

vmlinux.o: warning: objtool: page_fault_oops() falls through to next function is_prefetch()

---
 arch/x86/mm/fault.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index e6c469b323cc..ac52255fab01 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -678,7 +678,7 @@ page_fault_oops(struct pt_regs *regs, unsigned long error_code,
 			      ASM_CALL_ARG3,
 			      , [arg1] "r" (regs), [arg2] "r" (address), [arg3] "r" (&info));
 
-		unreachable();
+		BUG();
 	}
 #endif
 

  reply	other threads:[~2024-12-16  9:32 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-28  9:38 [PATCH v2 00/16] objtool: Rewrite annotations Peter Zijlstra
2024-11-28  9:38 ` [PATCH v2 01/16] objtool: Generic annotation infrastructure Peter Zijlstra
2024-12-02 11:15   ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2024-11-28  9:38 ` [PATCH v2 02/16] objtool: Convert ANNOTATE_NOENDBR to ANNOTATE Peter Zijlstra
2024-12-02 11:15   ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2024-11-28  9:38 ` [PATCH v2 03/16] objtool: Convert ANNOTATE_RETPOLINE_SAFE " Peter Zijlstra
2024-12-02 11:15   ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2024-11-28  9:38 ` [PATCH v2 04/16] objtool: Convert instrumentation_{begin,end}() " Peter Zijlstra
2024-12-02 11:15   ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2024-11-28  9:38 ` [PATCH v2 05/16] objtool: Convert VALIDATE_UNRET_BEGIN " Peter Zijlstra
2024-12-02 11:15   ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2024-11-28  9:38 ` [PATCH v2 06/16] objtool: Convert ANNOTATE_IGNORE_ALTERNATIVE " Peter Zijlstra
2024-12-02 11:15   ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2024-11-28  9:38 ` [PATCH v2 07/16] objtool: Convert ANNOTATE_INTRA_FUNCTION_CALL " Peter Zijlstra
2024-12-02 11:15   ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2024-11-28  9:38 ` [PATCH v2 08/16] objtool: Collapse annotate sequences Peter Zijlstra
2024-12-02 11:15   ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2024-11-28  9:39 ` [PATCH v2 09/16] objtool: Collect more annotations in objtool.h Peter Zijlstra
2024-12-02 11:15   ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2024-11-28  9:39 ` [PATCH v2 10/16] unreachable: Unify Peter Zijlstra
2024-12-02 11:15   ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2024-11-28  9:39 ` [PATCH v2 11/16] x86: Convert unreachable() to BUG() Peter Zijlstra
2024-12-02 11:15   ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2024-12-16  9:32     ` Peter Zijlstra [this message]
2024-12-24  9:47       ` [tip: objtool/core] x86/mm: " tip-bot2 for Peter Zijlstra
2024-11-28  9:39 ` [PATCH v2 12/16] loongarch: Use ASM_REACHABLE Peter Zijlstra
2024-12-02 11:15   ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2024-11-28  9:39 ` [PATCH v2 13/16] objtool: Remove annotate_{,un}reachable() Peter Zijlstra
2024-12-02 11:15   ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2024-11-28  9:39 ` [PATCH v2 14/16] objtool: Convert {.UN}REACHABLE to ANNOTATE Peter Zijlstra
2024-12-02 11:15   ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2024-11-28  9:39 ` [PATCH v2 15/16] objtool: Fix ANNOTATE_REACHABLE to be a normal annotation Peter Zijlstra
2024-12-02 11:15   ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2024-11-28  9:39 ` [PATCH v2 16/16] objtool: Warn about unknown annotation types Peter Zijlstra
2024-12-02 11:15   ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2024-11-28 18:44 ` [PATCH v2 00/16] objtool: Rewrite annotations Josh Poimboeuf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241216093215.GD12338@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox