mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Borislav Petkov <bp@alien8.de>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: Hang when booting guest kernels compiled with clang after SRSO mitigations
Date: Thu, 10 Aug 2023 08:07:06 -0700	[thread overview]
Message-ID: <20230810150706.GA42856@dev-arch.thelio-3990X> (raw)
In-Reply-To: <20230810144344.GLZNT3oM6MLVdzGlyd@fat_crate.local>

On Thu, Aug 10, 2023 at 04:43:44PM +0200, Borislav Petkov wrote:
> On Thu, Aug 10, 2023 at 06:40:56AM -0700, Nathan Chancellor wrote:
> Linux version 6.5.0-rc5+ (root@vh) (gcc (Debian 10.2.1-3) 10.2.1 20201224, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Thu Aug 10 16:13:54 CEST 2023
> 
> ...
> 
> [    0.083541] Speculative Return Stack Overflow: Mitigation: safe RET

I just tried

  Linux version 6.5.0-rc5-00039-g138bcddb86d8 (nathan@dev-arch.thelio-3990X) (x86_64-linux-gcc (GCC) 10.4.0, GNU ld (GNU Binutils) 2.39) #1 SMP PREEMPT_DYNAMIC Thu Aug 10 07:48:28 MST 2023

  [    0.000259] Speculative Return Stack Overflow: Mitigation: safe RET

on the host...

> [    0.000000] Linux version 6.5.0-rc5 (root@vh) (Debian clang version 14.0.6, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Thu Aug 10 13:22:30 CEST 2023

with

  [    0.000000] Linux version 6.5.0-rc5 (nathan@distrobox-6Sw1jticKJ.thelio-3990X) (Debian clang version 14.0.6, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Thu Aug 10 07:58:56 MST 2023

in the guest and I see the same problem.

> Guest and host are up and running.
> 
> There's something else missing.

Configuration difference? Here is the one from the most recent build:

https://gist.github.com/nathanchance/2d7ad0b9440a6a2ec5ba0b88e3e673a9

Is there any other information that could be relevant here? My microcode
version according to dmesg, in case that matters.

  [    2.408527] microcode: microcode updated early to new patch_level=0x0830107a

Is that machine Zen 2? I see this issue on my Ryzen 3 4300G as well,
which is also Zen 2.

> Your host gcc is 13, maybe I should update...

Seems like I can reproduce it with earlier versions of GCC (and I could
reproduce it with clang) so it does not seem like it is toolchain
related on the host side but might be interesting to test.

I just use https://mirrors.edge.kernel.org/pub/tools/crosstool/ for easy
access to multiple versions.

Cheers,
Nathan

  reply	other threads:[~2023-08-10 15:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-10  1:33 Nathan Chancellor
2023-08-10  8:10 ` Borislav Petkov
2023-08-10  9:08   ` Borislav Petkov
2023-08-10  9:15     ` Borislav Petkov
2023-08-10 10:16     ` Nathan Chancellor
2023-08-10 12:51       ` Borislav Petkov
2023-08-10 13:27         ` Nathan Chancellor
2023-08-10 13:32           ` Borislav Petkov
2023-08-10 13:40             ` Nathan Chancellor
2023-08-10 14:43               ` Borislav Petkov
2023-08-10 15:07                 ` Nathan Chancellor [this message]
2023-08-10 15:14                   ` Borislav Petkov
2023-08-10 15:48                     ` Nathan Chancellor
2023-08-10 16:14                       ` Nathan Chancellor
2023-08-11 10:14                         ` Borislav Petkov
2023-08-11 14:09                           ` Nathan Chancellor
2023-08-11 16:03                             ` Sean Christopherson
2023-08-11 16:12                               ` Borislav Petkov
2023-08-12  0:42                                 ` Nick Desaulniers
2023-08-12 13:46                                   ` Borislav Petkov
2023-08-12 14:31                                     ` Nathan Chancellor

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=20230810150706.GA42856@dev-arch.thelio-3990X \
    --to=nathan@kernel.org \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --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

all inboxes | Powered by JetHome®