From patchwork Tue Feb 9 15:32:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 12078455 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 2A8F7C433DB for ; Tue, 9 Feb 2021 15:33:45 +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 D2FD8601FD for ; Tue, 9 Feb 2021 15:33:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D2FD8601FD 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:Mime-Version:Message-Id:Date: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=oOLx1lYWutg6UtPy+pybVZCkDtScEhHVolmmOkgZ9OI=; b=TInqJOMJVg+J/yzutNSYyeKrxg WI421R2R0CWltqQWOr/WVhz6wTDlyKVuT+Vdg+WpkU/VWb9D3GXtYr1B5FVzt1ZvsR1x+0CI6LT/H yHyzYNREQvIyLwyNUkUocDKDdjpVN0lNTL9QEXiFHzamE69Ozr7KIVW7Hlq0lrw/WqQkE8qgXWoHn DCyAXmdAkbeUqRl5hZ3+c/vSnWi8CSGf3vnKMZYLDdBUKTy+rf/JoQDv7AW5LiyYB5TIy74bHl23w dKH9FhujkYcrvFzI6N3L2em5VkNsiXeKb/K1ezvLhZVMkbSj+3We4/tlzcKBOm4lBu93mFZNUWXIO u5N/z+hQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9V0P-0000jb-1C; Tue, 09 Feb 2021 15:32:45 +0000 Received: from mail-qk1-x74a.google.com ([2607:f8b0:4864:20::74a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9V0M-0000iP-BE for linux-arm-kernel@lists.infradead.org; Tue, 09 Feb 2021 15:32:43 +0000 Received: by mail-qk1-x74a.google.com with SMTP id f16so15966806qkk.20 for ; Tue, 09 Feb 2021 07:32:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=3AT4g9LoM2snc1rY1VWM+BOoG0vxl/R52Ax9ZAP8Pps=; b=k1rtx4PVnaiy+LETQTREcYXHER5+5AtyI3qZdPOa8yc5S/IvoVwgzbcyPuYjfURKvg mf4cqSh4ZwqBgI8a+f159HJ/KZ69L+b7JQPGx/NI0eaDx4bYrKRv9zFAK6kU5b/YJ845 po7rt3mNdjrXT3aJIkJnbiwQdDCobCP9saAYr1jSmLoC9RSVXql5JnsCNmlA1R3fIYa1 Y7Ibjl484v9hpYK2vDeOd16qcawlXCInsfIY3nn4LMsio+qOuHihaIu9CAOIZoiquRu8 lp2bgQmlg9iX3G1e3GeBB6Pwb9wwsi7KD+vGdpJ4kn34mEoP0n7pfYM+q5bddzEwO+AK tJZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=3AT4g9LoM2snc1rY1VWM+BOoG0vxl/R52Ax9ZAP8Pps=; b=QJ+kyF8axh7uAk1+OifM8U9mxZafEAL8MvmNM7vbJUyTwT22CFtG1HTu2V8KwSShlu PAvT9owgJpcejgEJKH3oKYpihgE7j8S6UDTFDCGxaOeRESbJEtsrA7UKV0zZUuLs7cld 4Mi8ur8/aRNEzfK8S7skllhQz3VO1ryjXKgpm3a1tLPsCJyN84qwW89/3705ABucPa+e VMe4VmNMhstZMLu3vLkEu2nCOUc6IqYGTR3JDlChkeaOjpz3gecO456CfickkKsPNk8v yc7dlfIonBzyBqezpU/oTISlJ5wyhv29JgG3PuHQwYPJwcr3qAm4ljJIeiPdoC0PcCdZ 4LUQ== X-Gm-Message-State: AOAM532DCxnSiWNZt43kpD0N+BZ8HP5vZwcoS9eLYls+K2npV57GjecS HYUoVgOoIdYNLT++5YcgKdmEnWrPT5ZKZ/IH X-Google-Smtp-Source: ABdhPJwqugpPv8aDmVT/yfBcKnIX6EZIt6gbuf4077PS4mJNXAU2C7zv0XGdDILLP2NH6/qeAePdFV7TCMapcfTP X-Received: from andreyknvl3.muc.corp.google.com ([2a00:79e0:15:13:55a0:b27b:af1c:327]) (user=andreyknvl job=sendgmr) by 2002:a0c:ee89:: with SMTP id u9mr21350165qvr.40.1612884758518; Tue, 09 Feb 2021 07:32:38 -0800 (PST) Date: Tue, 9 Feb 2021 16:32:30 +0100 Message-Id: Mime-Version: 1.0 X-Mailer: git-send-email 2.30.0.478.g8a0d178c01-goog Subject: [PATCH mm] arm64: kasan: fix MTE symbols exports From: Andrey Konovalov To: Andrew Morton , Catalin Marinas , Vincenzo Frascino X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210209_103242_414647_83BA2E24 X-CRM114-Status: GOOD ( 10.42 ) 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, Marco Elver , Andrey Konovalov , Kevin Brodsky , Will Deacon , Branislav Rankov , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, Christoph Hellwig , linux-mm@kvack.org, Alexander Potapenko , Evgenii Stepanov , Andrey Ryabinin , Peter Collingbourne , Dmitry Vyukov Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Only export MTE symbols when KASAN-KUnit tests are enabled. Signed-off-by: Andrey Konovalov --- Andrew, please squash this into: "arm64: kasan: export MTE symbols for KASAN tests" --- arch/arm64/kernel/mte.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/kernel/mte.c b/arch/arm64/kernel/mte.c index a66c2806fc4d..788ef0c3a25e 100644 --- a/arch/arm64/kernel/mte.c +++ b/arch/arm64/kernel/mte.c @@ -113,13 +113,17 @@ void mte_enable_kernel(void) sysreg_clear_set(sctlr_el1, SCTLR_ELx_TCF_MASK, SCTLR_ELx_TCF_SYNC); isb(); } +#if IS_ENABLED(CONFIG_KASAN_KUNIT_TEST) EXPORT_SYMBOL_GPL(mte_enable_kernel); +#endif void mte_set_report_once(bool state) { WRITE_ONCE(report_fault_once, state); } +#if IS_ENABLED(CONFIG_KASAN_KUNIT_TEST) EXPORT_SYMBOL_GPL(mte_set_report_once); +#endif bool mte_report_once(void) {