From: Thorsten Leemhuis <regressions@leemhuis.info>
To: Erhard Furtner <erhard_f@mailbox.org>,
Klara Modin <klarasmodin@gmail.com>
Cc: Bagas Sanjaya <bagasdotme@gmail.com>,
x86@kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
jpoimboe@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Breno Leitao <leitao@debian.org>, Borislav Petkov <bp@alien8.de>,
Linux regressions mailing list <regressions@lists.linux.dev>
Subject: Re: [bisected] Kernel v6.9-rc3 fails to boot on a Thinkpad T60 with MITIGATION_RETHUNK=y (regression from v6.8.5)
Date: Wed, 17 Apr 2024 10:40:28 +0200 [thread overview]
Message-ID: <d721ab1a-e1e9-486d-b2d8-34053a8c9d65@leemhuis.info> (raw)
In-Reply-To: <edf4fb6f-0f27-44fd-8f2a-ab60a156b20c@leemhuis.info>
On 17.04.24 10:38, Linux regression tracking (Thorsten Leemhuis) wrote:
> On 14.04.24 11:08, Borislav Petkov wrote:
>> On Sun, Apr 14, 2024 at 10:36:26AM +0200, Borislav Petkov wrote:
>>>> There was an earlier report about this here:
>>>> https://lore.kernel.org/all/78e0d19c-b77a-4169-a80f-2eef91f4a1d6@gmail.com/
>>> Am looking at the whole thing. Stay tuned...
>>
>> Something like this, I guess...
>>
>> Execution goes off somewhere into the weeds during alternatives patching
>> of the return thunk while it tries to warn about it in the alternatives
>> code itself and it all ends up in an endless INT3 exceptions due to our
>> speculation blockers everywhere...
>>
>> I could chase it as to why exactly but the warning is there for all
>> those mitigations which need a special return thunk and 32-bit doesn't
>> need them (and at least the AMD untraining sequences are 64-bit only
>> so...).
>
> Erhard Furtner, did you try if this helps for a kernel with
> MITIGATION_RETHUNK=y? Klara Modin, or could you give it a try?
>
> Without a check this is unlikely to be merged and then more people might
> run into problems like you two did.
Ignore that, I only not noticed the discussion continued in the other
thread and Klara Modin already provided a tested-by. Sorry for the noise.
Ciao, Thorsten
>> IOW:
>>
>> diff --git a/arch/x86/lib/retpoline.S b/arch/x86/lib/retpoline.S
>> index e674ccf720b9..391059b2c6fb 100644
>> --- a/arch/x86/lib/retpoline.S
>> +++ b/arch/x86/lib/retpoline.S
>> @@ -382,8 +382,15 @@ SYM_FUNC_END(call_depth_return_thunk)
>> SYM_CODE_START(__x86_return_thunk)
>> UNWIND_HINT_FUNC
>> ANNOTATE_NOENDBR
>> +#if defined(CONFIG_MITIGATION_UNRET_ENTRY) || \
>> + defined(CONFIG_MITIGATION_SRSO) || \
>> + defined(CONFIG_MITIGATION_CALL_DEPTH_TRACKING)
>> ALTERNATIVE __stringify(ANNOTATE_UNRET_SAFE; ret), \
>> "jmp warn_thunk_thunk", X86_FEATURE_ALWAYS
>> +#else
>> + ANNOTATE_UNRET_SAFE
>> + ret
>> +#endif
>> int3
>> SYM_CODE_END(__x86_return_thunk)
>> EXPORT_SYMBOL(__x86_return_thunk)
>>
prev parent reply other threads:[~2024-04-17 8:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240413024956.488d474e@yea>
2024-04-13 9:19 ` [bisected] Kernel v6.9-rc3 fails to boot on a Thinkpad T60 with MITIGATION_RETHUNK=y (regression from v6.8.5) Bagas Sanjaya
2024-04-13 9:46 ` Linux regression tracking (Thorsten Leemhuis)
2024-04-13 10:49 ` Erhard Furtner
2024-04-14 8:36 ` Borislav Petkov
2024-04-14 9:08 ` Borislav Petkov
2024-04-17 8:38 ` Linux regression tracking (Thorsten Leemhuis)
2024-04-17 8:40 ` Thorsten Leemhuis [this message]
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=d721ab1a-e1e9-486d-b2d8-34053a8c9d65@leemhuis.info \
--to=regressions@leemhuis.info \
--cc=bagasdotme@gmail.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=erhard_f@mailbox.org \
--cc=jpoimboe@kernel.org \
--cc=klarasmodin@gmail.com \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=regressions@lists.linux.dev \
--cc=tglx@linutronix.de \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).