Re: [tip:x86/sev] [x86/sev] 06685975c2: BUG:kernel_failed_in_early-boot_stage,last_printk:Booting_the_kernel(entry_offset:#)

Oliver Sang
2024-07-11T01:39:11Z

hi, Boris,

On Wed, Jul 10, 2024 at 10:28:38AM +0200, Borislav Petkov wrote:
> On Wed, Jul 10, 2024 at 09:47:36AM +0800, Oliver Sang wrote:
> > no. when this bisect done, we tested the branch tip 8434cf006ceae,
> > the issue is still persistent.
>
> Ok, I think that should fix it:

yes, your patch fixed the issue.

Tested-by: kernel test robot <oliver.sang@intel.com>

>
> From: "Borislav Petkov (AMD)" <bp@alien8.de>
> Date: Wed, 10 Jul 2024 10:16:18 +0200
> Subject: [PATCH] x86/coco/sev: Disable KCSAN too
>
> The SEV guest code was moved to x86/coco/ along with the instrumentation
> exclusion bits. However, there is a blanket KCSAN disable in
> arch/x86/kernel/Makefile due to boot hangs.
>
> Copy that disable to the coco's sev Makefile too.
>
> Fixes: Fixes: 06685975c209 ("x86/sev: Move SEV compilation units")
> Closes: https://lore.kernel.org/oe-lkp/202407091342.46d7dbb-oliver.sang@intel.com
> Reported-by: kernel test robot <oliver.sang@intel.com>
> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
> ---
> arch/x86/coco/sev/Makefile | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/x86/coco/sev/Makefile b/arch/x86/coco/sev/Makefile
> index 5f72e92b37ff..4e375e7305ac 100644
> --- a/arch/x86/coco/sev/Makefile
> +++ b/arch/x86/coco/sev/Makefile
> @@ -9,3 +9,7 @@ endif
> KASAN_SANITIZE_core.o := n
> KMSAN_SANITIZE_core.o := n
> KCOV_INSTRUMENT_core.o := n
> +
> +# With some compiler versions the generated code results in boot hangs, caused
> +# by several compilation units. To be safe, disable all instrumentation.
> +KCSAN_SANITIZE := n
> --
> 2.43.0
>
> --
> Regards/Gruss,
> Boris.
>
> https://people.kernel.org/tglx/notes-about-netiquette