[PATCH 3/3] xen, pvh: fix unbootable VMs by inlining memset in xen_prepare_pvh

2024-08-02 Thread Alexey Dobriyan
If this memset() is not inlined than PVH early boot code can call into KASAN-instrumented memset() which results in unbootable VMs. Ubuntu's 22.04.4 LTS gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) doesn't inline this memset but inlines __builtin_memset. Signed-off-by: Alexe

[PATCH 2/3] x86/cpu: fix unbootable VMs by inlining memcmp in hypervisor_cpuid_base

2024-08-02 Thread Alexey Dobriyan
1.4.0-1ubuntu1~22.04) inlines memcmp with patch and the bug is partially fixed. Leave FIXME just in case someone cares enough to compare 3 pairs of integers like 3 pairs of integers. Signed-off-by: Alexey Dobriyan --- arch/x86/include/asm/cpuid.h | 15 ++- 1 file changed, 14 insertions(

[PATCH 1/3] xen, pvh: fix unbootable VMs (PVH + KASAN)

2024-08-01 Thread Alexey Dobriyan
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 --- arch/x86/platform/pvh/Makefile | 1 + 1 file changed, 1 insertion(+