Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1307537pxf; Fri, 12 Mar 2021 06:54:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJxiP/KxrvumVZ9dLJ8FPBonyO1MR4KqW5u5VWe+TDDLNYqBgMtV7cS7/7DjegDEzqsgajoF X-Received: by 2002:a05:6402:1350:: with SMTP id y16mr14488801edw.309.1615560848312; Fri, 12 Mar 2021 06:54:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615560848; cv=none; d=google.com; s=arc-20160816; b=ICE56Nxqh7Tq5jhkw+hdgRvnVxmRHhSQGkAW2LFBUd7uuN7FTyRh/YkIFCeyh7gQ1j I1dL9IR57lg1z6CWTr+srsfDq+IZ714lQplI0IvxXd9BfH85BzfsdVZCHo1SkXsBYAdW a4/jcD72UUfWivcf17d5+eiahIT6VB4pkjgZj9UIW196QjcZoexjr15EtKROHbFwwbv2 yahYXs3eqo9YsnBL2B9Hgl8BAjaBT2JwbUuFqiGtZYERY08lcL8ce8GOxbXc5ykbjyfJ MajGByLxPZ5AwAIe+k1EfKMjSDIFTFQaLbrRgxJuxuhbvAlRMcUcWsvrAuwe1w4aaGGc CQAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=dWHnToSwExfied/vlTN3Sdg2BhGnFt56vTuAsL518GA=; b=ESyWa7h6PFlnXcIJnYP7sCQKR38Mc1beYdrhdBvAORxO6nfZrm/aj0hpt1nthKKFjG DGxbGQadZea+vRTIGR08tGe78bKE6i0nyuVzYEzYYBLm0vDONHnq/XtUFRIO4h+EkNID yxT2CxbdDBOsr/lijaKEQonZ8ER4YXWnDfSXPeNDxoGVjQg8jKAHYgxR5ZyU3c6/8UEc t8zbD6haRYEjKo67n5clxAQp0qKG/+DnX/QG0jSF9mV9IXg3KshSfQ8vprMujG+fF+It y8QbsUfBFJ5AzJuKnie9N2A+GYT3bkOfUmMM8XAote1kpAIWZo+yV9EmmALbkVxjETQ0 mr4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=dVgWbHwn; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g14si4070252edr.362.2021.03.12.06.53.44; Fri, 12 Mar 2021 06:54:08 -0800 (PST) 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=@google.com header.s=20161025 header.b=dVgWbHwn; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231416AbhCLOug (ORCPT + 99 others); Fri, 12 Mar 2021 09:50:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231597AbhCLOuZ (ORCPT ); Fri, 12 Mar 2021 09:50:25 -0500 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54728C061574 for ; Fri, 12 Mar 2021 06:50:25 -0800 (PST) Received: by mail-pf1-x42d.google.com with SMTP id t85so1990174pfc.13 for ; Fri, 12 Mar 2021 06:50:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dWHnToSwExfied/vlTN3Sdg2BhGnFt56vTuAsL518GA=; b=dVgWbHwnB2V50cI/RbMVpAA8ArhidOR3CJ8bFHTz7jBdK2FZQH3zSRL6lbVbSAcPZh Gqt/PDugUzg0vely26mBsLvIIPK58NHYwKSocpGHnkMd4k/MxCa9hs+8AoBnJtpvtu2p KRBawlyzQWtFupeN+jIrxcIo+IF9ZC52o8/3mFHikFB5ZI5AyAYo60G79yix0zw/y49X ODVGyhh2+SS9MpMkNN8EM/tSwXPwbRYnyXNBYm9dRCcmVeLoumhdQwYIwdcZhoznasLH tr+6t2wSuDHmHhCVX4Lu/3cN1EvPpuPqiirECs18uh34Dzop0HmpibFNgY+8lpTFCsFO o0bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dWHnToSwExfied/vlTN3Sdg2BhGnFt56vTuAsL518GA=; b=edCA7PDHKl+bwn29R8+0106wt/D/KgDCQF1reledbgTdU46X82xcBSQmOxJpEm6R4K lq7U9zbecAK9Bvp6UyLF53ND5IF6JIvWAdC6kKOjCK/f2dXoesoxMs/6H3rb1KLMiTo1 iNIBw5g1F25eGB8eT597OnwVFX5Yv/2iM8A1TQcKlVI4ySlMGq5XueZpolfoXUmCm8Gx SHwlCXX7m87cHV5u25FEBG8vqhzq+aw0dN6DaWEBMAlpTrkLyRXY7t1/DVh6bEQr5yoN rxTDFQyLII8r387MrSltL9uqkeW/kgjXgEvaIjqcWRsV0N34QDs618WLxqTN6k7EZtAO PvNw== X-Gm-Message-State: AOAM532USBle2sxDg9/fPxmR/GrA5LRsPMj+6fhrDAtSdCWs5GqpePqO nCMzkvASwjbFhaVkWZjsXzhaUOxSBOtDEFB11f2BBA== X-Received: by 2002:a63:455d:: with SMTP id u29mr11898210pgk.286.1615560624740; Fri, 12 Mar 2021 06:50:24 -0800 (PST) MIME-Version: 1.0 References: <20210312142210.21326-1-vincenzo.frascino@arm.com> In-Reply-To: <20210312142210.21326-1-vincenzo.frascino@arm.com> From: Andrey Konovalov Date: Fri, 12 Mar 2021 15:50:13 +0100 Message-ID: Subject: Re: [PATCH v15 0/8] arm64: ARMv8.5-A: MTE: Add async mode support To: Vincenzo Frascino Cc: Linux ARM , LKML , kasan-dev , Andrew Morton , Catalin Marinas , Will Deacon , Dmitry Vyukov , Andrey Ryabinin , Alexander Potapenko , Marco Elver , Evgenii Stepanov , Branislav Rankov , Lorenzo Pieralisi Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 12, 2021 at 3:22 PM Vincenzo Frascino wrote: > > This patchset implements the asynchronous mode support for ARMv8.5-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. > > The exception can be handled synchronously or asynchronously. When the > asynchronous mode is enabled: > - Upon fault the PE updates the TFSR_EL1 register. > - The kernel detects the change during one of the following: > - Context switching > - Return to user/EL0 > - Kernel entry from EL1 > - Kernel exit to EL1 > - If the register has been updated by the PE the kernel clears it and > reports the error. > > The series is based on linux-next/akpm. > > 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/v13.async.akpm Acked-by: Andrey Konovalov Tested-by: Andrey Konovalov for the series. Thank you, Vincenzo!