From nobody Wed Apr 15 07:03:31 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CA79C43334 for ; Sat, 23 Jul 2022 19:03:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238780AbiGWTDC (ORCPT ); Sat, 23 Jul 2022 15:03:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234408AbiGWTDB (ORCPT ); Sat, 23 Jul 2022 15:03:01 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49D8E1836A; Sat, 23 Jul 2022 12:03:00 -0700 (PDT) Date: Sat, 23 Jul 2022 19:02:56 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1658602977; h=from:from:sender:sender:reply-to: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:in-reply-to:references:references; bh=KVhvayUCuLUwx0cDpVyHzUhQXQXy9a7YeCjQCfFqYT0=; b=SRuxErA1NYjv4s6GKmTUGHlJabtLaz74O3s1TaDcYu7yurBcl0XISOMrO1c48aKc5JbA7l FfD+bnIobLgDXN9nOCrBkRExxCMf2SpDJvcwYuwjUE2ythl2qwDUA4sFlAKyqmPZ8ELjYy g/uB/In9wzYwOTSrcrjMMy9X2yy7uOXXrwMlAY25fzNyKJXvWnuDzoirKMVVC6vAMIdIWA Jqn4Wso0/XRbWAWwrK1EwTiTPwc8g7DAY/u+jBK5vMoNqefr96ETvO5P8JEBZoKn1JniZh xnzkdoolnhOFdF/An2dVQ6WMkv+VRm+gzWvROWLluy65laJ4gGljaXvVrbA1rA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1658602977; h=from:from:sender:sender:reply-to: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:in-reply-to:references:references; bh=KVhvayUCuLUwx0cDpVyHzUhQXQXy9a7YeCjQCfFqYT0=; b=JI9qW77DzmozqRoY4VkO0t1MNyNkCjWnf4sT7uG7zVrQPHdbCuRRH38etVn7/WzkhKsIHJ oTp9qjUYOeNwAUBA== From: "tip-bot2 for Ben Hutchings" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/urgent] x86/speculation: Make all RETbleed mitigations 64-bit only Cc: Ben Hutchings , Borislav Petkov , , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: MIME-Version: 1.0 Message-ID: <165860297629.15455.8257113023400800621.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/urgent branch of tip: Commit-ID: b648ab487f31bc4c38941bc770ea97fe394304bb Gitweb: https://git.kernel.org/tip/b648ab487f31bc4c38941bc770ea97fe3= 94304bb Author: Ben Hutchings AuthorDate: Sat, 23 Jul 2022 17:22:47 +02:00 Committer: Borislav Petkov CommitterDate: Sat, 23 Jul 2022 18:45:11 +02:00 x86/speculation: Make all RETbleed mitigations 64-bit only The mitigations for RETBleed are currently ineffective on x86_32 since entry_32.S does not use the required macros. However, for an x86_32 target, the kconfig symbols for them are still enabled by default and /sys/devices/system/cpu/vulnerabilities/retbleed will wrongly report that mitigations are in place. Make all of these symbols depend on X86_64, and only enable RETHUNK by default on X86_64. Fixes: f43b9876e857 ("x86/retbleed: Add fine grained Kconfig knobs") Signed-off-by: Ben Hutchings Signed-off-by: Borislav Petkov Cc: Link: https://lore.kernel.org/r/YtwSR3NNsWp1ohfV@decadent.org.uk --- arch/x86/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index e58798f..1670a3f 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -2473,7 +2473,7 @@ config RETHUNK bool "Enable return-thunks" depends on RETPOLINE && CC_HAS_RETURN_THUNK select OBJTOOL if HAVE_OBJTOOL - default y + default y if X86_64 help Compile the kernel with the return-thunks compiler option to guard against kernel-to-user data leaks by avoiding return speculation. @@ -2482,21 +2482,21 @@ config RETHUNK =20 config CPU_UNRET_ENTRY bool "Enable UNRET on kernel entry" - depends on CPU_SUP_AMD && RETHUNK + depends on CPU_SUP_AMD && RETHUNK && X86_64 default y help Compile the kernel with support for the retbleed=3Dunret mitigation. =20 config CPU_IBPB_ENTRY bool "Enable IBPB on kernel entry" - depends on CPU_SUP_AMD + depends on CPU_SUP_AMD && X86_64 default y help Compile the kernel with support for the retbleed=3Dibpb mitigation. =20 config CPU_IBRS_ENTRY bool "Enable IBRS on kernel entry" - depends on CPU_SUP_INTEL + depends on CPU_SUP_INTEL && X86_64 default y help Compile the kernel with support for the spectre_v2=3Dibrs mitigation.