diff options
author | Alexey Dobriyan <[email protected]> | 2024-08-02 18:42:53 +0300 |
---|---|---|
committer | Juergen Gross <[email protected]> | 2024-09-12 08:25:12 +0200 |
commit | fbe5a6dfe492eff8b0adef85fcabd84e246f1102 (patch) | |
tree | 8ca85ea83b83497f12ba240d4d308c523b66779b | |
parent | 416a33c9afcef24d8b48e414d08d4ae4472aa669 (diff) |
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 <[email protected]>
Acked-by: Juergen Gross <[email protected]>
Message-ID: <[email protected]>
Signed-off-by: Juergen Gross <[email protected]>
-rw-r--r-- | arch/x86/platform/pvh/enlighten.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/platform/pvh/enlighten.c b/arch/x86/platform/pvh/enlighten.c index 944e0290f2c0..2263885d16ba 100644 --- a/arch/x86/platform/pvh/enlighten.c +++ b/arch/x86/platform/pvh/enlighten.c @@ -130,7 +130,11 @@ void __init xen_prepare_pvh(void) BUG(); } - memset(&pvh_bootparams, 0, sizeof(pvh_bootparams)); + /* + * This must not compile to "call memset" because memset() may be + * instrumented. + */ + __builtin_memset(&pvh_bootparams, 0, sizeof(pvh_bootparams)); hypervisor_specific_init(xen_guest); |