From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id QfjSEl4osGnzuyEAWB0awg (envelope-from ) for ; Tue, 10 Mar 2026 10:19:10 -0400 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=egRvrcZu; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 45B621E0DD; Tue, 10 Mar 2026 10:19:10 -0400 (EDT) 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,HTML_MESSAGE, 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 6FAFE1E08D for ; Tue, 10 Mar 2026 10:19:09 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id EDCAB4B9DB6F for ; Tue, 10 Mar 2026 14:19:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EDCAB4B9DB6F 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=egRvrcZu Received: from mail-oa1-x36.google.com (mail-oa1-x36.google.com [IPv6:2001:4860:4864:20::36]) by sourceware.org (Postfix) with ESMTPS id 2B8D14BA2E0B for ; Tue, 10 Mar 2026 14:18:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2B8D14BA2E0B 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 2B8D14BA2E0B Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2001:4860:4864:20::36 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1773152322; cv=pass; b=TylUMCRR49hvnKRQZJX84jMWl2M9CXk5ACRMfIAEyXHxtNB1m4lM0XwSkQfceTbntP/8tWsFZMJCi5e7NyG4EhW1H1HtrFx8KGxCImevEfeArvYGFc25XNjNM8ycwQ2jlrL3Ve0PsfSvaOeSZsORZhjLrZdMqPtQQ8k1VYDVNmo= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1773152322; c=relaxed/simple; bh=zxeNNXWpbNxfLFcg7S3BnN9ZGoGbbA6b1dpqilZJ2xI=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=L5Cvd5RQSQUrS/AfSheROT0Eg/PJh4k8APnMgX8j+Hz8TMMUVSheY6Y7hC0Syu8Rj40E+Azxt4lANhpgM6dTPQS7HOksoSm0MPng65+LBejcXzx6h2/S0WRdxgThh9n2FJbCCGtOlY9Dpfbpg1CIQRulIyMQMdIrP8mIv73kaUk= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2B8D14BA2E0B Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-40f0e14b9f9so5163330fac.1 for ; Tue, 10 Mar 2026 07:18:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773152321; cv=none; d=google.com; s=arc-20240605; b=h6qXGHwVAkmuta2HybNtwxPJbRnRZzy88sWxdF+PMbQLDckHF8XyMAt0W8YOgy8d/T nAtutPzcW2zXO3C0Mjdbj5Esk6UAJ9DCaweuoN8w0EcRV5NhHsUjLBNpgwP94S1xLrs7 ylkHrN4EhRVN3lMa64+ESey9wE29kwvRuuQu8wZwEbr16KkWA5Ur86QseJIoioWKlkb2 cs/XHpihSXYSeF6yit7vvlVxEZOjZpOz/wavOykh3H9kgobsjJVocXdV71v6LARwnl0g sD3iwDazGhlcoeAn+c7E3oGwStUa3J3wg5E3zn5GRAKfMB1+5F0R8z5UKB1enFf1eMEr q0wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=SUFRT+kyD2XKO3xOxUULIkZC31GQGSZi6iSALZODQ4c=; fh=ViWkRfOMaNpw82eEjZr3D2tX7N4Bj9WZjbrTO5RZxmE=; b=IxvQ+cap+Loz3M7YQKkV6Z49E9YtBHwG54dC56qrBxdOszo7+Y/B80heAEaPBC+dj3 1AF+3RuPwZWzX2YOO6a+NJLjr7WpCUmzNquKreCWP7w4bTpWFaAT6omPX583/nONcJ/Q WQfCvDr04nMR9vbPfBF6VFNU+G+lpH020Fhusns6YJhZ8fCEheJyhBV9dHnNksYZ7km9 yw3XVQUjdp5Xd6EYYPHIR6hMK/eeE1FMgBp3qQL8bUB61I0TJ6oHwvxu2MBlSjiTvHfN PXSqOWtcTvB7vpZ2MiNGSUuBMDyQAib6RUguYyTSNPYoBl1FnYjNgeabvS1V0fd4dN3z 43Yw==; darn=sourceware.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773152321; x=1773757121; darn=sourceware.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=SUFRT+kyD2XKO3xOxUULIkZC31GQGSZi6iSALZODQ4c=; b=egRvrcZuk7wNpEEw1BPRzLvCMe1t/gPQHfR7cM0X6nZPA8GtMXl7TB6rCbL7MNSCBk L20SEvBNBLSyal/eIDpJeJkBpAvvQIBrqSRPVB1xyaq/+i4yX3/N8ecJreHWWGvcv8kz r+96kGNP+W/U4D7XuXiLvYT6Kt+l7a3B67Tx6N8qCuGs0N1nBQunigAyk9z6OIZ30QJN lYup09rrDRpdXjjAonyJZ6wRN3M/Vz0iST9JhBy3zTtF1zPjfPWVOAmCsfgV1hd72hRl txh6ICJoRFcsKoY+BblKGB3g4LSlyPgEQOk4bNTTy/6T0jtkjdcMwVeI+wLsM/OKO+Eg KfsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773152321; x=1773757121; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=SUFRT+kyD2XKO3xOxUULIkZC31GQGSZi6iSALZODQ4c=; b=vliy9q+5A1F1GutYXiqLHjEt+9W2SxYfy2cPq4iG3F5fc3llYxAaU2TZ0ygX0s56FU iuOiww3qsxmWrwMcjQAjA84TLEcyo+6C3a8qi3yXUZdkqmkfT4CX1iyU9BS7jY2eHA67 Kta+6rpnd0nDROw68Faxj6Iqg8ZFimomLsIVX+DAac4FlLc8eBUV5iohXR2IUlWu9Yuz jlgaaiEDGHUd7I+pPgktUB9Dfuixc2pfU0XtKiNhAIDoQeDDNAUIK5zsR4t5E0QLmSOK kz70uQBCrEiVjEgN7AxEKgaNqpRsanZBf62t1nvjaKh3fiYGAp8wqlCHK8Jti4FthQjl C44g== X-Forwarded-Encrypted: i=1; AJvYcCVr1vkGxxI6aT+Ub2DuOxn+9tkWknqMNVrPZ8EzUwxEGdlwBP3vFTelsb/O8pBBspjjkwIXACFkhBH5XQ==@sourceware.org X-Gm-Message-State: AOJu0YwrZhNUX1SUw3zvh90vuvdjFaSTP1TmKYG5quGjuRpe9+FgABkh 99/8wPwsPk/MZvPdvzWAdFB+AUQV6DkM0FO/jNCtoXLL2uLDcfhNccrdfRT/G1uPUqRRmXJLoQ6 06mv77oXJ5cxJiNta61NA/AYE9J1xUts= X-Gm-Gg: ATEYQzyoSTCw+VS4keIYc+4QMUSlw9Zmt+d37c8LqE/EjUsCwLlxdf8nbRfRkzIUg2n F/ejSyF+WCLWVKmf0yRpPwolxbW7XJg41cjAuWbP57hmlYXM/n6n/aAFScqd5Gh25hrRieHVNpl MgJ7Z+7SnijRYW0NWRZpSX6mNA2DDizrMA1UEegedgdv1EFwRXplHyZek/Wg73ksHlto9yCwGNq 8FMua25UFmZQ9TaiZa1fTk/T31UuJlc8WDjiaSKC/GjMm1fbveur73zz8rGVhbv5x0QRhgRZg5p Lz5oFzn/3vCXPVsL94Kle+BnbdKpvzvA1VG+9nE= X-Received: by 2002:a05:6871:ca51:b0:417:4bd3:f5f5 with SMTP id 586e51a60fabf-4174bd46217mr2659631fac.37.1773152321265; Tue, 10 Mar 2026 07:18:41 -0700 (PDT) MIME-Version: 1.0 References: <20260303050641.198127-1-thiago.bauermann@linaro.org> <20260303050641.198127-2-thiago.bauermann@linaro.org> <8e20892a-b4ed-47c1-90bc-69d8d948aafa@simark.ca> <87ldg8ck9q.fsf@linaro.org> In-Reply-To: <87ldg8ck9q.fsf@linaro.org> From: Luis Date: Tue, 10 Mar 2026 11:18:30 -0300 X-Gm-Features: AaiRm51AfZd8hgbUT65c4lp-J54NGwZdU2n0rVeaUG3y7RTVvkJcRawKB9QOpuA Message-ID: Subject: Re: [PATCH v4 1/6] GDB: Add aarch64-pauth-linux.h to gdb/arch/ and gdb/nat/ To: Thiago Jung Bauermann Cc: Simon Marchi , gdb-patches@sourceware.org, Chris Packham , Tom Tromey , sunilkumar.dora@windriver.com Content-Type: multipart/alternative; boundary="0000000000003de602064cac32f1" 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 --0000000000003de602064cac32f1 Content-Type: text/plain; charset="UTF-8" Thanks. Unless Simon wants the points he made fixed... Approved-By: Luis Machado On Wed, Mar 4, 2026, 01:04 Thiago Jung Bauermann < thiago.bauermann@linaro.org> wrote: > Simon Marchi writes: > > >> diff --git a/gdbserver/linux-aarch64-low.cc > b/gdbserver/linux-aarch64-low.cc > >> index b19e605f55d6..07ddfb324466 100644 > >> --- a/gdbserver/linux-aarch64-low.cc > >> +++ b/gdbserver/linux-aarch64-low.cc > >> @@ -22,6 +22,7 @@ > >> #include "linux-low.h" > >> #include "nat/aarch64-linux.h" > >> #include "nat/aarch64-linux-hw-point.h" > >> +#include "nat/aarch64-pauth-linux.h" > >> #include "arch/aarch64-insn.h" > >> #include "linux-aarch32-low.h" > >> #include "elf/common.h" > >> @@ -41,6 +42,7 @@ > >> #include "arch/aarch64.h" > >> #include "arch/aarch64-gcs-linux.h" > >> #include "arch/aarch64-mte-linux.h" > >> +#include "arch/aarch64-pauth-linux.h" > >> #include "arch/aarch64-scalable-linux.h" > >> #include "linux-aarch32-tdesc.h" > >> #include "linux-aarch64-tdesc.h" > >> @@ -952,7 +954,7 @@ aarch64_adjust_register_sets (const struct > aarch64_features &features) > >> break; > >> case NT_ARM_PAC_MASK: > >> if (features.pauth) > >> - regset->size = AARCH64_PAUTH_REGS_SIZE; > >> + regset->size = AARCH64_LINUX_SIZEOF_PAUTH; > > > > It's not a deal-breaker for this patch series, but I'm just wondering: > > is there some "native" thing, provided by Linux, that could give us the > > size here, like sizeof(some_type)? If we're trying to use the native > > stuff in the native files, then for consistency it would be nice to > > avoid relying on our own definition of the sizeof pauth. > > There's struct user_pac_mask in so we could do > sizeof (user_pac_mask), but to allow using older system headers that would > require a configure test as done in patch 6 of this series, and add our > own definition of the struct in case the system headers don't have it. > > I can do that as a separate patch if you think it's better. > > -- > Thiago > --0000000000003de602064cac32f1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks.

