From patchwork Wed Feb 3 14:19:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Perret X-Patchwork-Id: 12064465 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12EABC433E0 for ; Wed, 3 Feb 2021 14:20:54 +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 9B31E64F2C for ; Wed, 3 Feb 2021 14:20:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9B31E64F2C 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+linux-arm-kernel=archiver.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=Nuc7pebMPQ23U8Ha5gA92Sml4fBx53h5yI7tKUZwivo=; b=a+ogWrkoNCmk8SmYYvEdbIqbV OF+mtJiYrnMQ/XLbubZoL2nRjgpy1isegUUf0ZzZvjaJojVHeTR9YDwc6WxtVrfnQ3mU+0qFiBFDA qxksKdKteKAo6U/uQBN9+b3JKuhnDRRxkbUPsV5yqqJmYWmVyHOToxOU3UlFGbs/84scZVltGwqbH /l5H5lykZDrMwHbuEuTLBi9XMvSz2FJ+hkeeMh5zOMTkpNVidtBppYhr4g94ejnxePXQ2KRxHJVKH vBeFJpcbfXmNu9k5jkC/AdroQHq1FmlPF/SOAitZarbhmxvHNS5/aGRph5O4SOiLPBXrpjSmJ/7t3 yfGH1tLyw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7J0U-0003Qe-6u; Wed, 03 Feb 2021 14:19:46 +0000 Received: from mail-wm1-x34a.google.com ([2a00:1450:4864:20::34a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7J0Q-0003Op-SF for linux-arm-kernel@lists.infradead.org; Wed, 03 Feb 2021 14:19:43 +0000 Received: by mail-wm1-x34a.google.com with SMTP id y9so3308103wmi.8 for ; Wed, 03 Feb 2021 06:19:40 -0800 (PST) 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=3+fgEg8CcwEZPzx5ba9dQiG1Bbp/LPpxkX/DyY7YReU=; b=ECa2T6w6Xzk+c+UXae/1//JfQrHaqmwEkNwbH6t+u9iPQ+/taS5oBKC8Gdqmp/aqiS aWV1vP6sIY7I+36pxfKtp6BYAhvNYVM64tQOefQf3JpLHeq5B5y7sSNryppKrNjWC09F KQQw/1A6xu6SK5Ii45Ua8ZLlMnDnoZjIvHpqAo5Dh84Q+1sfak9uVyPdlgkGcyuMPrAI wB88GN04WPUz/e/1yHNgAd0LN897HqvJADs9WusShW2qlUqp7oHeS/3lUgZFXR+SgmIx 5TRBYFlfBEMGsSEHF4P6X7W+Hdy05RHZMqLi2jrB0fCxInNLjLcZo1WaTrAND7O1t9AA BuBQ== 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=3+fgEg8CcwEZPzx5ba9dQiG1Bbp/LPpxkX/DyY7YReU=; b=Z5+ZP9lkHULYRLGQqodWgOpx3lB8DNeyI8PhbKFytDbq9KumCorzTeMz7bY5X1jbTS 2KbfoeYp0bdX4G9z8QXKCWCkPpQS5tUAjV3CdEr3TbhFqYDcOmxcj5mI0EHrkfNoAoqw U02DcGuICts4P+Lfmg7Ur1a14ybQfW3t4cuGpzkNMJu5YGaAALDo3eUySdqIrEgqakKI JCVhhkGAOLINN6DmDf4ap++njJMkOQ1z3N4yP1a+AefXGYS7ZxlJW07LQvj1fU61MZGq UWxPh7U07ApLS/U1CVvvaG2fjIfOjZmkA1Xs2AcrhWTQ1MhCwLvHXdsSPGWLHxyFVoQa yEPQ== X-Gm-Message-State: AOAM531Z5OwYlhj667YxrDOT4VmA6sxFpA6yDOqFO3ISOToCqDsrFbiD 0iH38BpvsoNnaEyW3Ax58lqMg0+W9+i2 X-Google-Smtp-Source: ABdhPJyxHdPdDI/OtCdUuxvsWAYFicQkJiykIbbaVqcEXDzFTBrAuOyz3VUX4A/8Da4tuA80b98i9u7Cj/PZ X-Received: from r2d2-qp.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:1652]) (user=qperret job=sendgmr) by 2002:a7b:c044:: with SMTP id u4mr1036932wmc.1.1612361978973; Wed, 03 Feb 2021 06:19:38 -0800 (PST) Date: Wed, 3 Feb 2021 14:19:31 +0000 In-Reply-To: <20210203141931.615898-1-qperret@google.com> Message-Id: <20210203141931.615898-3-qperret@google.com> Mime-Version: 1.0 References: <20210203141931.615898-1-qperret@google.com> X-Mailer: git-send-email 2.30.0.365.g02bc693789-goog Subject: [PATCH 2/2] KVM: arm64: Stub EXPORT_SYMBOL for nVHE EL2 code From: Quentin Perret To: arnd@arndb.de, maz@kernel.org, catalin.marinas@arm.com, will@kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210203_091942_954209_FC932E8C X-CRM114-Status: GOOD ( 12.03 ) 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-arch@vger.kernel.org, suzuki.poulose@arm.com, qperret@google.com, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu, james.morse@arm.com, linux-arm-kernel@lists.infradead.org, kernel-team@android.com, ardb@kernel.org, julien.thierry.kdev@gmail.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In order to ensure the module loader does not get confused if a symbol is exported in EL2 nVHE code (as will be the case when we will compile e.g. lib/memset.S into the EL2 object), make sure to stub all exports using __DISABLE_EXPORTS in the nvhe folder. Suggested-by: Ard Biesheuvel Signed-off-by: Quentin Perret --- arch/arm64/kvm/hyp/nvhe/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kvm/hyp/nvhe/Makefile b/arch/arm64/kvm/hyp/nvhe/Makefile index 1f1e351c5fe2..c9c121c8d5de 100644 --- a/arch/arm64/kvm/hyp/nvhe/Makefile +++ b/arch/arm64/kvm/hyp/nvhe/Makefile @@ -3,8 +3,8 @@ # Makefile for Kernel-based Virtual Machine module, HYP/nVHE part # -asflags-y := -D__KVM_NVHE_HYPERVISOR__ -ccflags-y := -D__KVM_NVHE_HYPERVISOR__ +asflags-y := -D__KVM_NVHE_HYPERVISOR__ -D__DISABLE_EXPORTS +ccflags-y := -D__KVM_NVHE_HYPERVISOR__ -D__DISABLE_EXPORTS obj-y := timer-sr.o sysreg-sr.o debug-sr.o switch.o tlb.o hyp-init.o host.o \ hyp-main.o hyp-smp.o psci-relay.o