From patchwork Thu Jul 25 16:10:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vignesh Balasubramanian X-Patchwork-Id: 13742052 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4219C3DA5D for ; Thu, 25 Jul 2024 16:10:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6AE4F6B0093; Thu, 25 Jul 2024 12:10:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 65ACC6B0095; Thu, 25 Jul 2024 12:10:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4D5336B0096; Thu, 25 Jul 2024 12:10:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 2F4D66B0093 for ; Thu, 25 Jul 2024 12:10:50 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id D512B4121D for ; Thu, 25 Jul 2024 16:10:49 +0000 (UTC) X-FDA: 82378763418.14.82F858E Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2048.outbound.protection.outlook.com [40.107.236.48]) by imf29.hostedemail.com (Postfix) with ESMTP id C5289120028 for ; Thu, 25 Jul 2024 16:10:45 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=gorrHwtE; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf29.hostedemail.com: domain of Vignesh.Balasubrmanian@amd.com designates 40.107.236.48 as permitted sender) smtp.mailfrom=Vignesh.Balasubrmanian@amd.com; dmarc=pass (policy=quarantine) header.from=amd.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1721923797; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=GX2Dm0FZLsDAuFl+oWdmqcNYtZt907eQ00u9m1llZVE=; b=MUhyn7FVJwz/woVACzG5ombm+i1OdQDvKg9AW0fWwXMwToK+IIEV1NbERkAEovwZDcXrQA GXefXfxOa1l5LVIsQDHYsnSqTEJBDA3HHZi9ZIg0V2maMyvFypzSrLJnvDxaUNSmbui/sb bKOvRWv6aXhtQGAvsrwfZ8p361nduWY= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1721923797; a=rsa-sha256; cv=pass; b=NlfRrUw+bsI1C9knKO+mpaXMoA5vxBNr2Sq470KyzgMdneEb86t8sjFHjkUp+piLyb8y+b u1UQpcIfxc2IdjEp0Enc9NXWrhC9Ia1bWZfxRZtIhDw+lJ6sIK/9p9cmVXRZXe5xFpV84c cKRe0j2jA7KA7TlWm1col2s81WKeXFk= ARC-Authentication-Results: i=2; imf29.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=gorrHwtE; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf29.hostedemail.com: domain of Vignesh.Balasubrmanian@amd.com designates 40.107.236.48 as permitted sender) smtp.mailfrom=Vignesh.Balasubrmanian@amd.com; dmarc=pass (policy=quarantine) header.from=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=o6ePeL3WnwEBYj3O6jnn/FS7l0btSVBREFfz1lH3Fn2mu+wWNNQkxISg42eiIkX6wk+pRYwHO0hwlXxkcaQbQ/tqQNFH7Yb4FwGACA6vsl4ddbcob3DtyM5+fYt22qwDiaqXsgRppq5rja4D8IxLnXMC28i0zmFJZ3GjHC4JDyUYJ/KftqKr0++0D8a94KEJd7otGq/WR+bwhynXKqq7h9G7N7WTbAnTKocGObyu5Xauh187IUTkSHUYx2dN8pgCQ5stn2VS5wMpWlb8xqssUYU0aXOMENn0Wvc5u4TFM8YsjivZnT38soNy4hkZKhNpyOK2yaMlj0QzfpmP+N0qhw== 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=GX2Dm0FZLsDAuFl+oWdmqcNYtZt907eQ00u9m1llZVE=; b=VgSddc8GlaE7QyQhtgQB9ycx8NP8GsqYgGLwk7g3InMM3HQBdQHS/e/qH6lq8fulZkt3GXurldZmRK/f60bBwNU9WwJiEFge5KF26mZkAIgY3IlBJDr4u26A88OQu661bDx0smZshy7+e0YLCHGZnUcLDWhhl6j/y/m8WdBTAW9zvCF+6HQBRhAahlImwyvjzLZhUZNkzU4BJa4hWUbKtvsMl6tlhHgDHSVCtx3jYcwtBFk6zLGqVtGVA6QC2WyK2RlJWU3/y/HwWL0yb5MYlPfNQntY9teh01Po12oT3R9ZaOImNIIeKvhDY3KFKNbZmbScPQ/VuGwRUfHII6NHbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.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=GX2Dm0FZLsDAuFl+oWdmqcNYtZt907eQ00u9m1llZVE=; b=gorrHwtE2k+LVNXHVFcBMOjaPeBHKnt4GONk4/SEEZDMKj2Cfx2LE6DZcdfIsYyY/vupDWgaNjB6RlIRnEtRkPIeCWyM7YrHMpuTLW1sz1JzNqCECiFPT5HfAHdaobgb3w3p/g4lwow8MFKoTB+oxc/42TAEt5qDpNkc+YpcauY= Received: from BYAPR05CA0004.namprd05.prod.outlook.com (2603:10b6:a03:c0::17) by MN0PR12MB5859.namprd12.prod.outlook.com (2603:10b6:208:37a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.29; Thu, 25 Jul 2024 16:10:40 +0000 Received: from MWH0EPF000971E8.namprd02.prod.outlook.com (2603:10b6:a03:c0:cafe::c) by BYAPR05CA0004.outlook.office365.com (2603:10b6:a03:c0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.29 via Frontend Transport; Thu, 25 Jul 2024 16:10:39 +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=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by MWH0EPF000971E8.mail.protection.outlook.com (10.167.243.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7784.11 via Frontend Transport; Thu, 25 Jul 2024 16:10:39 +0000 Received: from amd-System-Product-Name.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 25 Jul 2024 11:10:33 -0500 From: Vignesh Balasubramanian To: , CC: , , , , , , , , , , , , , , , , , Vignesh Balasubramanian Subject: [PATCH v5 0/1] Add XSAVE layout description to Core files for debuggers to support varying XSAVE layouts Date: Thu, 25 Jul 2024 21:40:16 +0530 Message-ID: <20240725161017.112111-1-vigbalas@amd.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E8:EE_|MN0PR12MB5859:EE_ X-MS-Office365-Filtering-Correlation-Id: 5aaef931-fd53-4e67-8211-08dcacc45394 X-LD-Processed: 3dd8961f-e488-4e60-8e11-a82d994e183d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700013|1800799024|7416014|376014; X-Microsoft-Antispam-Message-Info: UeJpGMaOIFtx+bUjh+3NnPq339NahtuFvUlfegiQcZL+hwtlK5THQjC7YlyXSQYcmWac5Bmyy9UBFHb3yAm0imbz+dsG0Qh9jeAQOoK5pjleJ4ynDZD8wJHXppBlvzMEZcMfDTsQlNmiLP5ibUe2wQj/zcmyA7WgA9yCOmSgZRZr9kZCiDukem3ZDjlPFMhjhdEUdc8adcK2q9Qs8MIPWxswG58AoXOCqXlHMhQBSCNIiVQcZ6dU5urVXPcSVagsTgGVApBey0rZQCUm51c6d7Wyr+0GiI87ydK/6xrYbOJSqX387JFelXJ23Jf/hlxU3gAB1cxfi0n8OV5Zwo7Bx4qrbM101SgMP4rCAe+hRMOhe0+7twPhkkWP2N6rSeCqPFEEjwkE3pFL8UHA4ubn7haHwpDiqhYkQmeFvsAFWjqp3GBzKNas7xw7vMi00A103/YeLps101DHZ5jEXi/uxFdw2iaaRMmHtHn6wMCW9ibzKJzEmTqCknD6pL0vfrJmTiBUgnmgvHEwUDR1Fb54ccEkPXOnqtMUONV8hx0OK/4Nha3eplwqWQEXmjCo6UXkO1v3VuspRo0JOt+flIi22tAW89MHpqXqmZisCYKe4wGs1VXM1ZBSH6hXzOYv/eWLWItfHp/HFOwzY7J3cZTeFkhZ2wU6neRfWUVStLxvnxyEqO7HdqEKXsqCPtlAU6DY7aZxuQrpj1kK/3SqVY4WeEvEVUVWYvdLHnrY/M+cbcyZaSUDMeKzMjmi9Suk0u+jj+6a62K4q428zeUYKg0WBsKESpBItNf6lZ2Ll04i0isH+ZTKRbIBfqoZOxZeHDmeSX45MYnRGPXyfqlZDe2dkSiLGmfJmmDhXW7VjbRG5bU/TJFHVtmTlSuoX+aUOiHyG4jwrnt+KcmCcEBGRQ33Tlvjt8HQh57X83YKmVZ6q7ut1nkm7SBCioE3Q43W0Ysv10tdIsc8+L7mHX2EbWCjLGrdnmpBCufIPUKUBUla2TYn/udMjO6ox7mEwnCw0cb1DLiLau8493fYQ0bsDW92LLbFUZN+8YMwote9hVHy198nTDqm3R0omsaqw99A0kB480UlywxcGyxxR3aLCFMoZRTAHMTdGxk6CxSK1wMLhUQHBpH+kkZzXQjIebKzhCXW95h8mp9LdklQkP1kAofEkzjHdWpcQ1HSDhKdiRm7b9zxWiKj/0M5YDpUeV4b2L8aVAogGNdiERBQ8MQojvDiuEh6nrq85Tm775qOsC6EcMGzAjn/ziLgkw+Obnw/7XMbvXfURJXyC7YT2xQcnd9hYfX2taIE793WKxGFxTpWR6EQ7pfGE3HqE244/Y//LiF1ULmqPfhHRmlCcjbUiijqs4omVNct9ET432qg+aUEaOsXMLtGZfjkHhbN5B1LTo+rvVd0k/PzC9DXwoSS6h76WGke7Xn+x5106ssfNMyLmGiJEcd6PgiydpEvXW+OjhAi X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(36860700013)(1800799024)(7416014)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2024 16:10:39.4014 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5aaef931-fd53-4e67-8211-08dcacc45394 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=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000971E8.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5859 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: C5289120028 X-Stat-Signature: hkzenszsaaes44a9com41d6dr9s7fojz X-HE-Tag: 1721923845-45788 X-HE-Meta: U2FsdGVkX1+NtNIKQrCQNh7K3g0AMoV6s3MNbcCs1ZLKwe1w7UeWGWA7+3yy3r+4jLtsiVyMyTICGW6HpTY4tGrhwxJzb849QybIhvwjzdJlCYFLYqSvbAiD4970QOsBFR3o3bL71IcVemMovq30ZaLmSfS3bpUTL7r0DwzO7BXq8+82aBsmvVDLfiumsGHb4qZy88M2CDvqCt8szSNFk/uRs1rx7CmVpiNVnhRq8qN/BSVKXfMSyRgSH6M1PnX0yeV/Px+d8BjP8Zck9n00WBzb7b3scfUq3H/JTHMfHv+nGCKuWTMUjaHL8BQvQiooF/EgFYcbYFs2CyIPyvCBZXxjL+eHlYr9UsZ82OGZGSymOp8ZrSO9sBuKx/2tj9ytgHhyl81CLJv37eG5uvmzt10TlsxTIdu6PMMxG7Muhp51IgR3B5cRNRtRWWxA8LBQPwgyw1Uk1rtWBBPdSumB1aO1cSQjFSr3zE/UartM67LSoSU8O+IEKViUfAsmUwunDeyq4n8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 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This patch proposes to add an extra .note section in the corefile to dump the CPUID information of a machine. This is being done to solve the issue of tools like the debuggers having to deal with coredumps from machines with varying XSAVE layouts in spite of having the same XCR0 bits. The new proposed .note section, at this point, consists of an array of records containing the information of each extended feature that is present. This provides details about the offsets and the sizes of the various extended save state components of the machine where the application crash occurred. Requesting a review for this patch. Vignesh Balasubramanian (1): x86/elf: Add a new .note section containing xfeatures buffer layout info to x86 core files arch/x86/Kconfig | 1 + arch/x86/include/uapi/asm/elf.h | 17 +++++++ arch/x86/kernel/fpu/xstate.c | 89 +++++++++++++++++++++++++++++++++ fs/binfmt_elf.c | 4 +- include/uapi/linux/elf.h | 1 + 5 files changed, 110 insertions(+), 2 deletions(-) create mode 100644 arch/x86/include/uapi/asm/elf.h