[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z9fcvcjhxPxTSZ23@google.com>
Date: Mon, 17 Mar 2025 08:26:37 +0000
From: Brendan Jackman <jackmanb@...gle.com>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Nathan Chancellor <nathan@...nel.org>
Subject: Re: [PATCH 01/13] x86/traps: Make exc_double_fault() consistently
noreturn
On Fri, Mar 14, 2025 at 12:28:59PM -0700, 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.
Yeah it's pretty nasty, but I don't have a better idea. And we do
really want objtool to work on this code. (I am taking your word for
it on the objtool side issues, I have not researched that).
Reviewed-by: Brendan Jackman <jackmanb@...gle.com>
Powered by blists - more mailing lists