Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp894068pxb; Wed, 29 Sep 2021 11:55:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQYgNj7v/EtyVL0J5ERS+GsznlxoLlSjJl1Nnd7y5qPybsOxDgcOiEeREUFgHy+orFFkk/ X-Received: by 2002:a17:90b:1e02:: with SMTP id pg2mr8270127pjb.114.1632941756093; Wed, 29 Sep 2021 11:55:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632941756; cv=none; d=google.com; s=arc-20160816; b=cMzf/2W1EVRbQ2acfrBTqFTyPzQRcOxgauvgTEkyVjZ2sEGG6NfGcUzOVvM84zk526 I4cfPPRkizUXEndIUv9QU3/vXnmlU14lTeQ0ic5uD2dAjQex/g82Rbt16dmEt25hFaWd JtfzIzNXvWDmbAquA1iprKzhv+Ch+bwNQzYUavQOOMM+Tg8eCS8RQoCqruxEy2djT/Qz pECm9qc6z2Yl8NUIMJ3Q4DQPxOgkgvQrFHJNQQvMy3gwuipFeeZGGq3704b4MTcukiUM tNpsJZBs5Ives0Rbs1pUtATCz2Y3YOl8I7F7i7UVpt28ioC/tgSNm4H1I0EU59ZE9c0I Z5cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=IrBRF2Gn9frgbDCRyuiNjLiVneMvAlQsIedPPbnal/Y=; b=U1B8/IdxrJjc/zgchLZZiI/wJ6SpLGq0fN4DL28P6BBY08+w4QHyw8xH4j/uRq6MUf /Hn4Zv6FzRjp8b/Y5f5qPKkzNXjSdgB2hCKfojGo2N/m58LMydBLlYlUSyzvOlXwk6x/ m8D3vtHWeTnEDMcXYgzP7PKbDr8nd32nKnxqUJwdSnV9Aq70SBhbC9WF7PFDXWXLgrbV muslLVDe//BXX4CPwrXO57RbVBnrC+mJIkcyTt/bZN41ROlLNVu5S2JlSInLpS1kWi1l F3MjN5Nj0iRPjr840FHLC034YI7Op7Xm8K7hPzs8ztLn+5t9ycrpxWPM9jEvbDnTlezp MJYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Yni+YWJS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i7si728016pgq.105.2021.09.29.11.55.43; Wed, 29 Sep 2021 11:55:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Yni+YWJS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245185AbhI2Pu4 (ORCPT + 99 others); Wed, 29 Sep 2021 11:50:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:46432 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243284AbhI2Puz (ORCPT ); Wed, 29 Sep 2021 11:50:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 92CC9613DA; Wed, 29 Sep 2021 15:49:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632930553; bh=tJRSZMcN6OL6Z3bkEpmzAtyL7foeosZpo1d1Bfhkyqg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Yni+YWJS5mSL4yiEUpgHvShyKbR3i1LD26qG9yGY8zBkwyh9/W5QdBMs4x5v5zbrI O2NTsg5hCeOW7kt75tC6vtfEJxn87NhtBW0PPXS0/Cib7ds2SdXKA1Rzg946vmtQo9 SfwAkUFP1DfyLHxzi0ChivCbvzLukuNC58lelUNDck9Zz3IkgUHyp5Oa4tbnBJY9FB v01MSeo5iYTn3/ymUBcEMByK3vOLgZf6ZiWWLgFHHFG1Et5QYLp59G4KQqXbg5So+z Yrm9MrSLPrxVxJd49q/SqIsuW1NPhtFSRYj++178UcLF2ybjDUVBEXulbMSqLxGBdo k7KUxP8Lpz5Dw== Date: Wed, 29 Sep 2021 16:49:08 +0100 From: Will Deacon To: Vincenzo Frascino Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, Andrew Morton , Catalin Marinas , Dmitry Vyukov , Andrey Ryabinin , Alexander Potapenko , Marco Elver , Evgenii Stepanov , Branislav Rankov , Andrey Konovalov , Lorenzo Pieralisi Subject: Re: [PATCH 0/5] arm64: ARMv8.7-A: MTE: Add asymm mode support Message-ID: <20210929154907.GC22029@willie-the-truck> References: <20210913081424.48613-1-vincenzo.frascino@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210913081424.48613-1-vincenzo.frascino@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 13, 2021 at 09:14:19AM +0100, Vincenzo Frascino wrote: > This series implements the asymmetric mode support for ARMv8.7-A Memory > Tagging Extension (MTE), which is a debugging feature that allows to > detect with the help of the architecture the C and C++ programmatic > memory errors like buffer overflow, use-after-free, use-after-return, etc. > > MTE is built on top of the AArch64 v8.0 virtual address tagging TBI > (Top Byte Ignore) feature and allows a task to set a 4 bit tag on any > subset of its address space that is multiple of a 16 bytes granule. MTE > is based on a lock-key mechanism where the lock is the tag associated to > the physical memory and the key is the tag associated to the virtual > address. > > When MTE is enabled and tags are set for ranges of address space of a task, > the PE will compare the tag related to the physical memory with the tag > related to the virtual address (tag check operation). Access to the memory > is granted only if the two tags match. In case of mismatch the PE will raise > an exception. > > When asymmetric mode is present, the CPU triggers a fault on a tag mismatch > during a load operation and asynchronously updates a register when a tag > mismatch is detected during a store operation. > > The series is based on linux-v5.15-rc1. > > To simplify the testing a tree with the new patches on top has been made > available at [1]. > > [1] https://git.gitlab.arm.com/linux-arm/linux-vf.git mte/v1.asymm > > Cc: Andrew Morton > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Dmitry Vyukov > Cc: Andrey Ryabinin > Cc: Alexander Potapenko > Cc: Marco Elver > Cc: Evgenii Stepanov > Cc: Branislav Rankov > Cc: Andrey Konovalov > Cc: Lorenzo Pieralisi > Signed-off-by: Vincenzo Frascino > > Vincenzo Frascino (5): > kasan: Remove duplicate of kasan_flag_async > arm64: mte: Bitfield definitions for Asymm MTE > arm64: mte: CPU feature detection for Asymm MTE > arm64: mte: Add asymmetric mode support > kasan: Extend KASAN mode kernel parameter > > Documentation/dev-tools/kasan.rst | 10 ++++++++-- I'm surprised not to see any update to: Documentation/arm64/memory-tagging-extension.rst particularly regarding the per-cpu preferred tag checking modes. Is asymmetric mode not supported there? Will