From nobody Wed Oct 8 20:02:01 2025 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (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 59E04267B7F; Wed, 25 Jun 2025 12:51:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750855898; cv=none; b=FEwyH+4NzBAAImzAjy9elsM4Fti79/Eb3KJdOeFg3NnKiJbWOsP1sgoG42SJ5vVhrl/sVJnxkxTFi/AEk5UvudDC1+NVcvdETSN5jV/uKCabudlR8lpuiFCJ3Fn3js9JhgCfJ4gCDufs2cd6LBi/RxmzkZf50iufqV9t8xr0JTE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750855898; c=relaxed/simple; bh=UXQro1nhuXHnLN9WvBTrdf+zqqavYnpmltBFM1Abf3w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cEEU71N+LRv4VRGpdF1Ji+GP/Y++EJN9YpdWwL7SqC+ZKaFZyT+32CJDoiqCyDWQw9sFNCBRbnGxD8NfNGOANS4mqgJ+vvtVQIHExnDkIWLBz6GlCiil5Z+Aon+sbaHWXn9epwaAtg0FLuve8CL33siHpVcS/MssF/YWc70mPbo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.helo=mgamail.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=PeKpUjDR; arc=none smtp.client-ip=192.198.163.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.helo=mgamail.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="PeKpUjDR" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1750855897; x=1782391897; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UXQro1nhuXHnLN9WvBTrdf+zqqavYnpmltBFM1Abf3w=; b=PeKpUjDRBAqmu/+zP9mLeYlkWMMpvTrfKpg8Bj3Ugz37y4M5U45JkGem 99n2wvKsWZGqro5yuhxht/DuNSXLgCFSqeNg1heG18d6qqF2qki+DpTR7 ljblUBiywsWKAUmIyhmDt3UIPntG+GW5P64+vQiVLpmmEOXxQ8zI7s1OB fWNCuNrkn3rNqmEJLU4iXu2X+UuW0irww9Q9FOboZpxWtlQdMEOMq+tvo NxwbDV3OEAB56K9bUOHTUt02Rp/Xj0YyorCLw5BltDfED2IGNzVc66Qo4 mgGV1GaAkLTAUFdtNG8dtcQhk9736uQuAZVyZvfuE3K7WrWktoGflWonk g==; X-CSE-ConnectionGUID: t8Gmlj1OQ4GoI1NLFQRfHg== X-CSE-MsgGUID: xevJyp7eSLWQHisoET+q4A== X-IronPort-AV: E=McAfee;i="6800,10657,11474"; a="53189677" X-IronPort-AV: E=Sophos;i="6.16,264,1744095600"; d="scan'208";a="53189677" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2025 05:51:35 -0700 X-CSE-ConnectionGUID: RMGteUxqQ/CYn3tiM3llaQ== X-CSE-MsgGUID: 13ncQLpfTTKgVxgxDKLEGg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,264,1744095600"; d="scan'208";a="151830984" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa007.fm.intel.com with ESMTP; 25 Jun 2025 05:51:24 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id 32CCD7A8; Wed, 25 Jun 2025 15:51:13 +0300 (EEST) From: "Kirill A. Shutemov" To: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , 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 Cc: 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, "Kirill A. Shutemov" Subject: [PATCHv7 14/16] x86/cpu: Make LAM depend on LASS Date: Wed, 25 Jun 2025 15:51:07 +0300 Message-ID: <20250625125112.3943745-16-kirill.shutemov@linux.intel.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250625125112.3943745-1-kirill.shutemov@linux.intel.com> References: <20250625125112.3943745-1-kirill.shutemov@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Alexander Shishkin To prevent exploits for Spectre based on LAM as demonstrated by the whitepaper [1], make LAM depend on LASS, which avoids this type of vulnerability. [1] https://download.vusec.net/papers/slam_sp24.pdf Signed-off-by: Alexander Shishkin Signed-off-by: Kirill A. Shutemov --- arch/x86/kernel/cpu/cpuid-deps.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/cpu/cpuid-deps.c b/arch/x86/kernel/cpu/cpuid-d= eps.c index 98d0cdd82574..11bb9ed40140 100644 --- a/arch/x86/kernel/cpu/cpuid-deps.c +++ b/arch/x86/kernel/cpu/cpuid-deps.c @@ -90,6 +90,7 @@ static const struct cpuid_dep cpuid_deps[] =3D { { X86_FEATURE_FRED, X86_FEATURE_LKGS }, { X86_FEATURE_SPEC_CTRL_SSBD, X86_FEATURE_SPEC_CTRL }, { X86_FEATURE_LASS, X86_FEATURE_SMAP }, + { X86_FEATURE_LAM, X86_FEATURE_LASS }, {} }; =20 --=20 2.47.2