Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

xen, pvh: fix unbootable VMs by inlining memset() in xen_prepare_pvh()

If this memset() is not inlined than PVH early boot code can call
into KASAN-instrumented memset() which results in unbootable VMs.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Juergen Gross <jgross@suse.com>
Message-ID: <20240802154253.482658-3-adobriyan@gmail.com>
Signed-off-by: Juergen Gross <jgross@suse.com>

authored by

Alexey Dobriyan and committed by
Juergen Gross
fbe5a6df 416a33c9

+5 -1
+5 -1
arch/x86/platform/pvh/enlighten.c
··· 130 130 BUG(); 131 131 } 132 132 133 - memset(&pvh_bootparams, 0, sizeof(pvh_bootparams)); 133 + /* 134 + * This must not compile to "call memset" because memset() may be 135 + * instrumented. 136 + */ 137 + __builtin_memset(&pvh_bootparams, 0, sizeof(pvh_bootparams)); 134 138 135 139 hypervisor_specific_init(xen_guest); 136 140