From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id sdyPKa+ONmmBBiMAWB0awg (envelope-from ) for ; Mon, 08 Dec 2025 03:39:11 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=gJIlX7s6; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id A44731E0B3; Mon, 08 Dec 2025 03:39:11 -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.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, URIBL_CSS_A autolearn=no 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 DF6661E048 for ; Mon, 08 Dec 2025 03:39:10 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6C3EB4CF3193 for ; Mon, 8 Dec 2025 08:39:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C3EB4CF3193 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=gJIlX7s6 Received: from CY7PR03CU001.outbound.protection.outlook.com (mail-westcentralusazon11010067.outbound.protection.outlook.com [40.93.198.67]) by sourceware.org (Postfix) with ESMTPS id EFA7B4CF3191 for ; Mon, 8 Dec 2025 08:38:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EFA7B4CF3191 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=amd.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EFA7B4CF3191 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.93.198.67 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1765183124; cv=pass; b=yCYa2YJi7EPfqyZz8I6tuKWadCvC75ZoeWyh2YgeUGYdD5lbRvY9oQKZDO48Oycl8qgmYWYEEWQQy85t5oJQwl3kdJPLe980FVhpnzIXii1mjpOKUrhTcBjuj1ONmtkk8G6bjrLqhpVExLnBcp4F8EY3Z7alUT3Km+N1fYyC9X4= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1765183124; c=relaxed/simple; bh=Da3BQWfot2qLF47c7pu99PSgyFdqaYTPOu3koj+LS40=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=mkNU7FaDPUTANcEumr0euYoXmlW2tApl0K+N0l1RwCJwVH/hVLE+ojgSYKlp9Oe8rNjv8/OELVA8JEVh6uvIvGUNOA0Lzh3N5WtgXNerG5mezFH/IqBPan/QvhZ/ftak5eoGbHVTjJ46VEldP5RHcJArAuDFmaWj3Ygp9LyAgt8= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EFA7B4CF3191 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MyfR/JEooULXvYyyp1XHwog8gQfqWv/sjn8i262juOL+aB1wHwgm63MCXC47TqmiKxDSDOYkZ1IU+qi4EJoE+/6/pZRAIogUOBgn60T4BTM6hfSPFBO8yWtuistsJHqX9cqhraZeI45YwmgzsZ5IC5sCh5dlOu6PpaF8lzIcSofwUx1Un7oZ93Jr5Bq2TFLNplPEKrAdY+cI9Uh7eszqvu9jXudU+8OcF74Wb9/9WcqrHwGads2e0E5fRaXyQ+IbeBTYUsoBHwRAOQ6hVR3VEe/ZCrjYVKth1L9VTaYFUoPqkQnyljNrd8AGmL7TIa/ngcN+Bvx3KlHQ/1h+4Q0tkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MKhHvWL3GwNgrDyxJR3sFCzRrHdZAcAtD3a2aKTyCfM=; b=tymTA1b7QCCWSdVNy+RNppGXtHL9AG/YA2pYZBQT81KzGhKgyEy1uI9b9MSPySP99umE2BLXCnJ3+z03UGNmLE85T6/mqbQZxuZHNpvHQBxgPSPYWofjwLFlajvUWOjAOPMO4fRFH+1KgHOxabEwCuhMeP9s4lv4kafvwyQGIsXXtLoJmDXJjsYq9OHXjWGVs7Vzq1V9gEko1VooSNJzy7bM2/5rCaVHtrlv5GezMAmZtC8Be4EPSng/HxjKNzexfxnqAy9q10VzVrn/Zp54dL3sAPTsAZBjKJpjyo65M6FZ6J6dpkKgiyPo6VTATibQwGCGahPgyDbbc3wJzL9Vqw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=sourceware.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MKhHvWL3GwNgrDyxJR3sFCzRrHdZAcAtD3a2aKTyCfM=; b=gJIlX7s6PINJSUc/bvXQnSNGnAkEx9Lljwg2LC1x8d2FMSwzu966cTRcKVYE8/8E4z10uh+3xbbB9M3Ujad1c7iJomCzvjIg6BLrGa25RYpkLA3JU3pHeed9MfonkwjrbZrh7lTR//SOpXY/crAAjdImFvs0rcFtkB0ePElIVGE= Received: from BL1PR13CA0131.namprd13.prod.outlook.com (2603:10b6:208:2bb::16) by SA1PR12MB8724.namprd12.prod.outlook.com (2603:10b6:806:38b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9388.14; Mon, 8 Dec 2025 08:38:39 +0000 Received: from BN3PEPF0000B06A.namprd21.prod.outlook.com (2603:10b6:208:2bb:cafe::ad) by BL1PR13CA0131.outlook.office365.com (2603:10b6:208:2bb::16) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9412.5 via Frontend Transport; Mon, 8 Dec 2025 08:38:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb07.amd.com; pr=C Received: from satlexmb07.amd.com (165.204.84.17) by BN3PEPF0000B06A.mail.protection.outlook.com (10.167.243.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9434.0 via Frontend Transport; Mon, 8 Dec 2025 08:38:38 +0000 Received: from amd-System-Product-Name.amd.com (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.17; Mon, 8 Dec 2025 02:38:36 -0600 From: Vignesh Balasubramanian To: , , , , , CC: Vignesh Balasubramanian Subject: [PATCH 32 0/2] Handle the new .note section introduced in Linux Date: Mon, 8 Dec 2025 14:08:17 +0530 Message-ID: <20251208083819.2560894-1-vigbalas@amd.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: satlexmb07.amd.com (10.181.42.216) To satlexmb07.amd.com (10.181.42.216) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN3PEPF0000B06A:EE_|SA1PR12MB8724:EE_ X-MS-Office365-Filtering-Correlation-Id: 61ab5ed3-4a71-4434-3f4d-08de36352f2e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|1800799024|376014|82310400026|13003099007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?S2FKZHB4VUlsa1JITk8zRGdpRFZ2cVZheEM0dC9LY0UzcEF6TVZZMW9jM1Ft?= =?utf-8?B?WlJYU0hGRjJIZm5vSThaRFhZSFdENzBncDJVMmgwZ3RCUldBQTFlU2FZWFRV?= =?utf-8?B?WDNIRFpRaWhYSkI1ODExOG5YWFV0SXRFVS9uLzluUGxaNytHUmpzSnJGNTdJ?= =?utf-8?B?WEplc3lJTGp0MnZlV2xLbVhCZUFaZ1FrRXpOREpMcTNGaVBHVXFCdzFYZjVz?= =?utf-8?B?Z2ZuMW1YZ1Z4b0dqRW1xd2ZseHk4YWhGSXVIMjc5SmNCLzdzZ3duNHFLZCtP?= =?utf-8?B?UGNBZURPdTZHRzZFeFJ2VW5ZeFFvK3pVSXMrYXhxSFp1M0JTTEJDQTJKQUNp?= =?utf-8?B?Vk4xSXhhQzZ4RDVqZzN4K3JJRlJ4bG4xRnpXRCtBNGJTcGNmV0dCOWdpNFJh?= =?utf-8?B?SUVwY0FtV1RNR05JYWRtemhvQjRQL3l0ZndBb1NqeHh4Y0Nn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yWlNNU214ek1wenNSRksxeFZGa21lU0dm?= =?utf-8?B?SEZTaG4xek9LSmxkZ1VLWnp3UStjRlBuMHllR3B0VjNhLzMyaTNuUkdERkZh?= =?utf-8?B?YWhnemlQVFkwdE4rT2R0VWpvb3JyTklxR1ZVSEJQUWpaMXZtamZvUEpsMjJu?= =?utf-8?B?aHE0dDNkZmxVSHlET0h2QTFUOTJOVHp6WUg4a2NQZUEvejh0SVhleU1NMGJ4?= =?utf-8?B?b1hSR1paVzZPV0hzR0NjRVN5UklaYWFFMmN2VkRSNWVkbS9UWlNTdUhhSFBT?= =?utf-8?B?STd5Wk5tZExtd1NRUmR1dzdnWjJMd2NIQTJPd2NsRU9ORlZxVlA1WWF6V1ZZ?= =?utf-8?B?KzFqSy9yZzRMSkw3K3VpeWZYZDBhenpTd3NoUktmckZLWnpFRVlWdDkyNlhD?= =?utf-8?B?cVIvdVBCWGVBSElUUXd3VWlZWGtiRDh3dFp6dnFCd1dWUkExeWVFdkE1eGJa?= =?utf-8?B?TjM2WG56aDhBM3FoVEhIcHNISXgvdmhSTzlZdmFsYzVDczJab0cvZTVJNW03?= =?utf-8?B?NHZrZ3g4T0EyN2drSlRMZjZRaDFmeWF1cXNoNFhiOHBKamhBSTV3cXAybEhm?= =?utf-8?B?MllQRmNIMXUvQUd0emRPUzRmelZnRWtQREFhdVN2WTB1S0xYcmNOemZ3Qnpo?= =?utf-8?B?MVdORFdnYUsvaHFSd3M1TEUvL1l1U05RUVRIemo1YmVmNXgxSW5TTFZTZjBW?= =?utf-8?Q?wZM/mW?= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:satlexmb07.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(36860700013)(1800799024)(376014)(82310400026)(13003099007); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2025 08:38:38.5490 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 61ab5ed3-4a71-4434-3f4d-08de36352f2e X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN3PEPF0000B06A.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB8724 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 The XSAVE layout of the machine where the core file is dumped is not visible to GDB. It is assumed currently using some heuristics. It has been addressed to some extent recently but still uses heuristics. https://inbox.sourceware.org/gdb-patches/2628f45a-77f7-8b2c-20aa-da65d1d82a37@simark.ca/T/#m4c67d59c18a5962f771ba8ca1e2bee9365ad1ab2 New patches have been committed to the linux kernel (version 6.12) to resolve this issue by adding a new .note section which contains descriptions of the xsave layout to the core file. The first of this patch set consumes this new .note section and uses that to identify the xsave layout. The second one enables gdb to generate a similar .note section if the corefile is dumped through the 'gcore' command. Working on test case patch, will share it in a few days. This patch shoud be applied on top of binutils patch: https://sourceware.org/pipermail/binutils/2025-September/144207.html Co-Authored-By: Jini Susan George Vignesh Balasubramanian (2): core: Consume the new .note section that contains descriptions of xsave layout gcore: Create a new .note section for x86 gdb/amd64-linux-tdep.c | 2 +- gdb/gcore-elf.c | 18 ++++++++ gdb/gcore-elf.h | 8 ++++ gdb/i386-linux-tdep.c | 25 ++++++++--- gdb/i386-linux-tdep.h | 3 +- gdb/i387-tdep.c | 86 ++++++++++++++++++++++++++++++++++++++ gdb/i387-tdep.h | 12 ++++++ gdb/linux-tdep.c | 1 + gdb/nat/x86-xstate.c | 31 ++++++++++++++ gdb/nat/x86-xstate.h | 6 +++ gdb/target-debug.h | 6 +++ gdb/target-delegates-gen.c | 26 ++++++++++++ gdb/target.c | 5 +++ gdb/target.h | 10 +++++ gdb/x86-linux-nat.c | 6 +++ gdb/x86-linux-nat.h | 1 + gdbsupport/x86-xstate.h | 6 +++ 17 files changed, 244 insertions(+), 8 deletions(-) -- 2.34.1