From patchwork Thu Aug 20 10:34:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Scull X-Patchwork-Id: 11726035 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D7F73722 for ; Thu, 20 Aug 2020 10:37:37 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B04C220639 for ; Thu, 20 Aug 2020 10:37:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qFtx0iBr"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="LrB0Zugw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B04C220639 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version:Message-Id: In-Reply-To:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Kid9d++o/i+JLxyLBn86vXooh1hVxTYf2nkFVOOy99c=; b=qFtx0iBrlzyylNJJ5026xEMsh b7LAmIagaFhJiDZbEsQ8al4nob1CYYIXP0JXYOFw8wcr07FTADsWRwUvzlUKQikvriTUgMeYwUsRo tg9vKijmAsA3losW6cCA3ZGD3Z/AgEb5Vxnmk+1qoGzGYwPkbzgjB6JSZREk+x0WhXbX2Qzm+yUVV cDkRmHRbb32OvNXVhFkdXxf9VmxBTTvesiFy/8k1ADNXMgXHuy7hCGAt/Dt0EdIP61sF7hZg6rgWX 9pdzJtrCYCc92/BbLCN9ltplnpMjWE1fGOTapj/pUDEFh5aeBFql7QNYEf3emp41t08ZxD7RVuL5w o6hEKLAUw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8hv4-00022X-N1; Thu, 20 Aug 2020 10:35:42 +0000 Received: from mail-wm1-x349.google.com ([2a00:1450:4864:20::349]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8huu-0001yv-0u for linux-arm-kernel@lists.infradead.org; Thu, 20 Aug 2020 10:35:32 +0000 Received: by mail-wm1-x349.google.com with SMTP id u14so1722471wml.0 for ; Thu, 20 Aug 2020 03:35:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=zg5ZCTDpTnAIwbW0OhMsxSkivd5OxG/LbJPtzF+miBk=; b=LrB0ZugwdF5h7TPZl8CkNKrCjsf5pd/akzCsAoBT1qEZ+nbPTSoavGcomf8W94MslZ gXsgWbVtP9jbbHWIlMMkyiIbT80M/DI6ZmrLyBhVupLPbtbCjVqyfxMEmxw7yDUsCNv1 YTJFz0qfRC/G/+79GMx2+s/RkqEcgMBJRmKAHG1XMnA9mKDKSkYTYYx3re3gy2b0BkqQ F3lz4P6n2UG7DdJ8OWmYWpIx52GCiIslvFqrF2GdkNhTvm76pP4veH+FKMSIlPVc9saQ VhFsP3Is2XsjzIqBur0yYpea66HrQ/6nOP5398M+7BXx0Pf8F1s6iL4fsrxKdWNYGK6O 3Zeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=zg5ZCTDpTnAIwbW0OhMsxSkivd5OxG/LbJPtzF+miBk=; b=iL5r0FmAOxmeYkN+w2lCkIRe6HW7kWr1DUBdqVv/B9I/zN98HjZQ1HIIob1Ywa5GCI fO7jlDizYzMaRg/xwyXDNaNUl7N/2h7BJqPrlz6qqYxoIoPD9HPbX28PFA2K2k7FzA4z 6TOLn5sO8CYc0OKjsIm7Oap0uHriymr9+CxdVYGcJCBSgbQaOM13A5r04ezk2quyMcVX Yr8xbuNp2CgcXHOfhV7/VFp5KQdcSY+Yu0xaUnV0w/iugun+qXTgzIEg3KXc6VLcV/Ox ZGe0qP8DUyNF0pGUIuw12QbL/4iYDQfw1Wd+Odah4yc7zmcfjgAayOierdNHkofsqeFQ Lhrg== X-Gm-Message-State: AOAM5331fWSlqtSxUl7nLgy9gQIFzY0DJqlcCrkKhhIPeRcdiv56T/l/ YEMajMEZR4FqbR1wB0FsVklkRqWud18= X-Google-Smtp-Source: ABdhPJzfOA5qp7a1O1IL7iOCrtlzm8NkS7Hs81tc02Xjy1IkmUObXohL2sbMg098SNSOjlVsrOnzi/sjaDU= X-Received: from ascull.lon.corp.google.com ([2a00:79e0:d:109:4a0f:cfff:fe4a:6363]) (user=ascull job=sendgmr) by 2002:a1c:66c5:: with SMTP id a188mr2782833wmc.173.1597919729137; Thu, 20 Aug 2020 03:35:29 -0700 (PDT) Date: Thu, 20 Aug 2020 11:34:30 +0100 In-Reply-To: <20200820103446.959000-1-ascull@google.com> Message-Id: <20200820103446.959000-5-ascull@google.com> Mime-Version: 1.0 References: <20200820103446.959000-1-ascull@google.com> X-Mailer: git-send-email 2.28.0.220.ged08abb693-goog Subject: [PATCH v2 04/20] KVM: arm64: Restrict symbol aliasing to outside nVHE From: Andrew Scull To: kvmarm@lists.cs.columbia.edu X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200820_063532_132140_C01827C6 X-CRM114-Status: GOOD ( 11.70 ) X-Spam-Score: -7.7 (-------) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-7.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:349 listed in] [list.dnswl.org] -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM white-list -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_MED DKIMwl.org - Medium sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, kernel-team@android.com, suzuki.poulose@arm.com, maz@kernel.org, Sudeep Holla , james.morse@arm.com, Andrew Scull , catalin.marinas@arm.com, David Brazdil , will@kernel.org, julien.thierry.kdev@gmail.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org nVHE symbols are prefixed but this is sometimes hidden from the host by aliasing the non-prefixed symbol to the prefixed version with a macro. This runs into problems if nVHE tries to use the symbol as it becomes doubly prefixed. Avoid this by omitting the aliasing macro for nVHE. Cc: David Brazdil Signed-off-by: Andrew Scull --- arch/arm64/include/asm/kvm_asm.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/include/asm/kvm_asm.h b/arch/arm64/include/asm/kvm_asm.h index fb1a922b31ba..413911d6446a 100644 --- a/arch/arm64/include/asm/kvm_asm.h +++ b/arch/arm64/include/asm/kvm_asm.h @@ -99,8 +99,11 @@ struct kvm_s2_mmu; DECLARE_KVM_NVHE_SYM(__kvm_hyp_init); DECLARE_KVM_HYP_SYM(__kvm_hyp_vector); + +#ifndef __KVM_NVHE_HYPERVISOR__ #define __kvm_hyp_init CHOOSE_NVHE_SYM(__kvm_hyp_init) #define __kvm_hyp_vector CHOOSE_HYP_SYM(__kvm_hyp_vector) +#endif #ifdef CONFIG_KVM_INDIRECT_VECTORS extern atomic_t arm64_el2_vector_last_slot;