From patchwork Mon Nov 23 20:07:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 11926455 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=-16.8 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 AC27EC63798 for ; Mon, 23 Nov 2020 20:12:51 +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 3A39120715 for ; Mon, 23 Nov 2020 20:12:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rJYnLVeS"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="WY7HnayG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3A39120715 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=K4qxSXg8+S2bNbIu24inyW5bcOkc3WY6pjI1kiT17L8=; b=rJYnLVeSfnEz9pWpvs0USEYD7 nXrS1EFdEHtD3aK0wO3+1m1lErjwC6BU+su5jS5B6CZR77BVlf5whIRa3obIlK8fsnY0qWOdpv98i yt2cdZrcYzXyTHLX7eV+uAXerzGJDweJdB3eSUMd7mhJWBpJcGl0d3O0X5U6xUD6NZ8PAhEwkCXLx Ew8CZeF3joqRIjAQN0gU1r2KBeSiKmb/K35cJpUGjHShkfd5QXmku0r5O+1YmWssC8hRRVj6+jp/B G4HqtRpiL5nQq1qlfewZjFnY4YU2uFOa9pqteUGlYGaSIIiSkZm2ifjeSz1i5qGw422uCGpZwW3RW 0BlOPwyeg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1khIAo-0000PK-5e; Mon, 23 Nov 2020 20:10:55 +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 1khI8c-0007yp-Aa for linux-arm-kernel@lists.infradead.org; Mon, 23 Nov 2020 20:08:54 +0000 Received: by mail-wm1-x349.google.com with SMTP id o17so141332wmd.9 for ; Mon, 23 Nov 2020 12:08:36 -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=L10tW/D05wNgm0snGrZ8GYs8HuV/uyjC1rIZlpL/xjk=; b=WY7HnayGjrG5u9kXKk5PhUzHTMXeXMBMMScYuxT/8DAoQRcVNeZljPfUVoz6rdJ4rG YP0LpimBcAhWWBzNRkoff7VZnStZrCdCr5fj9YFZmhpVg6GONpbuR2LP18Lui5aI13Ny HAVSxOIhdJcyWVH6UE+Au3IoID371wrixzkFIXK0kApB+hFg+r6v4vIHkmSb/HgEWFqb sLiPB18/Ikq0UNm8WGs1mKy/zg2/NcJsXJ7mYTauaCRn3fpZuQczNRYbl4lhD/CwmUUh 2P0rwvTmj35KW603PdUSux3zlw91dxbEIVTMZOa0su8773s56+IjuZ5BjZ8vvYwRXFUA xJpw== 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=L10tW/D05wNgm0snGrZ8GYs8HuV/uyjC1rIZlpL/xjk=; b=VH94quo1j6ijKbxmBR/yk0txi+O2a7YGPFAy3OTL1CaPD0OXxF0AObL1xBqeQ3NlCX 6sxSejZes50cJj1xzyjqeJFckPoMCl2ruNF7oLpMm0Nk1o1bHPVTILe4gWWKRhrRKTp8 vbby2kqkZH028qCmvrXnJrsMaVcBPBNI0A86Ylfd3lZKaaEOJDapePRblOQMZG/PpcWZ atIRCxAcComY4+h5crQ6QUGL3LLsBShcS2NKAdYBXDRvHbfr48QP9hOETUdmF12UIJ9P KnX9jbHlO1uEkxPBFRHVth9JXUw9fPsMYiISYDvXcwUq5ZvPwZKF94CG/o034aFMYmru 84eQ== X-Gm-Message-State: AOAM532Q4wJRlizRrhDs21/8NEWRoWiHJnBZn8Sy2y5++QqdkR28Bo/Z 5lPKdY0pmSYRgrGzZhhsIgPkhRaL3Rlxt1+m X-Google-Smtp-Source: ABdhPJzFbkTHYUXQ0AP1nUCkphIhjdFvzvHYBHe176dhuCRGDAPitBMRBsT6EO3FxUUsC9ksOQie6xmDPlpQhyt5 X-Received: from andreyknvl3.muc.corp.google.com ([2a00:79e0:15:13:7220:84ff:fe09:7e9d]) (user=andreyknvl job=sendgmr) by 2002:a1c:4086:: with SMTP id n128mr617585wma.68.1606162115754; Mon, 23 Nov 2020 12:08:35 -0800 (PST) Date: Mon, 23 Nov 2020 21:07:31 +0100 In-Reply-To: Message-Id: Mime-Version: 1.0 References: X-Mailer: git-send-email 2.29.2.454.gaff20da3a2-goog Subject: [PATCH mm v11 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-20201123_150838_456997_CA5BD8DD X-CRM114-Status: GOOD ( 14.63 ) 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