From patchwork Tue Nov 10 22:10:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 11895617 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 CCE9DC4742C for ; Tue, 10 Nov 2020 22:15:44 +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 4A29F20637 for ; Tue, 10 Nov 2020 22:15:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="k3xfmRZg"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="l7Hc/vzP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A29F20637 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=IpJwFWC2qApd5/JMrMeq+GY9glN9LosPzyDL/TKcvYk=; b=k3xfmRZg0uJI67+SaI+Pi5LfT 7DBzh9s85wU1roTQhmVqtanbYaFbL3O5QWaMeLySXlFOf8mfOFUUaMaU15DHWqQ1zxhZh6PkKRtC/ bHFt/pXxqZqacLTCeMFBbG+Ta14EXa63MJI65Jtu92WtIFoqMo3CV8mdBp9ysIWswKqQMjfkDRqdL LHqg1T/wzz5TDVHqZh6VBfoS4pv64B9UwxSuB4g0+ohKlRIY+bWXAuBddzclDkmpdv8A793XEbP+k TcJSlGCzx1eXOK1KIUI37Tk04Wxg1vQv/7eK6UlTZr6vBd43O72pT8IkIgsQxVV646mK0dy88IQan wggmIy7ig==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcbum-0005vS-FJ; Tue, 10 Nov 2020 22:15:00 +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 1kcbrN-0004Xq-Or for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 22:11:48 +0000 Received: by mail-wm1-x349.google.com with SMTP id u207so1857021wmu.4 for ; Tue, 10 Nov 2020 14:11: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=6f9VU8cnKdC26HiWZCbo7yiQNGjM3ZLFH75+rhjhEuo=; b=l7Hc/vzPC33aK0F2FIwgATKyemADk7tdOmZrpOP8l2NozmNU7dTMYzx+4npCt0feKi KSOilVDVHDm8DsTkYgDpTg3kYxyhwKNlGfWXXNQ6swfPw/DeVNxT9uawaPbUBhXG5GIe ipA5298LKMh3NZpmggt8K/fCNgHnqV5XmgvaK1KfYzpWYL4ay11vVxxhut2NLg6THaeP enxKse/CPfgSp7EVWaAXGZymqT77ntW7tWS5U2WPjdll03kJx6j+ZI3ZeZkB6hM+wgWQ 3uesvOfapoVmF5T8WxbmKBg+rhoo0TcqjyqMS30GmS8JAGED4uLACabPMwPgeA9S5NwI 9ChQ== 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=6f9VU8cnKdC26HiWZCbo7yiQNGjM3ZLFH75+rhjhEuo=; b=RfifJQaLlAulGHk73HGVZ6Gou/cCWcL3CFiFePPAS311b+gPseNRimGn6apfAnsi2d Ry+yj/vLQhG7XDjt/YGnQNI5Hghf6OWJ0SPVMYBqXoNk3QnBULORuyqaAYU65L6rW0t3 Rm4/EadmoKN2XTvmOJe3IZVBuoOIBsE9goVCm4y1p0t89OTTCBN1g6Mq/Ga1oxtMilEb 6evYiJgrRP3VBcF6Df0TMR3Zz28IPA0aSN7Nx793a8pdh7KaMlrbpZ2WjDe8HI3iEGQs WY6vB32twVE9Tjyew0RXyy5iNbFWHY4kxvetibCBmLAgHMgr5qlunm3rcF4gDwU/ay5Z YLRg== X-Gm-Message-State: AOAM532AP4M5lf4lUbjcCo0Y6CzRvZD6y5EhlYACZ3VFa83WhHzHpfD1 dWX7lOURuHNRHTSPUnTBgoPZ9coa8G5qfWtU X-Google-Smtp-Source: ABdhPJzzHYnhIMVYTBo48dWfa01YIUeKy05HkzFxcXPTRtXwbOHLJwDIYk0OW4nPWTiw0rh1kN+BALAEOKuM2KHX X-Received: from andreyknvl3.muc.corp.google.com ([2a00:79e0:15:13:7220:84ff:fe09:7e9d]) (user=andreyknvl job=sendgmr) by 2002:a1c:a5d8:: with SMTP id o207mr283775wme.0.1605046285365; Tue, 10 Nov 2020 14:11:25 -0800 (PST) Date: Tue, 10 Nov 2020 23:10:05 +0100 In-Reply-To: Message-Id: <8f1316319d050f2019e03dac28a37ce1dd5206db.1605046192.git.andreyknvl@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.29.2.222.g5d2a92d10f8-goog Subject: [PATCH v9 08/44] 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-20201110_171129_909361_62FBA6F9 X-CRM114-Status: GOOD ( 14.18 ) 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 Reviewed-by: Alexander Potapenko --- 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