From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 7CB8BC388F7 for ; Fri, 13 Nov 2020 12:00:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 05CC12224C for ; Fri, 13 Nov 2020 12:00:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 05CC12224C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5428C6B00D5; Fri, 13 Nov 2020 07:00:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 51A2C6B00D6; Fri, 13 Nov 2020 07:00:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 42FEC6B00D7; Fri, 13 Nov 2020 07:00:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0021.hostedemail.com [216.40.44.21]) by kanga.kvack.org (Postfix) with ESMTP id 115996B00D5 for ; Fri, 13 Nov 2020 07:00:08 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id B3A19181AEF10 for ; Fri, 13 Nov 2020 12:00:07 +0000 (UTC) X-FDA: 77479251654.17.sign95_36154f12730e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id 9306F180D0185 for ; Fri, 13 Nov 2020 12:00:07 +0000 (UTC) X-HE-Tag: sign95_36154f12730e X-Filterd-Recvd-Size: 2661 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Fri, 13 Nov 2020 12:00:07 +0000 (UTC) Received: from gaia (unknown [2.26.170.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7FD642224B; Fri, 13 Nov 2020 12:00:03 +0000 (UTC) Date: Fri, 13 Nov 2020 12:00:01 +0000 From: Catalin Marinas To: Vincenzo Frascino Cc: Andrey Konovalov , Will Deacon , Dmitry Vyukov , Andrey Ryabinin , Alexander Potapenko , Marco Elver , Evgenii Stepanov , Branislav Rankov , Kevin Brodsky , Andrew Morton , kasan-dev@googlegroups.com, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v9 30/44] arm64: kasan: Allow enabling in-kernel MTE Message-ID: <20201113120000.GB3212@gaia> References: <5ce2fc45920e59623a4a9d8d39b6c96792f1e055.1605046192.git.andreyknvl@google.com> <20201112094354.GF29613@gaia> <66ef4957-f399-4af1-eec5-d5782551e995@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <66ef4957-f399-4af1-eec5-d5782551e995@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Nov 13, 2020 at 11:17:15AM +0000, Vincenzo Frascino wrote: > On 11/12/20 9:43 AM, Catalin Marinas wrote: > > On Tue, Nov 10, 2020 at 11:10:27PM +0100, Andrey Konovalov wrote: > >> From: Vincenzo Frascino > >> > >> Hardware tag-based KASAN relies on Memory Tagging Extension (MTE) > >> feature and requires it to be enabled. MTE supports > >> > >> This patch adds a new mte_init_tags() helper, that enables MTE in > >> Synchronous mode in EL1 and is intended to be called from KASAN runtime > >> during initialization. > > > > There's no mte_init_tags() in this function. > > During the rework, I realized that the description of mte_init_tags() in this > patch refers to mte_enable_kernel(). In fact the only thing that mte_init_tags() > does is to configure the GCR_EL1 register, hence my preference would be to keep > all the code that deals with such a register in one patch. Fine by me as long as the commit text is consistent with the diff. -- Catalin