Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp321237lqh; Fri, 31 May 2024 02:20:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUxCTrhAZSxGtF9oDWOld7k5NfJ+tV6XnLcMElChx/+8Ah9j9+Jqw3LknUHO/cHmeaBuTjjIpExk6GAvF7PZEZAG3EA8BDk05DPG8KPvQ== X-Google-Smtp-Source: AGHT+IEL0pEeRKF6hDZzsxXV9i4IZEn+BIo8DLC7ZAoE5Of6woHqELewW26hXFzuT/Vg2SrzedR3 X-Received: by 2002:a05:620a:56d1:b0:794:a729:d432 with SMTP id af79cd13be357-794f5ebe492mr130704985a.60.1717147203644; Fri, 31 May 2024 02:20:03 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-794f32a5da9si147613785a.666.2024.05.31.02.20.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 02:20:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196560-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=obrLnH0t; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-196560-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196560-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 523DB1C22AC8 for ; Fri, 31 May 2024 09:20:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A14F78C92; Fri, 31 May 2024 09:19:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="obrLnH0t" Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2082.outbound.protection.outlook.com [40.107.93.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4BC11768EA; Fri, 31 May 2024 09:19:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.82 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717147197; cv=fail; b=ZTho9RWpumU+I+/qqaUmxX1wNykCvhXklnieAWXPmjvpnkOR402sjD2pvXuQEykpDajx4kFWdiquzHg3Nd2oyamfn477dWypd2y8Xle3aJEucEZWmp5Kxor1EoDOlUMVsQD6x6H9+qo02k2sfK/17PgJC7nkZ8qguXLH/SRubz0= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717147197; c=relaxed/simple; bh=i5OVmzekqr8ooCLA3vXi+oMcQrgp0LiiNwGQ62ZcQJ4=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=f/QNAFNmEQdwbAie1efFYvGegJ1fn8cvKN9m0VoLFjOTGD/pDugg7miYK5je7aMY8atIcy3DAMZST3nhJrLqSs8TvTZshhfDgRj00AbOGYcc6pC20cl7HLEI8WcAC8SYmaK9jZjnHJAR37P31Qg52v3SPQhLRHH9Eg6pDC8Bclw= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=obrLnH0t; arc=fail smtp.client-ip=40.107.93.82 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Esl6ufamiFd65oeGrIFnImk7f1azAQv5j7z4G5paOX6frt54hCc0IQTUwPzlgxXoh3gKbAYl6lNyjTyO+f7HFHhrGKnE70h36gjuG7CFvviGwN+qSUNSc/gXAshMKge2WnnmHA4bODD6M918raHkaWY4smLtMZGQ6/toQ5hyMuOqy3DM65NpIOS2r6XNdQIFefSB0garQ7g/eCGamQ8spVmzXPqQYGqcO16vq3DKzgqk2oQVa2FO1+aPjvO4AlpA91Nwz5K1tNg+6eYj/QA8jxS8EMIIjeGQOua3TQwkTDChg5A5emtAsW2xT+mAAPMA5dsC5iozseM70Iz5nslSKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=aqqRAMS/EXIos4XOWqk6Kr0AaO2lD/oSfSmBvCzl45w=; b=MtcSmVZ/r/awNJEmLBJJBwaaPxSQL0SgPX0FBoUqQRBcmx3W83fIySs4OsiRoRSwfT7UhH+HClmHrhQp0q/ap2HUsntq06p5WGWV8eW7XZxoQYYytMTum/vZrOA+/0ZxA3x75d6eOsjO6CZq0vzZwDwisWoRemL3rIUy6zxbxBojVNr+nFdAn/54z7RfU13JVNC5PX+tSj0Ls3mlqWYOPTGzxVntHqjqjqrT05sPm6Gjk81iW0+VUw9uZpJmj/JCWWOccuMd80w6d3A0MdL9hZd+LFKEiRShEtdraJV6uDmJ8A0Pdi0Ze95OgkBkJLHHA0cBMYd8sUlJPziIL/mfNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none 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=aqqRAMS/EXIos4XOWqk6Kr0AaO2lD/oSfSmBvCzl45w=; b=obrLnH0tAYnL7oINEMMqRK6IPbUewI7AqvNbwKRrjVFeZW8SopZBnFFUlp8QS8LAy50Zz2baJDxKEVw/+SgJGNZB6uTA66ti7iJv9sydyLN+e2+sdyl/xoEzC740QdH1fkIZ6E6/PsEP0ZENSBC1qegadURwmW3QYFcdzXrR4Zs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from SJ1PR12MB6124.namprd12.prod.outlook.com (2603:10b6:a03:459::15) by CY5PR12MB6369.namprd12.prod.outlook.com (2603:10b6:930:21::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.22; Fri, 31 May 2024 09:19:52 +0000 Received: from SJ1PR12MB6124.namprd12.prod.outlook.com ([fe80::c15b:b99d:8d9e:fb25]) by SJ1PR12MB6124.namprd12.prod.outlook.com ([fe80::c15b:b99d:8d9e:fb25%6]) with mapi id 15.20.7633.018; Fri, 31 May 2024 09:19:52 +0000 Message-ID: Date: Fri, 31 May 2024 14:49:40 +0530 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/1] x86/elf: Add a new .note section containing Xfeatures information to x86 core files Content-Language: en-US To: Borislav Petkov , "Balasubrmanian, Vignesh" Cc: Thomas Gleixner , "linux-kernel@vger.kernel.org" , "linux-toolchains@vger.kernel.org" , "mpe@ellerman.id.au" , "npiggin@gmail.com" , "christophe.leroy@csgroup.eu" , "aneesh.kumar@kernel.org" , "naveen.n.rao@linux.ibm.com" , "ebiederm@xmission.com" , "keescook@chromium.org" , "x86@kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-mm@kvack.org" , "George, Jini Susan" , "matz@suse.de" , "binutils@sourceware.org" , "jhb@FreeBSD.org" , "felix.willgerodt@intel.com" References: <87wmo4o3r4.ffs@tglx> <4a090901-9705-40aa-ac3d-d67c52660f22@amd.com> <20240522153433.GCZk4QiX4Hf0OuI48E@fat_crate.local> <902b1bf0-15e6-42df-8f86-21387deef437@amd.com> <20240523144543.GDZk9WlwKpCKx8I3RE@fat_crate.local> <664e101b-3689-4876-825b-a5aa12b7978f@amd.com> <20240526090554.GAZlL7cpva88mMUbCK@fat_crate.local> From: "Balasubrmanian, Vignesh" In-Reply-To: <20240526090554.GAZlL7cpva88mMUbCK@fat_crate.local> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN3PR01CA0178.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:be::12) To SJ1PR12MB6124.namprd12.prod.outlook.com (2603:10b6:a03:459::15) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PR12MB6124:EE_|CY5PR12MB6369:EE_ X-MS-Office365-Filtering-Correlation-Id: 7698cde1-e339-42d0-683a-08dc8152d3fe 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:13230031|366007|376005|7416005|1800799015; X-Microsoft-Antispam-Message-Info: =?utf-8?B?VE1IRXVsa1YydE1HbnJwY1NGSS9hQU1VZWxEdjQyQkFEOW5NajJVbWdoUDZa?= =?utf-8?B?U2ZSZkdXdC9lbUVvSStxeTFQL2xrM0JncHlhOHlnS2NrSTg5OHVuVXhLeUt0?= =?utf-8?B?U0VLb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utf-8?B?aEpHTjlWY0o4UW5WVlFtQ1RvU2FOOEExSE1ydnQ0SjVpN2RoZFd1ZUdLS2Fl?= =?utf-8?B?SE1oNlo4RWgvbmhEYVd2cDdzblBCNFhMZ0xOUEljdFVXYitGRHMwbGFTQktm?= =?utf-8?B?ZW5qTzFITXBNZnZSMklFRFladndTQndOYUtSbFJiV0ZuTUZ5eGFnL005QmRQ?= =?utf-8?B?K21YZFRpM2RyTDNCU0dBcWxQcjNQNFRzQlEvcGZ5ZlJjcUdvTmNHVVVJMXpP?= =?utf-8?B?YVE5eHVNWmZCei9VdlBNa1ZGc3F6bm5CcHZaMUVJV1BMaEgxZDYrUWVoTlgx?= =?utf-8?B?Y0w3Y3VpdHRRYWxwajA2d3hnTFU4dlVvdURaa2R5YzE2SWtxQlF2UGp4ODRG?= =?utf-8?B?YWxsTlIrSDJpcHAvUkpISE85N1pvRnh3cGNzbVl5bnJ1cmlSTTFESGtQTlN4?= =?utf-8?B?OXdXbVJWcC95ZEozRi9PdWFDUlRNQUFnSUJpNnp6Sng4aDFnUVJUM1BpeFIz?= =?utf-8?B?dGQyeUFGV1Ewd1RrcjFwa0EyUm9YQnhOSytMQlV5Q2lyRzF4a0NaSFI1RUdo?= =?utf-8?B?b042cE91OVBxcktNQkhjQ2NxMXFUVkgrajVwc2tQMWFXS0MwSVNDR1VTRTVz?= =?utf-8?Q?EvybIDU7/LQSxhx6eEx+B5k+1xqQ0U6lqwVOFaacP9SI=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ1PR12MB6124.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(376005)(7416005)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?L2Zoc0lkZUZ3bmdxUk0wVTVzTVptd1dNUnBIN2VUREVSa3UzYjN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COHNBc2ZRN1FXa2w2azZTWSsybW1uQmR5WlVXMXF2eFB5SWEzVC9h?= =?utf-8?B?UCs1a3hyV20zT0prZEw4OGhBS25SL0Z0UEdOUWFPYm5CMGtLbHNWZFIwTnhy?= =?utf-8?B?U1hrNk03NWRVdGhUUGhQcVMvd2FBam9XUnc4N25xZzViaTRyK005NkdXenVa?= =?utf-8?B?dDZ4N05GMFpaelNrN2tmcE9QdlpNa055NU1LLzB2ZGxHZ3dsUUUrY3VuWWEy?= =?utf-8?B?SW9pTVlJcmE0cU9maDBKbW91T3A3R3ZPQ1c2N2k3YThhOXkxd0oyaFgySTl6?= =?utf-8?Q?ejWDowKxTkWiPy5IOPmETIEA5?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7698cde1-e339-42d0-683a-08dc8152d3fe X-MS-Exchange-CrossTenant-AuthSource: SJ1PR12MB6124.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2024 09:19:52.7177 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +SnwaE6Ytpq5hT/oVKFH3VwjV1eU/fLZDWj8vU1HhkQ/Ap7vwlFW/VOs7ylZo4j1EwZmZBytd+99bjIvfzZOoQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6369 On 5/26/2024 2:35 PM, Borislav Petkov wrote: > Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. > > > On Sun, May 26, 2024 at 10:24:41AM +0530, Balasubrmanian, Vignesh wrote: >> If we can add a new enum only when we extend, then as Thomas suggested can >> we use other kernel variables as in the first version of the patch until we >> extend for other/new features? > I assume by "other kernel variables" you mean CPUID? > > If so, can you change the layout of your buffer once you export it to > userspace? In a couple of the previous review mails (https://lore.kernel.org/lkml/24f71d52-0891-4cfc-8dec-9f13ed618eee@intel.com/ and https://lore.kernel.org/lkml/20240314162954.GAZfMmAnYQoRjRbRzc@fat_crate.local/), it was suggested that the new .note should not use any internal definitions like "xstate_sizes", "xstate_offsets" and ""xstate_flags" which are also the direct output of cpuid instruction. Also, the feature ID in .note records should be independent of the existing XSAVE feature IDs (this was the comment as I understood). I defined the new enum and mapping function to ensure that these remain independent of each other. Thomas' comments on this version are that we should use existing variables instead of re-evaluating cpuid. Also, to avoid the new enum and mapping function which will make not any sense unless it is extended for newer/different features. That will be like our first version of the patch https://lore.kernel.org/lkml/20240314112359.50713-2-vigbalas@amd.com/ So other than with the new enum (custom_feature) and the new mapping function (get_sub_leaf), we are unsure as to how to maintain the layout to be independent of x86' cpuid. In the current version of the patch, the fields -- type, size, and offset are derived from the cpuid instruction currently (and could be derived from existing kernel variables in the future). The xsave flags are not used currently, it can be zero(reserved) for now and its layout can be modified (as per the need at that time) when the need arises. If there are other ways to maintain the independence of the layout of a record in .note section from the cpuid instruction other than depending on a new enum and a new mapping function, we would be glad to follow it. thanks vigneshbalu > -- > Regards/Gruss, > Boris. > > https://people.kernel.org/tglx/notes-about-netiquette