Unle= ss Simon wants the points he made fixed...

Approved-By: Luis Machado <luis.machado.foss@gmail.com>

On Wed, Mar 4, 2026, 01:04 Thiago Jung Bauermann <thiago.bauermann@linaro.org> wrote= :
Simon Marchi <simark@simark.ca> writes:

>> diff --git a/gdbserver/linux-aarch64-low.cc b/gdbserver/linux-aarc= h64-low.cc
>> index b19e605f55d6..07ddfb324466 100644
>> --- a/gdbserver/linux-aarch64-low.cc
>> +++ b/gdbserver/linux-aarch64-low.cc
>> @@ -22,6 +22,7 @@
>>=C2=A0 #include "linux-low.h"
>>=C2=A0 #include "nat/aarch64-linux.h"
>>=C2=A0 #include "nat/aarch64-linux-hw-point.h"
>> +#include "nat/aarch64-pauth-linux.h"
>>=C2=A0 #include "arch/aarch64-insn.h"
>>=C2=A0 #include "linux-aarch32-low.h"
>>=C2=A0 #include "elf/common.h"
>> @@ -41,6 +42,7 @@
>>=C2=A0 #include "arch/aarch64.h"
>>=C2=A0 #include "arch/aarch64-gcs-linux.h"
>>=C2=A0 #include "arch/aarch64-mte-linux.h"
>> +#include "arch/aarch64-pauth-linux.h"
>>=C2=A0 #include "arch/aarch64-scalable-linux.h"
>>=C2=A0 #include "linux-aarch32-tdesc.h"
>>=C2=A0 #include "linux-aarch64-tdesc.h"
>> @@ -952,7 +954,7 @@ aarch64_adjust_register_sets (const struct aar= ch64_features &features)
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 break;
>>=C2=A0 =C2=A0 =C2=A0 case NT_ARM_PAC_MASK:
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (features.pauth)
>> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 regset->size =3D AARCH64_PAUTH_REG= S_SIZE;
>> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 regset->size =3D AARCH64_LINUX_SIZ= EOF_PAUTH;
>
> It's not a deal-breaker for this patch series, but I'm just wo= ndering:
> is there some "native" thing, provided by Linux, that could = give us the
> size here, like sizeof(some_type)?=C2=A0 If we're trying to use th= e native
> stuff in the native files, then for consistency it would be nice to > avoid relying on our own definition of the sizeof pauth.

There's struct user_pac_mask in <asm/ptrace.h> so we could do
sizeof (user_pac_mask), but to allow using older system headers that would<= br> require a configure test as done in patch 6 of this series, and add our
own definition of the struct in case the system headers don't have it.<= br>
I can do that as a separate patch if you think it's better.

--
Thiago
--0000000000003de602064cac32f1--