From patchwork Thu Sep 24 22:50:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 11798309 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8A481112E for ; Thu, 24 Sep 2020 22:51:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4140523899 for ; Thu, 24 Sep 2020 22:51:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="Tq4lK60X" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4140523899 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BC6A18E000A; Thu, 24 Sep 2020 18:51:09 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id B7A1E8E0001; Thu, 24 Sep 2020 18:51:09 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A66F38E000A; Thu, 24 Sep 2020 18:51:09 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0144.hostedemail.com [216.40.44.144]) by kanga.kvack.org (Postfix) with ESMTP id 8D1D38E0001 for ; Thu, 24 Sep 2020 18:51:09 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 53F32181AE866 for ; Thu, 24 Sep 2020 22:51:09 +0000 (UTC) X-FDA: 77299452258.19.smile50_071533c27162 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id 34A461AD31E for ; Thu, 24 Sep 2020 22:51:09 +0000 (UTC) X-Spam-Summary: 1,0,0,68628c81bb32b9d8,d41d8cd98f00b204,33cjtxwokcnc3g6k7rdgoe9hh9e7.5hfebgnq-ffdo35d.hk9@flex--andreyknvl.bounces.google.com,,RULES_HIT:41:152:355:379:541:800:960:973:988:989:1042:1260:1277:1313:1314:1345:1359:1431:1437:1516:1518:1535:1541:1593:1594:1711:1730:1747:1777:1792:1981:2194:2199:2393:2538:2559:2562:3138:3139:3140:3141:3142:3152:3352:3865:3866:3871:3874:4250:4321:5007:6261:6653:6742:7514:9969:10004:10400:10450:10455:11026:11232:11473:11658:11914:12043:12048:12296:12297:12438:12555:12895:13069:13161:13229:13311:13357:14096:14097:14181:14394:14659:14721:19904:19999:21080:21365:21444:21451:21627:21772:30012:30054:30067,0,RBL:209.85.160.202:@flex--andreyknvl.bounces.google.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.100;04y8sfg6qcbdeu1qcc1ksfaxkit39opz6zh8nfn9p8uxxiszkq7hct7rae3s93n.ubq64iky13j8owkx8sme3izacg9uufbkoq9u4sut96u4fitemyqsqjhqb853gi3.r-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF X-HE-Tag: smile50_071533c27162 X-Filterd-Recvd-Size: 5081 Received: from mail-qt1-f202.google.com (mail-qt1-f202.google.com [209.85.160.202]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Thu, 24 Sep 2020 22:51:08 +0000 (UTC) Received: by mail-qt1-f202.google.com with SMTP id p43so478904qtb.23 for ; Thu, 24 Sep 2020 15:51:08 -0700 (PDT) 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=DufyUr3VDNtonx2hPCICVW4qjhSQO8Lbag8i7ReKhm4=; b=Tq4lK60XhwA6r8z47xs6/tLjMiMq7uXH5zEunwC8TmFzV8zfRbxWDfB1h+rOkoMLrc LUS+VVJIIHLY6D5jUOyUJ+ao1/EHV7xpjxkZGAWXm/u4vxHKqVqMp0VLEwa4DR1hQJLg 0lCVM0kusPwJSaN6PONOBuGteQx7fmR0pWPYBctv9qz/0PZFRS0V6bCvMdjFeQE4uWHW tO/b1AQeST4/Rc1YrywyMqTlGSN/8Aij7Odg9xsUm2paG1o9mcKWgVyFiOs6o9D6UTX1 R5fM7J4e/dmSfHMn4ItsRrueiiqIYeTHrziuFeIYL6GfY0OAgyOXWp7fk+fFetKnGcnB DBkw== 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=DufyUr3VDNtonx2hPCICVW4qjhSQO8Lbag8i7ReKhm4=; b=WyQ+98eGgofxYH5A3o//DIW7jFF3pQ/4/qFmBUic0PvU4yHVY1ncDfjJsFaVCl6kLg 0fQQAroKia3axShQMF//7rc/hqZs7HugB4NqwRxLsA0J6GgTgxJEhbw2JKutcUaQMZLt 2ujJSV/c8+I0PY4bhmRT7RLmxFdYBioRiDLqAKqLHQuXcvJ1n3sX/nJ7hQrWTg7/cDPi FSiVoTzqkkc9s2lux9eSsCQMyEuhxmg/ERIu3TPB1uSEKh6q5jEkasS60ylBo530pLUr Q+syYdf1N/CHkevD+smc68nrMXbr3JLHMtU2jkdGWyRTUFQ4Uyp/Cd4gipsGmCy8KOwR HVBg== X-Gm-Message-State: AOAM53352J3sSp/cviTK48jL2hm7PYhEjd7LupabJSGwQ4xRb7wZk3V6 AMKxsa7oi/xg/66Aim9PP/OgGnAyEdR6nMTo X-Google-Smtp-Source: ABdhPJyuSGecUOKg6Byl2rnxjDbt0du65/xn34f+JJEjgJqwxbZi16nIfFWRik6igwBkqq/Lgtj83xgKTLhfxDPy X-Received: from andreyknvl3.muc.corp.google.com ([2a00:79e0:15:13:7220:84ff:fe09:7e9d]) (user=andreyknvl job=sendgmr) by 2002:ad4:500c:: with SMTP id s12mr1591817qvo.7.1600987868036; Thu, 24 Sep 2020 15:51:08 -0700 (PDT) Date: Fri, 25 Sep 2020 00:50:14 +0200 In-Reply-To: Message-Id: <3ecf44f226dac37eb35409dc78568a99343fbf9e.1600987622.git.andreyknvl@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.28.0.681.g6f77f65b4e-goog Subject: [PATCH v3 07/39] kasan: only build init.c for software modes From: Andrey Konovalov To: Dmitry Vyukov , Vincenzo Frascino , Catalin Marinas , kasan-dev@googlegroups.com Cc: Andrey Ryabinin , Alexander Potapenko , Marco Elver , Evgenii Stepanov , Elena Petrova , Branislav Rankov , Kevin Brodsky , Will Deacon , Andrew Morton , linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov X-Bogosity: Ham, tests=bogofilter, spamicity=0.002004, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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