From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 9n/BIf/rfGqyXCEAWB0awg (envelope-from ) for ; Wed, 12 Aug 2026 17:56:15 -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=20251104 header.b=YQq4KQTv; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 6DB141E166; Wed, 12 Aug 2026 17:56:15 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.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 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 D84FB1E09B for ; Wed, 12 Aug 2026 17:56:13 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 721814BB3BA2 for ; Wed, 12 Aug 2026 21:56:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 721814BB3BA2 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=YQq4KQTv Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by sourceware.org (Postfix) with ESMTPS id E30964BB24DE for ; Wed, 12 Aug 2026 21:55:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E30964BB24DE 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 E30964BB24DE Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::331 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786571747; cv=none; b=L4LSuA9r/zBeELOGAUU/v8+k8DXsqhO/uodE0Y+JPSA54La1w7wpnrlhAVrhaUVVj8FV/qzmGapJRHz8/baK0WM/OjnzVcvVqWDjXgEqOYdFj8oWt0tqcLnAagixXZNzm0ZdbuwfsRJ8YZUjR+RUz7PZUJraEXfc8RpaBkNdlZ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786571747; c=relaxed/simple; bh=1kq7Li2acg+SIRyzvdhCeWtTjUckEwzw/juiFDkqnF8=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=jygp47KK/xY42+v/gELY14rTLCzUVKMIh7HcOJv8Tysweotupai4Ykw6XfWJe1d/1Uh3VSwFrXvtUsEHcWJc8lCsWkMQLPVRW12IXmit4R94V/rr52TZJTqon7aZu49byW1TLGJgljm9Bf+E8VdoAkIu/i6mpLqtpSRicEVURf8= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=YQq4KQTv DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E30964BB24DE Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-495635a85d2so11690755e9.0 for ; Wed, 12 Aug 2026 14:55:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786571746; x=1787176546; darn=sourceware.org; h=content-transfer-encoding:content-type: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:content-type; bh=GfxLH8iNmxIaVvOZThXDtSNFDzy+7YzvAFe2kKMkxt8=; b=YQq4KQTvLKofFo9Sv9VyluF3zEjjk7R0/UrzcW9Lb8B4Z4vFHTmcXsbMxJYTNQ9XfT 75sFmJ3pztLz5kIIEHTKgTMiTYm47LAYuLOkRhsVXqfVg8NUoOvSqhd8wTN0/n7r3bXE VIS/DKkhHpezwZOI+Q7rnr9NwSj5h4Kw+cIavECMpVhKNzA4oBnF5/l+0n5Xr/0aRxdu 3TDZZzkvAO2h97tpyGsNTnc6oPpQvtX/lAasgGXLoCCPOAS1aAWu35BD7k1uTbflwDWo hRhA4fUofDb5uhNp+braTyuuyVEM4d2fLyInjMBU/WxUtKncEY2+G2RIO42O4GSc79W1 woLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786571746; x=1787176546; h=content-transfer-encoding:content-type: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:content-type; bh=GfxLH8iNmxIaVvOZThXDtSNFDzy+7YzvAFe2kKMkxt8=; b=MzUZUMIy//OWiZeHorz2xRadGxyyqtguTwLr1orVmHXBM1LCw1w70OZC1/piyQLFoa StfX//cQDZWsI3+c4CForMyQv+EWzq9EjmiAwdTz7CliFeKCsEps9ygMSprqFQSgHeca nOYWAsQbY4lCT1qU+rAVlBLMDbunTdoXQhv67ZlxD6KM0L9R1SOD9q8h8AYMvIXemPpn nMrX1yL40RX4jj49qe0Vb/XGO5zFxlilcz5klXsO6uqnIkpvk0+0CKmAh1cQ4q1U8R// APN5bn8NpGNLkUKNBvaXjGyncWEcyDHqh+uzYVWpLqjmNr4lWqho+9p1rZSwVhKDPr9t rXdQ== X-Forwarded-Encrypted: i=1; AHgh+RqR9YF05ovpDaKFwzMKoKEUmVDTQNVVd7QVPGZACoqRnLuEBn29kIWTQRmS7tuYkBPjyh3vKZwTFWDz/A==@sourceware.org X-Gm-Message-State: AOJu0YxBiZf8bpHKk4sfPUe2pANrpNma4FLK+fR6wuj4iFraidtIHGuT BLpKD6ujIkcMhTSE6yPaNsQYpcdq5XRzMhrDuymtoT0cdF/3vKyD5cSv X-Gm-Gg: AR+sD10wxuTNUWPrKyF2cgATQbZtrv0cxOcENuUKyL+kfDc0hv00eh89DVjNbY1ZjRO DnGUlnd9IxchSCUVzFgjnJTFUobsQ6+iSBPQgS5tJFQVNIZVu+zTnaWLnPLQcSIAakrisyCK9tR cM2WuabIVXP41wi+jEkfQEPcUizvnvENbDWHS36ndVby6RG44cUNFfaKQZOHHOn8P2L8+zLx9OS fVAku9bY9tg9Yj49hECmzIlvg5J1/G7UtcrQgXgo1eZ2CY7hssCLu86oWET4ARx7R9gBZQpj9Az 33FskXkW8DJn8z0BrbP6UDRCHF9Lx8Rif2/9kDw48Y1yT1TtaadCELSjusxgT4FJ78EZi3KQ/Br uJU5QwOJRsWK4aiA1XCvVVTpyWwL4s8ZrZiaUfW4yk5VCtnrIsX61bbY2mF0h5QQIZ7maB+WKz6 CRo8gRyAD8Dcgj38hq2zv/AKM5lAHWde+c2662POiQzIi1ds5h5EpneR7zF8OthiyUFuuE/DUG2 g== X-Received: by 2002:a05:600c:1c21:b0:495:6396:8b67 with SMTP id 5b1f17b1804b1-499821c335amr7491745e9.4.1786571745803; Wed, 12 Aug 2026 14:55:45 -0700 (PDT) Received: from [192.168.0.38] ([86.12.216.189]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49981ded713sm9875455e9.1.2026.08.12.14.55.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Aug 2026 14:55:45 -0700 (PDT) Message-ID: Date: Wed, 12 Aug 2026 22:55:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5] gdb: align siginfo_t with the Linux kernel definition Content-Language: en-US To: Matthieu Longo , gdb-patches@sourceware.org Cc: Luis Machado , Thiago Jung Bauermann , Srinath Parvathaneni , "Maciej W . Rozycki" , Andreas Schwab References: <20260728123239.211813-1-matthieu.longo@arm.com> From: Luis In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 03/08/2026 09:23, Matthieu Longo wrote: > On 28/07/2026 13:32, Matthieu Longo wrote: >> GDB's current definition of siginfo_t is missing many fields present in >> the Linux kernel definition [1]. >> >> These fields are useful for providing detailed, user-friendly diagnostics >> when a fault occurs. Some new AArch64 extensions, such as Permission >> Overlay Enhancement used to implement Protection Keys [2], require the >> debugger to inspect 'si_pkey' alongside 'si_addr' to help the user identify >> the problematic key. >> >> This patch aligns GDB's definition of the __sifields._sigfault member of >> siginfo_t with the definition from the Linux kernel master branch. >> >> To avoid hardcoding the field access paths throughout the codebase, this >> patch also introduces compile-time accessors for the siginfo_t attributes, >> centralizing their definitions in a single location and making future >> updates easier. >> >> Finally, extend the testsuite to verify access to the new si_pkey field >> and its preservation when modifying $_siginfo and when reading core files. >> The tests in siginfo-obj.exp rely on the siginfo_t definition provided by >> glibc's , which does not yet expose all of the fields present in >> the kernel definition. As a result, the tests cannot exercise every newly >> added field and therefore focus on si_pkey, the field motivating this change. >> The test validates that GDB can read and modify the field correctly; it does >> not attempt to generate a real protection-key fault. >> >> [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ >> tree/include/uapi/asm-generic/siginfo.h#n69 >> [2]: https://lore.kernel.org/all/20160212210213.ABC488FA@viggo.jf.intel.com/ >> >> Reviewed-by: Thiago Jung Bauermann > Ping. > > @Luis: I addressed your suggestion for compile time accessors. I think that it is cleaner than a > hard-coded string anyway. Please let me know what you if you are happy with the current state. Thanks. It looks cleaner indeed. The aarch64 parts look OK to me, as does the test. I see Simon has made comments on the anonymous struct access. > > Regarding the GDB users' accessors, I haven't implemented them because the scope of this patch would > increase too much. Please see my response in v3 [1]. That's fine by me. > > [1]: https://inbox.sourceware.org/gdb-patches/5c623005-2b19-48a6-9bd5-bb3dfb3166b0@arm.com/ > > Matthieu