From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id B65192B3F9 for ; Mon, 10 Jun 2024 17:59:43 +0200 (CEST) Received: (qmail 3761 invoked by uid 550); 10 Jun 2024 15:59:39 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 3674 invoked from network); 10 Jun 2024 15:59:39 -0000 Date: Mon, 10 Jun 2024 11:59:54 -0400 From: Rich Felker To: Stefan Jumarea Cc: musl@lists.openwall.com Message-ID: <20240610155954.GM10433@brightrain.aerifal.cx> References: <20240610123624.305051-2-stefanjumarea02@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240610123624.305051-2-stefanjumarea02@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] [PATCH] mallocng: Add MTE support for Aarch64 On Mon, Jun 10, 2024 at 03:36:25PM +0300, Stefan Jumarea wrote: > Add support for Memory Tagging Extension. > > All the memory tagging code is placed within compiler guards, and is > enabled by using the `--enable-mte` configure option. > The option can only be used if compiling for Aarch64. > > All the primitives for generating, storing and loading the memory tags > are placed in a new header under `arch/aarch64/`. > > For now, only the actual user data is tagged. All metadata is untagged. It's exciting to see a (presumably working) implementation of this -- mallocng was designed with the intent to support things like MTE. I haven't read it in detail but I think to be acceptable upstream it will need some adjustments. One very minor thing is that all the uint64_t should be uintptr_t. But it looks like there's a lot of repetitition of the pattern of getting the untagged pointer, where in many cases, it could be done in the function the pointer is passed to (things like get_meta). I'll follow up with more detailed review later. Rich