[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.21.2503171147090.4236@pobox.suse.cz>
Date: Mon, 17 Mar 2025 11:47:27 +0100 (CET)
From: Miroslav Benes <mbenes@...e.cz>
To: Josh Poimboeuf <jpoimboe@...nel.org>
cc: x86@...nel.org, linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Brendan Jackman <jackmanb@...gle.com>,
Nathan Chancellor <nathan@...nel.org>
Subject: Re: [PATCH 01/13] x86/traps: Make exc_double_fault() consistently
noreturn
On Fri, 14 Mar 2025, Josh Poimboeuf wrote:
> The CONFIG_X86_ESPFIX64 version of exc_double_fault() can return to its
> caller, but the !CONFIG_X86_ESPFIX64 version never does. In the latter
> case the compiler and/or objtool may consider it to be implicitly
> noreturn.
>
> However, due to the currently inflexible way objtool detects noreturns,
> a function's noreturn status needs to be consistent across configs.
>
> The current workaround for this issue is to suppress unreachable
> warnings for exc_double_fault()'s callers. Unfortunately that can
> result in ORC coverage gaps and potentially worse issues like inert
> static calls and silently disabled CPU mitigations.
>
> Instead, prevent exc_double_fault() from ever being implicitly marked
> noreturn by forcing a return behind a never-taken conditional.
>
> Until a more integrated noreturn detection method exists, this is likely
> the least objectionable workaround.
>
> Fixes: 55eeab2a8a11 ("objtool: Ignore exc_double_fault() __noreturn warnings")
> Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>
Reviewed-by: Miroslav Benes <mbenes@...e.cz>
M
Powered by blists - more mailing lists