From patchwork Tue Jul 23 09:04:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vignesh Balasubramanian X-Patchwork-Id: 13739727 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 6969DC3DA63 for ; Tue, 23 Jul 2024 09:05:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id ED83F6B0088; Tue, 23 Jul 2024 05:05:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E889E6B0089; Tue, 23 Jul 2024 05:05:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D032C6B008C; Tue, 23 Jul 2024 05:05:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id B0BB86B0088 for ; Tue, 23 Jul 2024 05:05:26 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 27C3FA1D2A for ; Tue, 23 Jul 2024 09:05:26 +0000 (UTC) X-FDA: 82370433852.05.2EE3108 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2058.outbound.protection.outlook.com [40.107.236.58]) by imf13.hostedemail.com (Postfix) with ESMTP id 2AB502002B for ; Tue, 23 Jul 2024 09:05:22 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=boVNr7YL; spf=pass (imf13.hostedemail.com: domain of Vignesh.Balasubrmanian@amd.com designates 40.107.236.58 as permitted sender) smtp.mailfrom=Vignesh.Balasubrmanian@amd.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); 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=1721725500; 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=mtMSQ2UWgJ3UdAMy9RzIntBd3GmM49CTeq9ZcqRfx78=; b=qg+2UvjCFmEROBxTfbf8ShD9+riwPBzOmTlE6o8S++2YDHhT4mn23nK5Zi7LEJbk7kBmO7 qRxT7oSQ/7Bh2j/tUmp/tJ0uLMhe8U/Uf3PrJfE1vC6p0YKhMXT2Bupzs5XgYV4lBb27dO aqKd8rg/javOMNctUnpjHT7ixdqDIi4= ARC-Authentication-Results: i=2; imf13.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=boVNr7YL; spf=pass (imf13.hostedemail.com: domain of Vignesh.Balasubrmanian@amd.com designates 40.107.236.58 as permitted sender) smtp.mailfrom=Vignesh.Balasubrmanian@amd.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); dmarc=pass (policy=quarantine) header.from=amd.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1721725500; a=rsa-sha256; cv=pass; b=hGHtmV4rBRsXb5ZIbUejyel0ZaskCCjDn5Wgxzfilm4MIBD3TmyKdYzSIkHKKoIKO5NY81 qaRNX3Z5PLEnVfA0n37fUvG7FIeCrbV+MZbOHztPBAhM8scShXkDcfYRc8F9UamuB1m/4S 0Wta7IKgB2PDl+2bXzMLIF3ra3+/yx4= ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=b4laMHJwiGM0eeqmCt+HNC0B/cLq/Ze9vZ9XOzRzmobJxDZufrdOjvIAQJT6qByTYv5epo07l2idf283mLkTKjAApeqPzmSZYvDpw3ntXNZQAB3UKEbd2+YqpU09UOo/qOhLGdkrJTqrnIvasC2Q3yHmu5OJZilOFQkdYkiMWp+D4rG4R5Rq/8OHuETgw1Z2dssQBeJ1swDlIKOT99NHqSjqlniD6qlQPtlzAvhmRQWcds0cdmuzmyuPWFUQbArmFv2MREEUvTEcr/gQUBGqICg4tmdQKLEVrz/WEpbvV5BoWhdwjLNi0Ul2hrIckltsvzAlyo+fyul+XNnc2rcSFQ== 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=mtMSQ2UWgJ3UdAMy9RzIntBd3GmM49CTeq9ZcqRfx78=; b=hwBoVFb8tv/zt4ih1MdUV20g7PM8jZqhUtBcBnad1CNAOipHkBkIBBpa6uLCIzmTp/k+0iT/kD3kCLmzvoIt5z5sB/w4hlgJE6xjA8uAllk3zMkndTXbYIfh4moqEoDaVEB8HzUtpf2ExWFLCH76AQFx5cfhvJGq/atXQoU4llorzogIzSW3KnOxaeO/ZaFWEJ1OTcuXkmIdZ2HMJVEqrI7Gad7pA+rtXdla5TpHipDSsMfEtoVdDJlzX+mTWDi0NfWg3DAJnQU71JYbN0eFkIXmS5Bf85rxls2WKCysA8oYPj2+Gg/r5fsdyaMM81C3mI3W+noTq+3wbzEpUIsKYQ== 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=mtMSQ2UWgJ3UdAMy9RzIntBd3GmM49CTeq9ZcqRfx78=; b=boVNr7YLCnVfkcRIfp9THW/SkV74OFR1hIpbVSuZUMJQmvwN07zXQ1EYbUynM5qL/FGiz9WE4JJi8FKyUGnbgsH4HJLTB5RbJ5uCTOFeJY+XFce3SWauFsbt7KLsHSsCvlmvl+KmguCFXAKym8o2AFqT1jNJdeP+DIpR1iy/ITg= Received: from DM5PR07CA0092.namprd07.prod.outlook.com (2603:10b6:4:ae::21) by CY5PR12MB6250.namprd12.prod.outlook.com (2603:10b6:930:22::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.17; Tue, 23 Jul 2024 09:05:17 +0000 Received: from CH1PEPF0000A34C.namprd04.prod.outlook.com (2603:10b6:4:ae:cafe::1d) by DM5PR07CA0092.outlook.office365.com (2603:10b6:4:ae::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.18 via Frontend Transport; Tue, 23 Jul 2024 09:05:17 +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 CH1PEPF0000A34C.mail.protection.outlook.com (10.167.244.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7784.11 via Frontend Transport; Tue, 23 Jul 2024 09:05:17 +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; Tue, 23 Jul 2024 04:05:10 -0500 From: Vignesh Balasubramanian To: , CC: , , , , , , , , , , , , , , , , , Vignesh Balasubramanian Subject: [PATCH v4 0/1] Add XSAVE layout description to Core files for debuggers to support varying XSAVE layouts Date: Tue, 23 Jul 2024 14:34:53 +0530 Message-ID: <20240723090454.8241-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: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH1PEPF0000A34C:EE_|CY5PR12MB6250:EE_ X-MS-Office365-Filtering-Correlation-Id: e9fddbe6-c88c-49e1-bcbd-08dcaaf6929b 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|1800799024|376014|7416014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: 5XpCy1OC619rfvmf07aGE/Id2+vMYDDjoNuD8tXPzXu9NL3IOMSGDkPDVA/AyPUdy+h2B9ryFhhbzmAExp49qLsNYZB94zc8HWfwN1zLzY/EBFslBBUxHvg/B515s8XuFBY9SVV5XRCqJC+PdVs/46unqDPQTld/cVpDMgA9XJZLOtKvi1/09tyi0BpEwZmZ1jmeIMmvnk8KxTvwZYDZUehPUJKUsUwzEc9At1kZ5RgVGFDTvkGxFMs+Hib+mbphgY2+Kzmf9B8lx1CilaLa55QkLEe4hmZ8SCZBF0C457gElb1J3vnXHIKlVe2U8TFQRryjdRMxfJil9IelkAxl6cf8kvOrCcRy83Iq0sclU5ysuanb83DKGiXftkIBlOgrFthETdrcIRJYVCipS/Dy7L22oKy5qeY90pN7aga5x2/SJMZO4tkgI6jP7AyiFciDAhJYydusB7i9qIPstNhb8juJxFKvb6V8C4y8lSwI5PhtDc2eoB62YU5G97qeU+9YozNRY6GSkhh/1T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376014)(7416014)(82310400026)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jul 2024 09:05:17.2499 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e9fddbe6-c88c-49e1-bcbd-08dcaaf6929b 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: CH1PEPF0000A34C.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6250 X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 2AB502002B X-Stat-Signature: 49rd57zf7kjqjsyiozujajikqkhagt16 X-Rspam-User: X-HE-Tag: 1721725522-840938 X-HE-Meta: U2FsdGVkX1+b2d06CDcpeXqxjIacvny8yPePA7KsbjOJRZ2ogRmzvib4hxkr1cAr6PJZ6HD21hmQ5BrqZyj07Nh4zZmYBjPuh3tXRYiVMGZZKtm45LTNT+x7ABzOPyUIKynEdRuBJca9DOGDBuQe8WQ9gF8SyvNthWjbTdy+rMosHoMllrw7djZUu9QOwZfKeI0eGabs53K+48vANVU3/LCRMcqt9p8xRVxRMhAE52TA24+7rpM3q2Qwm4RHJFhOgdl6G7Ro7szbq4jeh/Im7oO4ETo7rCrJMnfNlabOdeL8bQlYmGMFbce+n0+fKZub5Czk+85wgBM/x56ixFIekZRDjlnCLyc6pjXm44afuDWpwzLxQz1gIofEzLmZYRdfOXVP75xKr2qq8C4x009qSZHRM/k6swi3UJH847P8pIwe3VbwNx2lfhC0FgNEOOd1w2TaCsLj0Vd7rgQ01CPqhaenTdgiavvWIyNffze63jaCXnJ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version=1.2.4 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 | 15 ++++++ arch/x86/kernel/fpu/xstate.c | 89 +++++++++++++++++++++++++++++++++ fs/binfmt_elf.c | 4 +- include/uapi/linux/elf.h | 1 + 5 files changed, 108 insertions(+), 2 deletions(-) create mode 100644 arch/x86/include/uapi/asm/elf.h