From patchwork Thu Sep 3 13:52:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Scull X-Patchwork-Id: 11753637 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 E63A0109B for ; Thu, 3 Sep 2020 13:53:51 +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 B3738208CA for ; Thu, 3 Sep 2020 13:53:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="pOEST0jq"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="PAUNe6ZH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3738208CA 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=8Osu1M4GqMAelp4KBCfjzBEMOJLjDPwqxbWnVrO05LE=; b=pOEST0jqg/C8YKA6o3CSWEd7b 4r48Z21tsQ1M3/u7UMPIeCBGz4JgGL9ehX5yaXQR6WXYTMRdGZNcBRRYkoJhWCk2/CBeh1/evWTqL XnpHDeYKn/x0M6eoRZItwvlDCmWbk56gNi1C/tzmaMuZbfc48seXyuthdjCh1prd+jgjYFXA74bqL 5v0cBn6uUX3HPby4t+Mf7VUzuuL3n28wKjalOP5WjbmrJWp2XRTIIIgCjEBo2RT7avXmwOLeBXXYe a4fAwe2H/NnkxKRKQHG+cFxWyzCfM+DmRHbWsHezUI6ojRbEVTW7NWV1/bdoZmnUSbvnIDirgIvKE sj19auNzg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDpgF-00021E-Ns; Thu, 03 Sep 2020 13:53:35 +0000 Received: from mail-qt1-x84a.google.com ([2607:f8b0:4864:20::84a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDpg3-0001vP-B8 for linux-arm-kernel@lists.infradead.org; Thu, 03 Sep 2020 13:53:24 +0000 Received: by mail-qt1-x84a.google.com with SMTP id m13so2161818qtu.10 for ; Thu, 03 Sep 2020 06:53:21 -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=UCgMQtwX3W3s8ZDyYBjL9JKgT6RYNGesqggnsfm1pPY=; b=PAUNe6ZHeo3hRsdcTZWSpeBSRbH9UHrnYw77zuM9pXkY2QL/BTlvmt4uLbBJw3WY+X aHAMALaAqmRNWwZs8NgwBiUrF4Y3kbM13j6siVVYyf2qXXu5eTYie9xaJSs/7xxb+KVo uxXuIcm5u1Qy81221xjWZoO9k61nGc0aBSERv9N3rIuzvdgbmoGtLES4GugM6SCDVYQo U4b4MBCxxC41F0Y/2KLYV6MzY6LfCZ+qwqwAQ+t+Jn6nqKe5HAaHnrSpss6FxYFC4fIN IDQx/bX3WfWcn+afn09jyGeRNWQzkkBHSmwJ0gnNNeE0TLRTPW8pfaaq5TEp9aUv6eq2 zDCQ== 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=UCgMQtwX3W3s8ZDyYBjL9JKgT6RYNGesqggnsfm1pPY=; b=Nrh0zPp9vj1qL3Fy8AuxR2AmtR99TPXIKnH87wD8Bin2bobatgttq5GgOPR56ihKDT M/wEP72QsLPuElkil+D8TrHkMskVnuX8rUWNBnmES1/sXCxIYp6A9a6nZsvLgI1r8b6e vDW3PkfzaMPJJum8DSg8BTY8p2wHHvmqI1VggQy7fnQmSB8CkZKaFR8g+LOnoQvJsUou MJqJvRNw7UUZC3SoesR0rQFs+SI8+L8sfWM2cgXY67G4MyRpnK6NhhPY0sdkGd42Yubt zAD97NlowcsTGVrBJ9zo8EK6tOGnNzVSkZPWNk+YDtLwbKi9E52N8HySfhKFFtcQektq vVLA== X-Gm-Message-State: AOAM5322dSWo481tfH/QRtMRPCLASo005nADBmVuNCsf0HbwzdzHMUnC RHGsBBI79TmCCuqIVPdpw4VM8URs954= X-Google-Smtp-Source: ABdhPJzvdQvQC5eozCMSqpzTnaknMz+pyQKrd0Ty0gYIWMOMo5HKn5gvmDJPPbLZ54TXF5K660HziphkR28= X-Received: from ascull.lon.corp.google.com ([2a00:79e0:d:109:4a0f:cfff:fe4a:6363]) (user=ascull job=sendgmr) by 2002:a0c:f48e:: with SMTP id i14mr1948535qvm.5.1599141200162; Thu, 03 Sep 2020 06:53:20 -0700 (PDT) Date: Thu, 3 Sep 2020 14:52:53 +0100 In-Reply-To: <20200903135307.251331-1-ascull@google.com> Message-Id: <20200903135307.251331-5-ascull@google.com> Mime-Version: 1.0 References: <20200903135307.251331-1-ascull@google.com> X-Mailer: git-send-email 2.28.0.402.g5ffc5be6b7-goog Subject: [PATCH v3 04/18] 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-20200903_095323_407629_88AD8275 X-CRM114-Status: GOOD ( 11.71 ) X-Spam-Score: -8.2 (--------) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-8.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:84a listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM white-list 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -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.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.5 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 6f98fbd0ac81..6f9c4162a764 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;