[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230810125122.GIZNTdSuFvA3Cjfexq@fat_crate.local>
Date: Thu, 10 Aug 2023 14:51:22 +0200
From: Borislav Petkov <bp@...en8.de>
To: Nathan Chancellor <nathan@...nel.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: Hang when booting guest kernels compiled with clang after SRSO
mitigations
On Thu, Aug 10, 2023 at 03:16:49AM -0700, Nathan Chancellor wrote:
> Just to clarify, this is the guest kernel at -rc5 and the host kernel
> with the SRSO mitigations applied? If so, that's the problem. The guest
> kernel does not have to have the SRSO mitigations applied to see this
> problem. Sorry I should have made that more clear! If not though, that's
> interesting because I was running -rc5 on the host without issues.
Well, how do you even build CPU_SRSO with clang?
config CPU_SRSO
bool "Mitigate speculative RAS overflow on AMD"
depends on CPU_SUP_AMD && X86_64 && RETHUNK
^^^^^^^
config RETHUNK
bool "Enable return-thunks"
depends on RETPOLINE && CC_HAS_RETURN_THUNK
^^^^^^^^^^^^^^^^^^^
config CC_HAS_RETURN_THUNK
def_bool $(cc-option,-mfunction-return=thunk-extern)
$ clang -mfunction-return=thunk-extern
clang: error: unknown argument: '-mfunction-return=thunk-extern'
clang: error: no input files
$ clang --version
Debian clang version 14.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Hmmm.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists