From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 4RHYA1nVmmn0LwUAWB0awg (envelope-from ) for ; Sun, 22 Feb 2026 05:07:21 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=RNav1K1T; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 0A4EC1E089; Sun, 22 Feb 2026 05:07:21 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 417891E089 for ; Sun, 22 Feb 2026 05:07:20 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 88F804BA2E19 for ; Sun, 22 Feb 2026 10:07:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 88F804BA2E19 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=RNav1K1T Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id 5F72F4BA2E18 for ; Sun, 22 Feb 2026 10:06:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5F72F4BA2E18 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5F72F4BA2E18 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771754813; cv=none; b=Oz3MnvAaEQT04KitCtyA+GkQ2SHC7OIfVJE5pRuE+Ur35MEY4f7/WCgfjzKKKQ0zL6eA1o0dgDG6O5ixRExgDoszJ344kAegbrCE3QUmdUOTHvZYoVNfqHcp5q3VzHMWfpBK+wRovqMXHmBlxanPxJVAzymsj5fGa6EwCB5Ka6E= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771754813; c=relaxed/simple; bh=hBkViS6W6TQ0BUDmFjNPhqlC/N/qP2rAEY0Ki1OasJw=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=vbn6nFlkui4DwTKptzmHBM7pyLyO3dcIISCUTpNdj0OyIVsOht4/c1hwDmgqpXbOeNPznd5SleW/prsHaqLd6HPcHZnBOkr4+hHJEP7Lsi2bKN0vbl4jkJ5rW9+h57UrZ45o88w3BP+drIbayjsv1fByXezCqvWrP7vl6nC2k3Q= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F72F4BA2E18 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4806f3fc50bso38608125e9.0 for ; Sun, 22 Feb 2026 02:06:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771754812; x=1772359612; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Ge+0Is+b28VMpWohoOb4rALKzHcKRadfPyzMSAJPy04=; b=RNav1K1THY9yTKkyXMzkTfpWr2ArQ/IM3rv9wik07h5e0tCKkA+Pjg3G8NKHJFpk/p flD+cy3N8S5mskSGzWwPs1r/+M6hkt5K9pOd2faRfZxJVw7AWSSmjd9B1loZPUSmKre/ opkfhCbF7LZSaZLvvKtVC/txwZAcBOK8IiExzSJKunIKiSUs+JXZ/E/tcF7QOHWgOcU5 pv94+eiceJHIjWyzdMHqGi42HIX2YpL5In65c/pAnnd4c6ztsX4tYb/FQWRcXy9QHSap 4kQoFSpvMz2t/Pbhlx26W2UPVJYQutYLMNGWZMko+Jn4n8AAB7MlJkdsNoM5etbqR76g Rklw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771754812; x=1772359612; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ge+0Is+b28VMpWohoOb4rALKzHcKRadfPyzMSAJPy04=; b=IXYWMTBqGhQP4QWrdfI/2F3/rmNUvg0lzBsVjxICGQVSJ7QBYEHPygE5hEWYeZyzy4 GeuxjTOYLxV/OdSOQDQlhTXhzmjRQAuxWDjhUbLcnySCmUCdfu0OhKMPDB9wguxAhX+6 c1o3dfwL/pT4otF5KWDi0XJdTPYaS2xN6rsATlPVPOasUORARDK5BCoue+rsISQCXnzC V3BbtdoRzFbfKJ/8NOw/h0fOgP/okTtSmCfmmU2J9HVmOgU30zyuPunShPE+j9+ltLRc pwlCRLUzZLTcPBZ5bLrg/8DB6pwJpNNw1RSnjjYHMKv/0AUycVPcnQnutBO+aKqx3/pA j1cg== X-Forwarded-Encrypted: i=1; AJvYcCXd3FUH2PhRAcyv3IKFAoBRwhtE2XsxMM8LJuHh30tkOYsnC7VTuTtvXoJP589ok0g1rLBBov4qgRA+Qw==@sourceware.org X-Gm-Message-State: AOJu0YyPCW0GlD+NCO1Ld9kjnSaQ7TVJEmd7v3hvgle7NVAo03s1fwxO NLQplV6oG7BsmicfKfJE0qNONNpG0/LUOpM2pyxMi8a5tGtiJlAb7LIu X-Gm-Gg: AZuq6aKgofnBhhLIquWZHm3h1Dlyp//l0yzNmq2JyEHLnPRxRTEgrFFchnUl2oaufcE axVLBOnq0bRCzuzXsc2CIiMJHdrQDbiQ8qDcTmyUruC6H/vG0vOiIpEIyzUAshsnr9AdX1cezA4 SvfRtcCeZy0FIjbxUboCMu1Yu61sIO+kzJO/osaSFjljbPYw3wW3HXtyDd5y4DxOskze87HRIYv da8SiYjtWvgJZ+OylRF+2RiwDWKIcPFmf0mngk+qmX3JcLIYrwf08BXUz8qlnFXqPqxpxwStyE6 DANq4ivlTHpbQaxVm/MOp9/YH9+pWDzUQsxYAEYRp+H5K3IOqeNwbl0TzlJwQT2VORBAc1nt2io Lz59xNuLm0Lpyx0kMdyfIcn3cp7GnRVqRwynxw+tcv5iboqC30arTDpwspGSqpB1GkQFjifsfqf 9YfKDFhJna0igKhld5WxGS41q2fZlYG8a13rXG X-Received: by 2002:a05:600c:8b76:b0:47d:3ead:7440 with SMTP id 5b1f17b1804b1-483a963d37fmr73318735e9.32.1771754812019; Sun, 22 Feb 2026 02:06:52 -0800 (PST) Received: from [192.168.0.38] ([86.12.216.189]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-483a3dfd902sm60779465e9.7.2026.02.22.02.06.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 22 Feb 2026 02:06:51 -0800 (PST) Message-ID: <63d2e095-b170-4316-90a8-c62c71c64c40@gmail.com> Date: Sun, 22 Feb 2026 10:06:49 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 1/4] GDB: Add gdb/arch/aarch64-pauth-linux.h Content-Language: en-US To: Simon Marchi , Thiago Jung Bauermann , gdb-patches@sourceware.org Cc: Chris Packham , Tom Tromey References: <20260217060106.1906312-1-thiago.bauermann@linaro.org> <20260217060106.1906312-2-thiago.bauermann@linaro.org> <201211e6-3061-4b7d-8e0c-6a9875922bcd@gmail.com> <8f7b78e6-5f49-4243-8f89-a48ee2884266@simark.ca> From: Luis In-Reply-To: <8f7b78e6-5f49-4243-8f89-a48ee2884266@simark.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 21/02/2026 15:57, Simon Marchi wrote: >>> diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c >>> index b85c25ecae1d..b5af281d8a40 100644 >>> --- a/gdb/aarch64-linux-tdep.c >>> +++ b/gdb/aarch64-linux-tdep.c >>> @@ -54,6 +54,7 @@ >>> #include "arch/aarch64-gcs-linux.h" >>> #include "arch/aarch64-mte.h" >>> #include "arch/aarch64-mte-linux.h" >>> +#include "arch/aarch64-pauth-linux.h" >>> #include "arch/aarch64-scalable-linux.h" >>> #include "arch-utils.h" >>> @@ -1760,7 +1761,7 @@ aarch64_linux_core_read_description (struct gdbarch *gdbarch, >>> have the correct target description with the correct SVE vector >>> length. */ >>> features.vq = aarch64_linux_core_read_vq_from_sections (gdbarch, abfd); >>> - features.pauth = hwcap & AARCH64_HWCAP_PACA; >>> + features.pauth = hwcap & HWCAP_PACA; > > See comment below about HWCAP_PACA. > >>> diff --git a/gdb/arch/aarch64-pauth-linux.h b/gdb/arch/aarch64-pauth-linux.h >>> new file mode 100644 >>> index 000000000000..e973c79c8767 >>> --- /dev/null >>> +++ b/gdb/arch/aarch64-pauth-linux.h >>> @@ -0,0 +1,31 @@ >>> +/* Common Linux target-dependent definitions for AArch64 PAuth. >>> + >>> + Copyright (C) 2019-2026 Free Software Foundation, Inc. >>> + >>> + This file is part of GDB. >>> + >>> + This program is free software; you can redistribute it and/or modify >>> + it under the terms of the GNU General Public License as published by >>> + the Free Software Foundation; either version 3 of the License, or >>> + (at your option) any later version. >>> + >>> + This program is distributed in the hope that it will be useful, >>> + but WITHOUT ANY WARRANTY; without even the implied warranty of >>> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >>> + GNU General Public License for more details. >>> + >>> + You should have received a copy of the GNU General Public License >>> + along with this program. If not, see . */ >>> + >>> +#ifndef GDB_ARCH_AARCH64_PAUTH_LINUX_H >>> +#define GDB_ARCH_AARCH64_PAUTH_LINUX_H >>> + >>> +/* Feature check for Pointer Authentication Code Extension. */ >>> +#ifndef HWCAP_PACA >>> +#define HWCAP_PACA (1 << 30) >>> +#endif > > As per the previous discussions, I'm not sure this definition of > HWCAP_PACA should be here. For instance, what if another architecture > defines a HWCAP_PACA with a different meaning/value? It should only be > seen by native code, so it should be somehwere in nat/. > > For the same reason, I think that aarch64-linux-tdep.c should use a > constant named AARCH64_HWCAP_PACA, not HWCAP_PACA. I thought this was > the conclusion of the previous discussions, there might have been a > misunderstanding. I don´t recall the discussions touching renaming/moving of these constants. But I see your point. I just don´t think we should block this series from going in on that particular snag. We should try a refactoring as a follow on. On the naming, I don´t mind adding an AARCH64 prefix, but I find it unlikely we will run into a naming collision given BSD uses equivalent constants. Again, not disputing the matter of what is technically correct or not. > > The native files aarch64-linux-nat.c and linux-aarch64-low.cc can use > HWCAP_PACA though, because they see the definition from the system > headers (or worst case, a definition from nat/, to support compiling > against older kernels). > > Simon