From patchwork Fri Nov 13 22:15:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 11904943 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 A2C81C4742C for ; Fri, 13 Nov 2020 22:18:55 +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 14F6F2223F for ; Fri, 13 Nov 2020 22:18:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iosdTEsD"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="MsQn79So" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 14F6F2223F 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=qRKJaF1BveWmLpxBYfKAUFvU8wEo/VgucuiAM23UavU=; b=iosdTEsDTd09F6sAflqo+aBw/ 9q1W+I9Hx5I8nNTAo+P9NbXh5hLmDzB8rzQLvHdhUumtkfcoadQfQ0DWv6XF23igsPwAYTYFeFDeX lm8XfzJ5uO1AACg29nGR/HpDBSrWC4Xm87N/vBr+lJAIHN5sMe87OtMewg3kdzq8pKExrcafTVbaA Be3RNd84vMsBEQpxq5xqtY5GU9A6WWkmocyZIjUtx2aP2RBrY2BdOwvSaRW9pd8nmYiTX3WTW4O5b zdcudbwT8YHv8cp5nHMwti4G6WEix327mgoGgz03i3qWKggK07Cn9SO0N3QdKRI5q4f+4M7CP9K2S LHb9GOC2w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdhOZ-0000ch-VQ; Fri, 13 Nov 2020 22:18:16 +0000 Received: from mail-ed1-x549.google.com ([2a00:1450:4864:20::549]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdhMw-0008Mf-Rr for linux-arm-kernel@lists.infradead.org; Fri, 13 Nov 2020 22:16:38 +0000 Received: by mail-ed1-x549.google.com with SMTP id s7so5481393eds.17 for ; Fri, 13 Nov 2020 14:16:32 -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=XIXqMdSsmfBQs1yd8rWpQ1njkvR1OEP1mN24itzZ0z8=; b=MsQn79SoUJJeObtCQubP1XJM+/4uvn5lt22MBP3Wghdb06ywsc6YEeSNO+pYa3OIkh ssT4hBIw4jIkKZ2DFOTcVmfje5MA5QM1F+iJRPkRIeGP3mYJFg0uKDY6QuHIrXKWDU2R pzx/P0TPfJ7ttGDIaZI2mtP2nD5XnBF8ws2Otd/EjPQLE6h2BaCqXaZ9BI8T5YfOEL03 Iv8AGAs342RuHWaVZwAD6ZxN8L7XLb977yu1ejzUbvmzOxHKkaQrPvJ6tjnwhGHdfOgc CZzrtaEbw1REc2DDSauDmL9ePBBjDqvJgvvO5a65iOYnT0wmSQq9DkfU513BeUV/9Mrp qspA== 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=XIXqMdSsmfBQs1yd8rWpQ1njkvR1OEP1mN24itzZ0z8=; b=sV6GA1xy0zEpAboJONsELYOIFbrTsNg11L6PoUHHi8p/wus6dzBHS8rKDu5xNAn545 tZPTyQKXdxBv3DZ0T0stF2OFaO0/dyJVbBvtziV4yd5hMlPY3bhzteigR4GzdO2Lik9J 3yF6CZp+AyTPyk/ZAipgM55uHs0vJAk/MOdTmOPAbUAbDTtwhrd6guKjqmF7eX9ggl0E y8qH1Uj038y+1vfZVk/I5VpGULceME6VX6uTDixwJUQYmYUFCwyyfLVe7RoReEDtUOD4 nSYbW7I81cs5JHqerJskRi+EiZNXFuz9gN9UAc67rvuFWZRemV8UQsUPLBU9NMdjlBW+ M52Q== X-Gm-Message-State: AOAM531OZqFfbSXGGL+FDUR4QaWBNIwsbroeDmcZmyQ2Hj9hyLVg0Iej nVEJ+bbIx/Wt0McUvjP6TGa6IaGRWs6NAbQG X-Google-Smtp-Source: ABdhPJytYvAT7sfC6L6XRnid0q2PW2TI4VItscibi11n6UCT/CiKjrH55CPiPlLNCy0c2MaTEHl78/CLRBNkVgDR X-Received: from andreyknvl3.muc.corp.google.com ([2a00:79e0:15:13:7220:84ff:fe09:7e9d]) (user=andreyknvl job=sendgmr) by 2002:a05:6402:783:: with SMTP id d3mr4903651edy.168.1605305791570; Fri, 13 Nov 2020 14:16:31 -0800 (PST) Date: Fri, 13 Nov 2020 23:15:35 +0100 In-Reply-To: Message-Id: Mime-Version: 1.0 References: X-Mailer: git-send-email 2.29.2.299.gdc1121823c-goog Subject: [PATCH mm v10 07/42] kasan: only build init.c for software modes From: Andrey Konovalov To: Andrew Morton X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201113_171635_014936_C7CF5085 X-CRM114-Status: GOOD ( 14.27 ) 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 , Catalin Marinas , Kevin Brodsky , Will Deacon , Branislav Rankov , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Alexander Potapenko , Evgenii Stepanov , Andrey Konovalov , Andrey Ryabinin , 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