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=-8.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 D4E0DC43461 for ; Thu, 17 Sep 2020 16:26:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A1A6A20795 for ; Thu, 17 Sep 2020 16:26:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728302AbgIQQ0B (ORCPT ); Thu, 17 Sep 2020 12:26:01 -0400 Received: from foss.arm.com ([217.140.110.172]:48810 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728496AbgIQQZZ (ORCPT ); Thu, 17 Sep 2020 12:25:25 -0400 X-Greylist: delayed 561 seconds by postgrey-1.27 at vger.kernel.org; Thu, 17 Sep 2020 12:25:25 EDT Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 76B0D11D4; Thu, 17 Sep 2020 09:15:57 -0700 (PDT) Received: from arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AAA243F68F; Thu, 17 Sep 2020 09:15:55 -0700 (PDT) Date: Thu, 17 Sep 2020 17:15:53 +0100 From: Dave Martin To: Catalin Marinas Cc: Will Deacon , linux-arch@vger.kernel.org, libc-alpha@sourceware.org, Szabolcs Nagy , Andrey Konovalov , Kevin Brodsky , linux-mm@kvack.org, Andrew Morton , Vincenzo Frascino , Peter Collingbourne , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v9 29/29] arm64: mte: Add Memory Tagging Extension documentation Message-ID: <20200917161550.GA6642@arm.com> References: <20200904103029.32083-1-catalin.marinas@arm.com> <20200904103029.32083-30-catalin.marinas@arm.com> <20200917081107.GA29031@willie-the-truck> <20200917090229.GA10662@gaia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200917090229.GA10662@gaia> User-Agent: Mutt/1.5.23 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org On Thu, Sep 17, 2020 at 10:02:30AM +0100, Catalin Marinas wrote: > On Thu, Sep 17, 2020 at 09:11:08AM +0100, Will Deacon wrote: > > On Fri, Sep 04, 2020 at 11:30:29AM +0100, Catalin Marinas wrote: > > > From: Vincenzo Frascino > > > > > > Memory Tagging Extension (part of the ARMv8.5 Extensions) provides > > > a mechanism to detect the sources of memory related errors which > > > may be vulnerable to exploitation, including bounds violations, > > > use-after-free, use-after-return, use-out-of-scope and use before > > > initialization errors. > > > > > > Add Memory Tagging Extension documentation for the arm64 linux > > > kernel support. > > > > > > Signed-off-by: Vincenzo Frascino > > > Co-developed-by: Catalin Marinas > > > Signed-off-by: Catalin Marinas > > > Acked-by: Szabolcs Nagy > > > > I'm taking this to mean that Szabolcs is happy with the proposed ABI -- > > please shout if that's not the case! > > I think Szabolcs is still on holiday. To summarise the past threads, > AFAICT he's happy with this per-thread control ABI but the discussion > went on whether to expand it in the future (with a new bit) to > synchronise the tag checking mode across all threads of a process. This > adds some complications for the kernel as it needs an IPI to the other > CPUs to set SCTLR_EL1 and it's also racy with multiple threads > requesting different modes. > > Now, in the glibc land, if the tag check mode is controlled via > environment variables, the dynamic loader can set this at process start > while still in single-threaded mode and not touch it at run-time. The > MTE checking can still be enabled at run-time, per mapped memory range > via the PROT_MTE flag. This approach doesn't require any additional > changes to the current patches. But it's for Szabolcs to confirm once > he's back. > > > Wasn't there a man page kicking around too? Would be good to see that > > go upstream (to the manpages project, of course). > > Dave started writing one for the tagged address ABI, not sure where that > is. For the MTE additions, we are waiting for the ABI to be upstreamed. The tagged address ABI control stuff is upstream in the man-pages-5.08 release. I don't think anyone drafted anything for MTE yet. Do we consider the MTE ABI to be sufficiently stable now for it to be worth starting drafting something? Cheers ---Dave 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=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 A9C89C43461 for ; Thu, 17 Sep 2020 16:17:12 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 048F5206C3 for ; Thu, 17 Sep 2020 16:17:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Cx27/vaa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 048F5206C3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NFWQoFTgusHUEVnxvHYfGts9Z9p2KXh4mQg3te8U3Vg=; b=Cx27/vaalvo+k0wqNaa8+Wqmo 3eORqU1T9C5fW9h/dkEi1elmJWfnQcUYFEFYLvI+LDnea1efmSLSAImCozSHMPXh/kMB2jqTdJrnh ZYmv05J9xGi1jQQp0sGztrIdORf8Ar4kQwy85nQ/TkJQPAkzikZSq484TLXSmONj1XWjkwrYMbMzR GfU95mg9VJjSPclbv7fTVtb/JxYuhM3to1BL4llCZ10hEw3JnOQ6GZxS7TUz7Jd1nk9ZhwwpbQ1WY MQKyvuNVTYdG7WN0aTOFK/Uf7bxJ83tIb4OadKld82gwSmJ80C39lDRc8/QnRqyLSG5FjZcpX2FnG m4IAZmHSA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIwZm-0001Un-AD; Thu, 17 Sep 2020 16:16:02 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIwZj-0001U8-PM for linux-arm-kernel@lists.infradead.org; Thu, 17 Sep 2020 16:16:00 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 76B0D11D4; Thu, 17 Sep 2020 09:15:57 -0700 (PDT) Received: from arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AAA243F68F; Thu, 17 Sep 2020 09:15:55 -0700 (PDT) Date: Thu, 17 Sep 2020 17:15:53 +0100 From: Dave Martin To: Catalin Marinas Subject: Re: [PATCH v9 29/29] arm64: mte: Add Memory Tagging Extension documentation Message-ID: <20200917161550.GA6642@arm.com> References: <20200904103029.32083-1-catalin.marinas@arm.com> <20200904103029.32083-30-catalin.marinas@arm.com> <20200917081107.GA29031@willie-the-truck> <20200917090229.GA10662@gaia> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200917090229.GA10662@gaia> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200917_121559_870003_D0836B0E X-CRM114-Status: GOOD ( 26.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, libc-alpha@sourceware.org, Szabolcs Nagy , Andrey Konovalov , Kevin Brodsky , Peter Collingbourne , linux-mm@kvack.org, Andrew Morton , Vincenzo Frascino , Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Sep 17, 2020 at 10:02:30AM +0100, Catalin Marinas wrote: > On Thu, Sep 17, 2020 at 09:11:08AM +0100, Will Deacon wrote: > > On Fri, Sep 04, 2020 at 11:30:29AM +0100, Catalin Marinas wrote: > > > From: Vincenzo Frascino > > > > > > Memory Tagging Extension (part of the ARMv8.5 Extensions) provides > > > a mechanism to detect the sources of memory related errors which > > > may be vulnerable to exploitation, including bounds violations, > > > use-after-free, use-after-return, use-out-of-scope and use before > > > initialization errors. > > > > > > Add Memory Tagging Extension documentation for the arm64 linux > > > kernel support. > > > > > > Signed-off-by: Vincenzo Frascino > > > Co-developed-by: Catalin Marinas > > > Signed-off-by: Catalin Marinas > > > Acked-by: Szabolcs Nagy > > > > I'm taking this to mean that Szabolcs is happy with the proposed ABI -- > > please shout if that's not the case! > > I think Szabolcs is still on holiday. To summarise the past threads, > AFAICT he's happy with this per-thread control ABI but the discussion > went on whether to expand it in the future (with a new bit) to > synchronise the tag checking mode across all threads of a process. This > adds some complications for the kernel as it needs an IPI to the other > CPUs to set SCTLR_EL1 and it's also racy with multiple threads > requesting different modes. > > Now, in the glibc land, if the tag check mode is controlled via > environment variables, the dynamic loader can set this at process start > while still in single-threaded mode and not touch it at run-time. The > MTE checking can still be enabled at run-time, per mapped memory range > via the PROT_MTE flag. This approach doesn't require any additional > changes to the current patches. But it's for Szabolcs to confirm once > he's back. > > > Wasn't there a man page kicking around too? Would be good to see that > > go upstream (to the manpages project, of course). > > Dave started writing one for the tagged address ABI, not sure where that > is. For the MTE additions, we are waiting for the ABI to be upstreamed. The tagged address ABI control stuff is upstream in the man-pages-5.08 release. I don't think anyone drafted anything for MTE yet. Do we consider the MTE ABI to be sufficiently stable now for it to be worth starting drafting something? Cheers ---Dave _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel