From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id czunNLIlmF8cRQAAWB0awg (envelope-from ) for ; Tue, 27 Oct 2020 09:50:42 -0400 Received: by simark.ca (Postfix, from userid 112) id CA9431EFBB; Tue, 27 Oct 2020 09:50:42 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 39A201E590 for ; Tue, 27 Oct 2020 09:50:42 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8E646383F840; Tue, 27 Oct 2020 13:50:41 +0000 (GMT) Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 2DB8A3851C03 for ; Tue, 27 Oct 2020 13:50:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2DB8A3851C03 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [10.0.0.11] (173-246-6-90.qc.cable.ebox.net [173.246.6.90]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id B953A1E590; Tue, 27 Oct 2020 09:50:38 -0400 (EDT) Subject: Re: [PATCH v2 01/24] New target methods for memory tagging support To: Luis Machado , gdb-patches@sourceware.org References: <20201022200014.5189-1-luis.machado@linaro.org> <20201022200014.5189-2-luis.machado@linaro.org> <89a1dc1c-75c0-5098-acf0-5f647df5a766@simark.ca> From: Simon Marchi Message-ID: <18b5e9d1-bd9b-c0b4-4599-ecc86fec5bfa@simark.ca> Date: Tue, 27 Oct 2020 09:50:38 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: david.spickett@linaro.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 2020-10-27 9:43 a.m., Luis Machado wrote: > The TAGS vector contains bytes. The interpretation of those bytes is > target/arch-specific. AArch64 interprets those as 1 tag per byte. Some > other target or arch may interpret those differently. > > Length is the number of bytes in the memory range, which doesn't > necessarily match the length of the TAGS vector. AArch64 has 1 tag for > every 16 bytes, for example. So in a 32 bytes memory range, we'd have 2 > bytes in the TAGS vector. > > Should I enhance the documentation of those methods to make it a bit > more clear? I realize some of this is tied to details and terminology of > the technology. Ok, that makes sense. I think it would help to say that the contents of TAGS is target and arch-specific. If the readers want more details, they'll know they have to dig into the target and arch code. Here in target_ops sounds like a good place to say it. >> Also, what does the return values mean? > My idea was to provide meaningful error codes, as opposed to a bool that > tells us the it succeeded/failed. Maybe I should make those a bool for > now given I don't have a standardized list of possible error codes? If the meaningful error codes allow for better error messages, sure. If so, I'd suggest using enumerations for the possible return values. Simon