From patchwork Wed Nov 4 23:18:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 11883071 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=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,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 4CA88C00A89 for ; Thu, 5 Nov 2020 03:52:19 +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 B6F152072C for ; Thu, 5 Nov 2020 03:52:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iK1YvwXJ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="e5wu1RZW"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="oVOf4hGd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B6F152072C 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=9H8xbJQDmzG59diX4SrykW4U3ZYMPZV1d6dNterxYZ4=; b=iK1YvwXJOj9JGTpWYmm3v/34/ T1WtQw/B++Z2d36kb4FlqT3GCwKnZHuO3ZnSST5OYQZFh14K+tnnYJFJU7jbD2mE13SrFu9QGcd6Q sw5/byYlNWlKXUSMeDOag78/Ptx2/2rw2hBiY3Ke9ktPD3ejZE6B2pE2aAImU0lDVGSidF3aN+SsG bfc2zznFZOE5/K6DiUH8Tr6PblU3fQhshBB1KONHZnxKblmvoMChwD3ZxlKD9Kx3xL03LvSwiOkH7 xn+xd5UymfYFhpYYiuWqv47pAGucaOpQhFsedTUtJta4H1f+ZLrXYGpA4EW/mkANS75d/fdP/EPBF miB4xdvRA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaWIH-0007Sk-8o; Thu, 05 Nov 2020 03:50:37 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaW5L-00016k-P1 for linux-arm-kernel@merlin.infradead.org; Thu, 05 Nov 2020 03:37:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:Cc:To:From:Subject: References:Mime-Version:Message-Id:In-Reply-To:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Sy6BvWdNS0zjXQiflbFd/HmI5xZS6ylM1lYk0zN7bgc=; b=e5wu1RZW8PqdzZyNbn2UE9NmJT J656LKvXQBEyQla0ji26vUyCVPt6eSw+L7WJ7CjzSgMDFMR816XrBBYfRlJXImDldAM22vb2zund2 MHemHmEYV8Ze0ra9OgZKRgy//G0XDdiEcBvsE8ZvBPDm3cpiAgALAvEftGklVLMfuyq0CkUf+kXnv 7lEzhsJsmlRTo0dFAbbxuavbp/iJG+/lK+2Wa363h5UalQOITDsy75sFl4ewvkEfYMpEwiXNZRKtY 84/GliQ4WJrwfjFTloVxvrGPQn79UIFD6eOI1Gw5OZKIQRM8sTjkz2n5HEFA1Dkw2TvAd5bB9YvcH ozTRuL5A==; Received: from mail-wr1-x449.google.com ([2a00:1450:4864:20::449]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaS4o-0003wV-RP for linux-arm-kernel@lists.infradead.org; Wed, 04 Nov 2020 23:20:30 +0000 Received: by mail-wr1-x449.google.com with SMTP id h8so44418wrt.9 for ; Wed, 04 Nov 2020 15:20:26 -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=Sy6BvWdNS0zjXQiflbFd/HmI5xZS6ylM1lYk0zN7bgc=; b=oVOf4hGd0AFUpYHuVm2bbign6nHRWolcZwyLGwFgY79eiGA40WA026JsLxFYnaMRE7 7Qem6yGDs0EHmGnM6hkyMzEZRilHhE4uuoTGoNFI8kk/PWDT3yde4UScHLCdSurvd0q0 PTjbFlCgFa1xinn/DonMGmZg9d7ox7TjjC2ckWrFCXprqFFkcqatr0L0ezoe6qUJqbZh /cbDHfQ3hOdkE4KA4ND1K9oqEpcDGgiUND1+0+5V3MK1p7sVvMmsZSzZh8e1MjDx+Ela Kt9TS7lx5nG+ua/Ca7UbdTEz6mPxPjgpJW9u9r9i4Y7KO5KjqhmfHOlpJVlVTuKZV5Ld s8eQ== 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=Sy6BvWdNS0zjXQiflbFd/HmI5xZS6ylM1lYk0zN7bgc=; b=SBUm/3l3pMblARVYomroPxmyBYRA7v8c/kemX/och6hTQPonZfBgTw6lwzi8zNK/Ty yneXROPB7DvVdZfals7AZIcKxI//ScBoSTzzCAOjq4vJHSLNJeLde3yyFJM5nLvlbSl0 17C0CbZCFWJhVfDsfkPMLj1dRrdrW3MS/u8u9QI6s6r48Rns4M7iSxiEk5OfiLS/U55+ oCWApQJb70S/nuFUWLZyvcV6xfP2ZKUCHBukpCZYvgvYTd9gdmAId2i+xp43q2kq8FAZ ti0NUmty0z0UE1coj8CVBmH+vaDl3VwLErTtWvMECNOuCvEEZEf5Ysk1Vo6bMT+VEmfa 0BDw== X-Gm-Message-State: AOAM532lptD/HOjhwuZgCifzNcc5+YhfdiMIsLQTPOHrqe37IBLdMPtv aNNq3cUgSPB2VBR/2y0XKaMREYal1FpllbGP X-Google-Smtp-Source: ABdhPJzZ9KOcFwhWSCq7ThJthNaAtBBIIUJFB1KG0jE/KHPv0qGyNAKK4rhNYpc/h459aUe6dxs9fGZqdihpkt/y X-Received: from andreyknvl3.muc.corp.google.com ([2a00:79e0:15:13:7220:84ff:fe09:7e9d]) (user=andreyknvl job=sendgmr) by 2002:a1c:309:: with SMTP id 9mr83914wmd.80.1604531965449; Wed, 04 Nov 2020 15:19:25 -0800 (PST) Date: Thu, 5 Nov 2020 00:18:23 +0100 In-Reply-To: Message-Id: <88fb34d65d1ff22472a9a2ba6758203ce1bcfca9.1604531793.git.andreyknvl@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.29.1.341.ge80a0c044ae-goog Subject: [PATCH v8 08/43] kasan: only build init.c for software modes From: Andrey Konovalov To: Catalin Marinas X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201104_232027_204927_A9DCA762 X-CRM114-Status: GOOD ( 12.56 ) 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, linux-mm@kvack.org, Alexander Potapenko , Evgenii Stepanov , Andrey Ryabinin , Andrew Morton , Vincenzo Frascino , Dmitry Vyukov Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is a preparatory commit for the upcoming addition of a new hardware tag-based (MTE-based) KASAN mode. The new mode won't be using shadow memory, so only build init.c that contains shadow initialization code for software modes. No functional changes for software modes. Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Marco Elver --- Change-Id: I8d68c47345afc1dbedadde738f34a874dcae5080 --- mm/kasan/Makefile | 6 +++--- mm/kasan/init.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mm/kasan/Makefile b/mm/kasan/Makefile index 370d970e5ab5..7cf685bb51bd 100644 --- a/mm/kasan/Makefile +++ b/mm/kasan/Makefile @@ -29,6 +29,6 @@ CFLAGS_report.o := $(CC_FLAGS_KASAN_RUNTIME) CFLAGS_tags.o := $(CC_FLAGS_KASAN_RUNTIME) CFLAGS_tags_report.o := $(CC_FLAGS_KASAN_RUNTIME) -obj-$(CONFIG_KASAN) := common.o init.o report.o -obj-$(CONFIG_KASAN_GENERIC) += generic.o generic_report.o quarantine.o -obj-$(CONFIG_KASAN_SW_TAGS) += tags.o tags_report.o +obj-$(CONFIG_KASAN) := common.o report.o +obj-$(CONFIG_KASAN_GENERIC) += init.o generic.o generic_report.o quarantine.o +obj-$(CONFIG_KASAN_SW_TAGS) += init.o tags.o tags_report.o diff --git a/mm/kasan/init.c b/mm/kasan/init.c index dfddd6c39fe6..1a71eaa8c5f9 100644 --- a/mm/kasan/init.c +++ b/mm/kasan/init.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * This file contains some kasan initialization code. + * This file contains KASAN shadow initialization code. * * Copyright (c) 2015 Samsung Electronics Co., Ltd. * Author: Andrey Ryabinin