Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp611282pxb; Wed, 27 Jan 2021 16:43:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQgOVY8muu3/4Mb8qpwYzlHiyljHe9baB5rA19NUE4waTd/tJK+br6KxV/PSDHRSzLrBwO X-Received: by 2002:a50:e3c4:: with SMTP id c4mr11384674edm.77.1611794617655; Wed, 27 Jan 2021 16:43:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611794617; cv=none; d=google.com; s=arc-20160816; b=sS3ExqDrPhJbdoj9IihODF5EePNUCwMrRHCBTY6vPZyat/ObKfF8byOYVCa2c/+ug0 5euhnAau6fnOCG+PevTXIhoflKweJBBm1uZOIX9gRCGtOlxbxc2GIkYdfC39HfSF7DW8 Wo0RFJtdnofgTZPAAthJtP9q0QYjvR0TrEKwr4NB+FgmvCf22Xb1LSNwE2MFDyE8wneo msFRpxfGi6ouHwDTLNtCL5ZWA97kuV7ogjVlxxWYbvee2EYRE27TnQmKP6Xx0z9Rz70l ekyDYshF2cG0Jb6GjB1nII312iRIU/z4JIvxn1Ym2f+0sYeBHYu3qQm7LInnhWYT06uI huMw== 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=4M400GxWqEM/oC6PMOKM+ztcI/P1WmaaOFCpJlHbpFg=; b=sOtCzCxdt4DeWlUfoikzI4OvIuzJnPEruyoqJFmDm+fG7SUAfhmdNQ/9UbrVodS86z C8vgpO0bqIMJxL5SqmNxI0cEmscUp2V67jL3MSOVep7YxNavvrphgJB5Nnwf4kOJ+XV2 T3LXvDcf9OqogNzniAimojTO1Ze2PIth+7hHZxPbSf5U6z0y0MfoslvrpuHxSjRDOJFA Y85S5BCz5+2VgloTyFczrDbdhPdZFwn1nrC4DSMU3A8U6Qdoj2XxKpc35JyjJS2tIhjy ctmantxgd2GSZgwV0/uY+4ZU/n9xlvACORzmXvo0bIcyd0urd5ucwUJnralUMsmiMZAe v4ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=u+exvneJ; 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 t11si1859043edy.360.2021.01.27.16.43.13; Wed, 27 Jan 2021 16:43:37 -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=@kernel.org header.s=k20201202 header.b=u+exvneJ; 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 S236641AbhA0WUe (ORCPT + 99 others); Wed, 27 Jan 2021 17:20:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:34866 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237124AbhA0WUa (ORCPT ); Wed, 27 Jan 2021 17:20:30 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id CCB5D64D9F; Wed, 27 Jan 2021 22:19:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611785986; bh=8Vumxy5sgtpiFy5Xedhu2PELo2yTfRiVO0cxvR9NpfM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=u+exvneJjPwNmemiRRMMCCDV/jP1oLJ+aQrEuREFMgspANJbkg/FXhudzP0yP5ZgM 1M8NHZBFIDOjbAFW3MA8I6puVO2XtP1rBLsFBsQxsanYPgsnkfK/0r+29S43cbxuNb UoPD74xkSFx69/x/gKvJvsx2263rEFhrBxYOOVuw2bVe7+I5H8ZvVDJ/z7k0btPMIi TqgIDTKznePyr7bNU6IqXYU9ZTXyShdxFiu1FMZDCwOyB0/yTXGI5IGM+F0tWtL7Um zKdO6hEwFFBGn0uJvP+E9EIcI1f9o1FQS9FFQxa/3t+HGtQx6/HruxigoOs2HM+f4a rYRFwy8YdNtPQ== Date: Wed, 27 Jan 2021 22:19:39 +0000 From: Will Deacon To: Andrey Konovalov Cc: Vincenzo Frascino , Andrew Morton , Linux ARM , LKML , kasan-dev , Catalin Marinas , Dmitry Vyukov , Andrey Ryabinin , Alexander Potapenko , Marco Elver , Evgenii Stepanov , Branislav Rankov Subject: Re: [PATCH v9 0/4] arm64: ARMv8.5-A: MTE: Add async mode support Message-ID: <20210127221939.GA848@willie-the-truck> References: <20210126134603.49759-1-vincenzo.frascino@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 27, 2021 at 09:00:17PM +0100, Andrey Konovalov wrote: > On Tue, Jan 26, 2021 at 2:46 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/v10.async.akpm > > > > 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 > > Signed-off-by: Vincenzo Frascino > > Tested-by: Andrey Konovalov > > > Vincenzo Frascino (4): > > arm64: mte: Add asynchronous mode support > > kasan: Add KASAN mode kernel parameter > > kasan: Add report for async mode > > arm64: mte: Enable async tag check fault > > Andrew, could you pick this up into mm? The whole series will need to > go through mm due to dependencies on the patches that are already > there. Please can you check that it doesn't conflict with the arm64 for-next/core branch first? Will