[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <242b327a-9244-411c-8d3e-7b860464f8f6@suse.com>
Date: Fri, 2 Aug 2024 07:44:11 +0200
From: Jürgen Groß <jgross@...e.com>
To: Alexey Dobriyan <adobriyan@...il.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>
Cc: xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] xen, pvh: fix unbootable VMs (PVH + KASAN)
On 01.08.24 21:16, Alexey Dobriyan wrote:
> Uninstrument arch/x86/platform/pvh/enlighten.c: KASAN is not setup
> _this_ early in the boot process.
>
> Steps to reproduce:
>
> make allnoconfig
> make sure CONFIG_AMD_MEM_ENCRYPT is disabled
> AMD_MEM_ENCRYPT independently uninstruments lib/string.o
> so PVH boot code calls into uninstrumented memset() and
> memcmp() which can make the bug disappear depending on
> the compiler.
> enable CONFIG_PVH
> enable CONFIG_KASAN
> enable serial console
> this is fun exercise if you never done it from nothing :^)
>
> make
>
> qemu-system-x86_64 \
> -enable-kvm \
> -cpu host \
> -smp cpus=1 \
> -m 4096 \
> -serial stdio \
> -kernel vmlinux \
> -append 'console=ttyS0 ignore_loglevel'
>
> Messages on serial console will easily tell OK kernel from unbootable
> kernel. In bad case qemu hangs in an infinite loop stroboscoping
> "SeaBIOS" message.
>
> Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>
Acked-by: Juergen Gross <jgross@...e.com>
Juergen
Powered by blists - more mailing lists