From patchwork Fri Jun 20 13:53:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kirill A. Shutemov" X-Patchwork-Id: 898475 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 6A9A929DB7F; Fri, 20 Jun 2025 13:53:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750427635; cv=none; b=PI3VTc96IasavLbCcPQkFmiYGkRP8LrsJysikX+5fbMReraGre2+tyN0HggJguGmSn9NKrGfKqyZ975ao+leT35KmI2/fz9jN1gTYi1LLvMCpTd4L6hL315RJV27hQfGZ/Zyav15VGHpAbck7PwiqheQ480l5Xq4eVsVGZsRP/8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750427635; c=relaxed/simple; bh=UXQro1nhuXHnLN9WvBTrdf+zqqavYnpmltBFM1Abf3w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=W7oobbqrbnPphy2885WL/6pKdRpcOyM4BieNISh0CCkt+YdoQceKUkL06/Ggoc3vt9Z0O15PA5QGui7P2PGe6EUxhBaCsNkRrnPIOq4V6XQPTkE+edLHtfPyxnZvEaZcL1a7N/OZH3L4GJlerkwqRPYdUmB/a1qlnrysT1EQpcU= 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=cQQqAWNn; arc=none smtp.client-ip=192.198.163.11 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="cQQqAWNn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1750427634; x=1781963634; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UXQro1nhuXHnLN9WvBTrdf+zqqavYnpmltBFM1Abf3w=; b=cQQqAWNnPIrTd7jgAAJW1A3k3QCAQTcGyeQpXIwRCvgjs1zEE+lDHx3p 2xPipKPnoWZ0B1e/tl2H6viWxgC8MuYelSSPBHFHiLWvdGy+gJJlegry4 OVwtD5rdmHtdiDwKl1bnD+uOl+3ZYJg/KyRnB9EwHaG8hYnlo3NHqkJe8 U1eVZzEvTehG3YjcA0q9HnTFQEDOop5Vgm3TlIaRMhBmXM6v9eHettmcW TLDmH/Q++ylzlpPL1AtU+fWsL1h5VEvEZbY5g9WZW3+rPaOMWbwI8n6ZY b7fvvooPbM7b21GUhZX2VCGW7XG8wsMfWVhEfnClEGDQ7pcUbl/9dEGpZ A==; X-CSE-ConnectionGUID: ogjtmG97TE+iRBdKyVkelQ== X-CSE-MsgGUID: /gEKRepgSm65w4WinwKS3A== X-IronPort-AV: E=McAfee;i="6800,10657,11469"; a="63298032" X-IronPort-AV: E=Sophos;i="6.16,251,1744095600"; d="scan'208";a="63298032" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2025 06:53:53 -0700 X-CSE-ConnectionGUID: 3cdRhCzmQ6y4eQ96FN8e8A== X-CSE-MsgGUID: 0eoyFOJ+S1GWBUwCf2kviQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,251,1744095600"; d="scan'208";a="155470819" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa004.jf.intel.com with ESMTP; 20 Jun 2025 06:53:42 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id 268609FF; Fri, 20 Jun 2025 16:53:29 +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: [PATCHv6 14/16] x86/cpu: Make LAM depend on LASS Date: Fri, 20 Jun 2025 16:53:22 +0300 Message-ID: <20250620135325.3300848-15-kirill.shutemov@linux.intel.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250620135325.3300848-1-kirill.shutemov@linux.intel.com> References: <20250620135325.3300848-1-kirill.shutemov@linux.intel.com> Precedence: bulk X-Mailing-List: linux-efi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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-deps.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[] = { { 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 }, {} };