From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id WWvpKQV5l2PaxiYAWB0awg (envelope-from ) for ; Mon, 12 Dec 2022 13:55:01 -0500 Received: by simark.ca (Postfix, from userid 112) id 9CACC1E126; Mon, 12 Dec 2022 13:55:01 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=WBENDE1G; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_HI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 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 D826A1E11E for ; Mon, 12 Dec 2022 13:54:59 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2886638518A1 for ; Mon, 12 Dec 2022 18:54:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2886638518A1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670871299; bh=51/9wIx/dEl09KChB8BACL68gUU4UCfzCtRNdy5ex04=; h=Date:Subject:To:Cc:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=WBENDE1GL5gDQ91u94HBwWuOPOqhrYHpBAUh0xqC4AigzStaMJJh2bv43hkCXaMxC FRO8BPCJplcMz3J1NqfNpIeM5LfCx68h+SmpmkCa0xLVtBc9B2MP3Uk61cnbhBrixK WQJQLQwCXLX0XcB33Md1wISYb8E4mQ3LMtiTg2Uk= Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 5797B3853D4F for ; Mon, 12 Dec 2022 18:54:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5797B3853D4F Received: from [10.0.0.11] (unknown [217.28.27.60]) (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 6EDAC1E112; Mon, 12 Dec 2022 13:54:39 -0500 (EST) Message-ID: Date: Mon, 12 Dec 2022 13:54:39 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH v4] [aarch64] Fix removal of non-address bits for PAuth Content-Language: en-US To: Luis Machado , gdb-patches@sourceware.org Cc: simon.marchi@efficios.com, jhb@FreeBSD.org, lsix@lancelotsix.com, thiago.bauermann@linaro.org References: <20220705140037.135012-1-luis.machado@arm.com> <20221212171320.799445-1-luis.machado@arm.com> In-Reply-To: <20221212171320.799445-1-luis.machado@arm.com> Content-Type: text/plain; charset=UTF-8 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: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi Luis, I noted some nits, but the patch LGTM in any case: Approved-By: Simon Marchi > +CORE_ADDR > +aarch64_mask_from_pac_registers (const CORE_ADDR cmask, const CORE_ADDR dmask) > +{ > + if (dmask != cmask) > + { > + /* Warn if the masks are different. */ > + aarch64_pauth_mask_warning (); We don't really need aarch64_pauth_mask_warning anymore, you can inline the warning here. > +# Cycle through the tag and pac bit ranges and check how GDB > +# behaves when trying to access these addresses. > +foreach upper_bits {"0x0" "0x1" "0x2" "0x4" "0x8" "0x10" "0x20" "0x40" "0x80"} { > + foreach lower_bits {"0x0" "0x1" "0x2" "0x4" "0x8" "0x10" "0x20" "0x40"} { I would perhaps suggest using foreach_with_prefix for these two, and then you can simplify the test names below. I like using prefixes, because it standardizes how the test names look when multiple variants are tested or iterations are executed. Simon