From mboxrd@z Thu Jan 1 00:00:00 1970 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 AC13EC7115B for ; Mon, 23 Jun 2025 08:17:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4BE816B00B7; Mon, 23 Jun 2025 04:17:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 46F606B00B9; Mon, 23 Jun 2025 04:17:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 35DCB6B00BA; Mon, 23 Jun 2025 04:17:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 1A6976B00B7 for ; Mon, 23 Jun 2025 04:17:22 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id A16561A026A for ; Mon, 23 Jun 2025 08:17:21 +0000 (UTC) X-FDA: 83585960682.19.0AEA8E2 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by imf03.hostedemail.com (Postfix) with ESMTP id E51FF20005 for ; Mon, 23 Jun 2025 08:17:18 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=HbULeruq; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf03.hostedemail.com: domain of kirill.shutemov@linux.intel.com has no SPF policy when checking 198.175.65.19) smtp.mailfrom=kirill.shutemov@linux.intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1750666639; a=rsa-sha256; cv=none; b=5KJC4rqh+YhOl8NpHLyP/fmAlmkqrUg7UJAa1Z/e5fPdJsHpLNyMZAD+1SVfauDq0QFrlK hButwwaaIvjzmnm/Fu06qNbSGL8lfTgSh6wt3vfbJQsoqLE+QyMAz6ppXDgGK1j2MwPQ1U ZJfPaoeaohSWrb6mBlL62eA970D/N7A= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=HbULeruq; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf03.hostedemail.com: domain of kirill.shutemov@linux.intel.com has no SPF policy when checking 198.175.65.19) smtp.mailfrom=kirill.shutemov@linux.intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1750666639; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=6HFmi0xouGqeXf1iB7RY5RB+5glwyjfOLbtAFkNNiqg=; b=FFgvbqdk4JVc7laAM8GiFHRuRGkHXvjNRr82Wt5WTnU+NUmREmBGb1uSpJLOgGUCFB/kdI +K43VsA6g5yxQcxY0oxssCv/shgvJ23FRQA9pbDTSEsVGYTHua7UwUnnbjJIoPy5rV5WRx nxighxO3wTK8OhSlvKkkFz8qJvSo6iA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1750666639; x=1782202639; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=3C1C5syECeHn+sxB4B/MNopaQHu7zY8lfXLdxTcq1ks=; b=HbULeruqybkwG75m69QBscxMh7yYcOlo1r2wc/rhhJ1W8gnZcw3Bn0Gp g+GaXDyUC9bWpgK+mNCfW+Ebr/rB0MWn/RxQAvNQwdC1HmvhZiXuNAEJW iW41a6Etkv8vQZeiAdUMirpmv3NMxo50SX5mAXsJk49OmlIjOJI6E7s95 qVuhxZ2Jh4svMR3FjsTCr2qEn1bVf/BCdtch2pJWiogzZyGGk+1b852Vu 0o7hvTpPx7MEZv5U54/637JgAk1M/kmZogzC4MRMDENJn40kBu4+xKGQQ eu+KlCtxO3Ql10M2d0psU+RwLHYh5lSqP77DWB8ZwXUbTKxGzxdPkwIex A==; X-CSE-ConnectionGUID: 6xAe/DnARxGUekeesHj8QA== X-CSE-MsgGUID: rDTDvMawQHeds+xDjIKdlg== X-IronPort-AV: E=McAfee;i="6800,10657,11472"; a="52732710" X-IronPort-AV: E=Sophos;i="6.16,258,1744095600"; d="scan'208";a="52732710" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2025 01:17:17 -0700 X-CSE-ConnectionGUID: 8g6RJxTKTPCtjzq50ZA/yw== X-CSE-MsgGUID: vpuqvzhrQi6SNRUSArfXVQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,258,1744095600"; d="scan'208";a="156074558" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa004.jf.intel.com with ESMTP; 23 Jun 2025 01:17:04 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id 6F573108; Mon, 23 Jun 2025 11:17:02 +0300 (EEST) Date: Mon, 23 Jun 2025 11:17:02 +0300 From: "Kirill A. Shutemov" To: Borislav Petkov Cc: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , Ard Biesheuvel , "Paul E. McKenney" , Josh Poimboeuf , Xiongwei Song , Xin Li , "Mike Rapoport (IBM)" , Brijesh Singh , Michael Roth , Tony Luck , Alexey Kardashevskiy , Alexander Shishkin , Jonathan Corbet , Sohil Mehta , Ingo Molnar , Pawan Gupta , Daniel Sneddon , Kai Huang , Sandipan Das , Breno Leitao , Rick Edgecombe , Alexei Starovoitov , Hou Tao , Juergen Gross , Vegard Nossum , Kees Cook , Eric Biggers , Jason Gunthorpe , "Masami Hiramatsu (Google)" , Andrew Morton , Luis Chamberlain , Yuntao Wang , Rasmus Villemoes , Christophe Leroy , Tejun Heo , Changbin Du , Huang Shijie , Geert Uytterhoeven , Namhyung Kim , Arnaldo Carvalho de Melo , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, linux-mm@kvack.org, Yian Chen Subject: Re: [PATCHv6 01/16] x86/cpu: Enumerate the LASS feature bits Message-ID: References: <20250620135325.3300848-1-kirill.shutemov@linux.intel.com> <20250620135325.3300848-2-kirill.shutemov@linux.intel.com> <20250620163504.GCaFWNuI-8QFqAM0yI@fat_crate.local> <6y2iqv6c2idn7yebaec7tyhzl5zcsrwqq4lcsokumlqeophzaf@ljnmxorblgcj> <20250620182943.GDaFWolxhwogB2tTxb@fat_crate.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250620182943.GDaFWolxhwogB2tTxb@fat_crate.local> X-Rspam-User: X-Rspamd-Queue-Id: E51FF20005 X-Rspamd-Server: rspam10 X-Stat-Signature: 54zdy976r7np979jp5afqu16hrirehze X-HE-Tag: 1750666638-121182 X-HE-Meta: U2FsdGVkX18ns0knUbvTmFX2BX8mQ0s7EH4csw6ya5ulQst/2oD9StT01b3FdJWG4POlm8iJ1FLsexnxaTx4tjzFiHMkhQi+NbS1msFsC9qDPCvN0iXjW3sOk3Xh7sGefqXDQLtR69rZAF7PEMeSx/CX05mBs3MC/Fh/MuJTgLpHcxGmvUoxMmD2w8gNRQ9L6TtWsLyaqH7+KdWElX9QZ3EnkCFahogBpMm8ivfx+DBkzcYqVLfYUWL4FF2+VjeDLawa13XYP0zBWxdbZozKo2EUcknBiuSfwAv+pqhXmUQg03LeC6kmmUBhrRMghOdvPlIUFrq1ukp4Ux/c6HMys0KxIMcOeKYP8owWuQM7HGySl1AGA9s8BExJk4rStC5YTty5Jj+TZGtCq2li74LDzrG3ths+xFmDrqO/T2wgAibSQTszLQKTPTfabxILQ8OTUgutdgY1hjf/T4g3McLx1z6CD2QHmxg2zP5wPGWoPN11u6uj7i02MDhn2yyVEmyYU6/5r3YnwG6NZtgU0dlDjZs5Do2lPfrfzrRUVWncZ1KgPD78e183SPR8az2JA8NUJfnl4HuZ7CjhEp0OEwNVv2gVasDTQaWZwH6ljPfrqLTFazUEShpa/1q1TqFspcTdXmMhRGFZ7xR7a1ktu0OAHTojz5VDuB1mmBIJF0rneaRPxkd1C3xYWJDivQjLrVP846egXaVm4g0lGIPkT2M/ijFvv0Wb4VFefTgQ7zF95CKHG9SMWlDTCNHdGBcCylI2bwkw6ELEdM6Jw90k2ecAvQDql8iU1tXXSSEiq9SAGrvWgX5SyFjZeUGeoTHitw5SDfhZ5pR7xSmfpNv3g715D7MGxZMcEA6peExwOvgb4UCioHUj3a1qAGdzQafcyUKkneehbEh/JACSnTTCg6v/MYmP2jEFXhfS155GhoAkinlztzX1yAzpK9yg1ctJOY0iMoi/5ULzHcsmH6ZIWM9 38zvuu8D 9ITV+3VMDU6KSIKmPmJIbRIQJ5c+w5L5nFpISsRjx/zQQukQuGOd3DFOcqItxYg92FFdE5qondYiyvPmXBmSnrInVGDnAucptMU21Cojs+Ade+XVos96ebPMF+7Ir5LzZqUKRg6Z0pA7JZXUfu3FbSN33/xQ1h4az6/1FMr4nV7zjT2sNmI+LqPXa3HCNQzmcr5StrEV5q3Mt+biDReomxzm93lglKfie4GeDtgmvqgiMud59oUQ08o341UkhMTwLsPayX5BawECXRrZ0FVxjhQxBAGX/s3NVoF0FU8wfum4qJSpPpZ3YoKycMxYpKl8DlOUj X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Fri, Jun 20, 2025 at 08:29:43PM +0200, Borislav Petkov wrote: > On Fri, Jun 20, 2025 at 08:33:36PM +0300, Kirill A. Shutemov wrote: > > What is current policy around it ? > > Documentation/arch/x86/cpuinfo.rst > > > I think it is useful to advertise security features in cpuinfo. > > Because who's going to consume them? > > Don't get me wrong - I am trying to see whether the whole use case for this is > well thought out. Because it becomes an ABI. > > But if no one is going to use it, why bother? > > Arguably, for this thing the argument would be - as it is put in that file > above: > > "So, the current use of /proc/cpuinfo is to show features which the > kernel has *enabled* and *supports*." > > as it has been enabled by machinery. > > So that's ok. I'm just making sure we're on the same page and you're not > aiming at something completely different with this. What about this: LASS provides protection against a class of speculative attacks, such as SLAM[1]. Add the "lass" flag to /proc/cpuinfo to indicate that the feature is supported by hardware and enabled by the kernel. This allows userspace to determine if the setup is secure against such attacks. [1] https://download.vusec.net/papers/slam_sp24.pdf -- Kiryl Shutsemau / Kirill A. Shutemov