From patchwork Thu Aug 1 19:16:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Dobriyan X-Patchwork-Id: 13751119 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B80FBC52D71 for ; Fri, 2 Aug 2024 05:41:39 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.769949.1181050 (Exim 4.92) (envelope-from ) id 1sZl2P-0006VQ-Ka; Fri, 02 Aug 2024 05:41:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 769949.1181050; Fri, 02 Aug 2024 05:41:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZl2P-0006VJ-Ga; Fri, 02 Aug 2024 05:41:13 +0000 Received: by outflank-mailman (input) for mailman id 769949; Thu, 01 Aug 2024 19:17:02 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZbIM-0008Aq-72 for xen-devel@lists.xenproject.org; Thu, 01 Aug 2024 19:17:02 +0000 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [2a00:1450:4864:20::634]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id a06e5463-503a-11ef-bc02-fd08da9f4363; Thu, 01 Aug 2024 21:17:00 +0200 (CEST) Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a7ab5fc975dso671559066b.1 for ; Thu, 01 Aug 2024 12:17:00 -0700 (PDT) Received: from p183 ([46.53.253.212]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9ecad25sm12474266b.221.2024.08.01.12.16.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 12:16:58 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: a06e5463-503a-11ef-bc02-fd08da9f4363 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722539820; x=1723144620; darn=lists.xenproject.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=2lJyLZbucIe5opdiO3kpiQWjoU7HWScAFHcY/FoPqQM=; b=WIw7PYVklet8dIh2ULbImhKmZ/dQx3kIq5QC+UgWEbEseyUceXYdUf0pew3A3eWjXW KQi8jyu31xB+jOQd1paC9/3pGNZEGstMfiPa1P+Fa53Th/fK5WOp+04hhfhJQc1Kqo0+ 8/pXhuXQy1PXRvmFL2xDPJi7pCec3ma1XoIYgTWsIbfnIBNya0raZUyOSQEXvErMLhbJ dlkiSpDRMMQaMcSNnmQbNUum6Cd7gcRzGJKVT79FOiKjjDezifVKZzeP+nMrwiicbyA5 lEmOFMccJFXfJD/uYFLGLPnuaaEMY9lH+2/DjlQ5RAur2nN/bVNGxmOyKWce8cY0iSY0 o7Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722539820; x=1723144620; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2lJyLZbucIe5opdiO3kpiQWjoU7HWScAFHcY/FoPqQM=; b=vy6dsenOJtiX6Vf9Gkb1KOHoC/GuEMO4zk2U4aOr/pbvgVYNo/c0n2WmjRvtfs46Sx 1IViaMJr5IsTVD+g+VLlc8iRX/usbF68HrvR0Us4x66mpZeRqXOZBmLd6QiN5skDxsS3 Ho+Y5l9vGHdKkpiYWlUH4PLIR3fi//TZ0/GaGzjdgj201Wy7uRdVc/vJQGoavlsRBjdT jCd0bXtitZrcyXoazOiqTaZdc5IxmzU7tNWJjCrfzkeho/dgkyl+FrjePny/mcgXhncL QYnUROXZP/3CgXGnmlKRnSeCSKMCCr8BIXxNWzwKvpsXLyvMu0pzQXmNczH5grGby2iq dOkQ== X-Gm-Message-State: AOJu0YzbJz21xguJ4uypsnDArR2u5YfMPPWzCDn+zF+UYmpkSgkBh4g2 NwEDEHj4Owt5JXoySUAlLRmyvkCUSiUKbOuEQ610/1azuDaTBcY= X-Google-Smtp-Source: AGHT+IExQa6e27hKb7qI6K5zAXQAkD9NjlnCkP6LIDB8EFr35Vr02bglzhOFdAcC662NfTnh88Mv6g== X-Received: by 2002:a17:907:7f94:b0:a7a:84f8:eaef with SMTP id a640c23a62f3a-a7dc4e8c3f0mr99005866b.35.1722539819259; Thu, 01 Aug 2024 12:16:59 -0700 (PDT) Date: Thu, 1 Aug 2024 22:16:56 +0300 From: Alexey Dobriyan To: Juergen Gross , Boris Ostrovsky Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] xen, pvh: fix unbootable VMs (PVH + KASAN) Message-ID: MIME-Version: 1.0 Content-Disposition: inline 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 Acked-by: Juergen Gross --- arch/x86/platform/pvh/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/platform/pvh/Makefile b/arch/x86/platform/pvh/Makefile index 5dec5067c9fb..c43fb7964dc4 100644 --- a/arch/x86/platform/pvh/Makefile +++ b/arch/x86/platform/pvh/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 OBJECT_FILES_NON_STANDARD_head.o := y +KASAN_SANITIZE := n obj-$(CONFIG_PVH) += enlighten.o obj-$(CONFIG_PVH) += head.o From patchwork Fri Aug 2 08:50:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Dobriyan X-Patchwork-Id: 13751261 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D378EC3DA4A for ; Fri, 2 Aug 2024 08:51:06 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.770745.1181335 (Exim 4.92) (envelope-from ) id 1sZnzz-0002G7-An; Fri, 02 Aug 2024 08:50:55 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 770745.1181335; Fri, 02 Aug 2024 08:50:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZnzz-0002G0-8L; Fri, 02 Aug 2024 08:50:55 +0000 Received: by outflank-mailman (input) for mailman id 770745; Fri, 02 Aug 2024 08:50:53 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZnzx-0002FB-Pi for xen-devel@lists.xenproject.org; Fri, 02 Aug 2024 08:50:53 +0000 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [2a00:1450:4864:20::62f]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 5303527f-50ac-11ef-bc03-fd08da9f4363; Fri, 02 Aug 2024 10:50:53 +0200 (CEST) Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a7aa212c1c9so998299266b.2 for ; Fri, 02 Aug 2024 01:50:53 -0700 (PDT) Received: from p183 ([46.53.254.37]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9bc3c7asm75265566b.14.2024.08.02.01.50.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Aug 2024 01:50:51 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 5303527f-50ac-11ef-bc03-fd08da9f4363 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722588652; x=1723193452; darn=lists.xenproject.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=AYmXBmScurZjis0yN5U9wEBN6bdZcv2HfflbnZA48t8=; b=htia0v2UEJwW4O5UHGMViuHsKTroOrrhAMvRq1GlxnDCmvgqgIjtwoUeudLV0BtLi6 Xewt/RkchXlWu2cs2733UmGJUxPtorOUALbH+2JkwGhIH2AQ+OdKhddiwFK47JAiXXpk 7FfTYvgAPiZC/2xC4EfA6a5iGsqSJd+BZdrAEy6yi3lGEV8obweKvP8uiMdeTh8Klt5u qei+Jpw/pUhYv4PWntzngd0ZGyzTijkDSY3s7PPZDNz5jAab/K3UxyF1QAVqXpjY3sd6 XL9fZXPComI9lP1r5HzDS1Ht2p6/NO2dDpZ430jGx37pJZyKGsCCjOj+1BMbBXRbpCDS 1G0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722588652; x=1723193452; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=AYmXBmScurZjis0yN5U9wEBN6bdZcv2HfflbnZA48t8=; b=J37IqX7y5W2/0FyP2lDQ5hEWXlxQLxdUbJ8YmN0ChcdWG/hqRniX5UQvYvC+aAHWvK hl0+PwQJjac7jiSVpoBkHK55k4QFVE1APT/Uzpj0LqmMInfkUX8RtE3p9hy4YeIJB35I QDkIok7lisJW0Qn+ouSzUngH0e8WTvlybdMvK7eRDXbGcJ9HWIDGCHwbHC0kfcDTH9Ww 3IKXI02+yAGa3QLCRNgJMzRWT2kZy2G1fTbHmke4MhHroxtdxUnraWRI3R7h5MEN+TWZ R0H/xn1jXaghNP+jfhwHh6a0BkXErD+a9ghdQmSR/vOPFhyTPIixyt0ZTgovU08EozTq Y6KQ== X-Gm-Message-State: AOJu0YxI15RmnmzYthn+L5QfFX/IqAZIUd0exYyV1jKlkDnEJKsLNaLt FZ2mJvyRZAtt0Guh1RtzhSFEItrGm/iWH/9YeUEzOoW8gsJsnnU= X-Google-Smtp-Source: AGHT+IFvK4orbI6LNsELu/xB64uvyazNJRbDa2ZxQyhuby6J4ozn+wdc3m9XD6dtz9mA9DlnIRxaMQ== X-Received: by 2002:a17:907:94c5:b0:a77:f2c5:84b3 with SMTP id a640c23a62f3a-a7dc4e5a4edmr205120666b.22.1722588652017; Fri, 02 Aug 2024 01:50:52 -0700 (PDT) Date: Fri, 2 Aug 2024 11:50:49 +0300 From: Alexey Dobriyan To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, x86@kernel.org, "H. Peter Anvin" , Juergen Gross , Boris Ostrovsky Subject: [PATCH 2/3] x86/cpu: fix unbootable VMs by inlining memcmp in hypervisor_cpuid_base Message-ID: <304592cf-e4a7-4ba1-baa6-4941c60f0e3c@p183> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: If this memcmp() is not inlined then PVH early boot code can call into KASAN-instrumented memcmp() which results in unbootable VMs: pvh_start_xen xen_prepare_pvh xen_cpuid_base hypervisor_cpuid_base memcmp Ubuntu's gcc version 11.4.0 (Ubuntu 11.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(+), 1 deletion(-) diff --git a/arch/x86/include/asm/cpuid.h b/arch/x86/include/asm/cpuid.h index 6b122a31da06..3eca7824430e 100644 --- a/arch/x86/include/asm/cpuid.h +++ b/arch/x86/include/asm/cpuid.h @@ -196,7 +196,20 @@ static inline uint32_t hypervisor_cpuid_base(const char *sig, uint32_t leaves) for_each_possible_hypervisor_cpuid_base(base) { cpuid(base, &eax, &signature[0], &signature[1], &signature[2]); - if (!memcmp(sig, signature, 12) && + /* + * FIXME rewrite cpuid comparators to accept uint32_t[3]. + * + * This memcmp() + * a) is called from PVH early boot code + * before instrumentation is set up, + * b) may be compiled to "call memcmp" (not inlined), + * c) memcmp() itself may be instrumented. + * + * Any combination of 2 is fine, but all 3 aren't. + * + * Force inline this function call. + */ + if (!__builtin_memcmp(sig, signature, 12) && (leaves == 0 || ((eax - base) >= leaves))) return base; } From patchwork Fri Aug 2 08:53:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Dobriyan X-Patchwork-Id: 13751267 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 98AB7C3DA4A for ; Fri, 2 Aug 2024 08:53:15 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.770763.1181346 (Exim 4.92) (envelope-from ) id 1sZo25-0003Ae-Mg; Fri, 02 Aug 2024 08:53:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 770763.1181346; Fri, 02 Aug 2024 08:53:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZo25-0003AV-JV; Fri, 02 Aug 2024 08:53:05 +0000 Received: by outflank-mailman (input) for mailman id 770763; Fri, 02 Aug 2024 08:53:04 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZo24-0003AP-Mx for xen-devel@lists.xenproject.org; Fri, 02 Aug 2024 08:53:04 +0000 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [2a00:1450:4864:20::534]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id a0d9aa11-50ac-11ef-bc03-fd08da9f4363; Fri, 02 Aug 2024 10:53:03 +0200 (CEST) Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-58ef19aa69dso8418763a12.3 for ; Fri, 02 Aug 2024 01:53:03 -0700 (PDT) Received: from p183 ([46.53.254.37]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5b839610c77sm833557a12.9.2024.08.02.01.53.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Aug 2024 01:53:02 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: a0d9aa11-50ac-11ef-bc03-fd08da9f4363 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722588783; x=1723193583; darn=lists.xenproject.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=8XFkRTNOAvo/6n1TkCxI0Nq/GhsBWYAifvh3B1avP60=; b=nSehq0EN3JsxhBiMShlIzM95uMBuI43KNTQE5uLMuCK6j9WQqoETY+AbVO3inkeXd7 VZ3SjX7ugkb3qcaiVbAVlzAB+LxLtSULQMOFl3GYR3KVnsH9sAArghtdLGfdxDwkXeEH Pvh4aoC9RfJekytUb82syQG0aqx1hJouygIaxsVO2fIF+wr2vHnSI2eQ8YjOiqnY3CYf 6rRWEl90KYmCihV8ml9GtF8MvsG/QurdilBP+Ty4lb2fOGzWG4zA/W77QY88Xzw9csPH SHCadmakjLT9bs0ws0G94nFuQegIgm9kGXatps1fkArKKcup+TvUFO21NyHrPNUPl8XT jphw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722588783; x=1723193583; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8XFkRTNOAvo/6n1TkCxI0Nq/GhsBWYAifvh3B1avP60=; b=eKie2t0r4PyZQhQMlIECyIGOeulOfp44yVY+YYmBzDu9hoioZvKGXiuHU2mfCrZUWA ejYiBTaPCLbuPh5qKZ6bNsDmCBkbvj3zNaw9oBhpPp88ek0nqizqdghLKqhsUnCiVTpR MNG9lGUvdwn5p/oPuBORLenn71E2YPtsEMrXPK1z2XfLAilOsNAZKczBDKtQ1ZpvmmM9 nmPMLU20/GA6F5Idlu9Z/aT8QN1/GmQDgWRY6j/znV/WdiSJT07prQ3B1VG6tfS7JOh7 HiQ00OJ4gaj7msN8HHxMSoAITxZzfZcpzyPMfewHvk8+Y+mzkgjjP8xiq1BqIUGztl7J no2A== X-Gm-Message-State: AOJu0Yzw25S2Q/wztnEf+9BcPplSXg2z9T1UlTSH9QLUqBHdhfjx9eI9 lsfBtlaGiIffoY1OgAi7b2jppsrnNau/s7m9rUcwi3OxJATEiVA= X-Google-Smtp-Source: AGHT+IFJwhpUx7VoS206VbLfNRc/AmbO26vvXS6AcphopWKlowMmiS2F7rsx3JjoggcT9/JHDYDaLg== X-Received: by 2002:a05:6402:22d7:b0:5b8:34a9:7fe0 with SMTP id 4fb4d7f45d1cf-5b834a98116mr1232930a12.6.1722588782707; Fri, 02 Aug 2024 01:53:02 -0700 (PDT) Date: Fri, 2 Aug 2024 11:53:00 +0300 From: Alexey Dobriyan To: Juergen Gross , Boris Ostrovsky Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] xen, pvh: fix unbootable VMs by inlining memset in xen_prepare_pvh Message-ID: <3fe4502f-020e-46de-976a-b32a76de478a@p183> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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: Alexey Dobriyan --- arch/x86/platform/pvh/enlighten.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/platform/pvh/enlighten.c b/arch/x86/platform/pvh/enlighten.c index 8c2d4b8de25d..c2f6e202217c 100644 --- a/arch/x86/platform/pvh/enlighten.c +++ b/arch/x86/platform/pvh/enlighten.c @@ -133,7 +133,8 @@ void __init xen_prepare_pvh(void) BUG(); } - memset(&pvh_bootparams, 0, sizeof(pvh_bootparams)); + /* This can compile to "call memset" and memset() can be instrumented. */ + __builtin_memset(&pvh_bootparams, 0, sizeof(pvh_bootparams)); hypervisor_specific_init(xen_guest);