Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp258004lqg; Thu, 11 Apr 2024 01:40:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUnIcrJFdDmtPYW6HTG3lJkBS0go1v+UY3s/xqyVkYSbG6s8LnAdtNGxlVZrnyihNAmMnvgey24elFjnuoKx/eg7H/awYsXSXBxKw6cgQ== X-Google-Smtp-Source: AGHT+IF2ZVkWLdAsd5Mgz8oQlMplncW8WzT9WkyZDtqqc3+JwNnssk7Ngh+JdvnbgtIAYNy/JEpr X-Received: by 2002:a05:622a:1190:b0:436:5492:60ae with SMTP id m16-20020a05622a119000b00436549260aemr2304688qtk.25.1712824835761; Thu, 11 Apr 2024 01:40:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712824835; cv=pass; d=google.com; s=arc-20160816; b=mg/cuyJvTR0jx5z0cJLoSnJwzZiPvOkASYyzF1Rb149hniO/fZtZML55qHCk6fZtlK TlcN3H8vmeKT3WsyamsevJLLdb+7/Jwbm61rwpUI5xH6j+t+1uEDBZgbTKJ8r6sF+9OW qnFlB8ZAFUWQlIqJ1IHqdrxjVm4WLY3PnaIYYPFZckkvHsOJgODsNFcZrzX7hkJn9fNz Uu9qdq2GfSIZFAehQxaMopq/DeKj3QlE+m10iKHi/id5ev49pa3lLy41MenCUflg8ywN Sz9KM7Wio75ODF1HzMSRBcKxdLKGjroUmGr19R4mNTfH6Bghc7J7YZWPdzCLC8tpo5gb tbGQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=TV4lGUvfwBKBZs0So2M2CaulVHj6EJWSlMyp6cjcgcs=; fh=x3u4ewt1RvPqrmif05cGOfV+cBhRR78WafDnEZMEz8k=; b=rknnNeiNa/lmC71Lk6y5GIgiQkLhHQTCFQb+6Ajkw6I/0CpQ1A7LWF1fHsRmeyNcmX 11zVvfCRoMBBg0iDSudPlTC9/MpTP2fb0gEz6xyj67kGc73oI00dkG8VvPJ1JHpYS8x7 5DDWR6QuMKC365rGzul36poOcedgIoFeM9aevmXDzBrHlXPkuazeqWSpUObizCx55qRT d3F8qViEWeMyNp0M9vJp+D1fWqTAy1caWyvgiBcYH/k8/vLYrwyHHlFtMoR2w01fjQY4 CBTTUSIR5wQYkYpRoGbEwiL9GxIKhYL/rImqVVXQy8f9UgLikrGnayFJ6MwxucW8BnV3 YwZA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zKTe2y5k; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-140102-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140102-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f21-20020ac85d15000000b00432f38f94c5si1066509qtx.657.2024.04.11.01.40.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 01:40:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140102-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zKTe2y5k; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-140102-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140102-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 7BE691C21178 for ; Thu, 11 Apr 2024 08:40:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E372D1411D1; Thu, 11 Apr 2024 08:40:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="zKTe2y5k"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="mW201AnM" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 B88EC2EAE5; Thu, 11 Apr 2024 08:40:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712824829; cv=none; b=bwZboWriTd8/Yfa3haANnK6QB/KNeR9c3DReo6fAqInReJ3ATFOw74D2FWVctCoYpNRJfY0upxyrd4h8Wmv5zHw+3yD8tWI3LRrAQ6AjLlTPiSrH5yKV+YKtX2Xk3A5kljkkSHuwZWazLY0y/RhD2VmO+HkzWk5uvpSlnbuadFo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712824829; c=relaxed/simple; bh=EKkU0vakLNZCApeEGiFYhFRmuY4Ff4FNPFAoAF64qsU=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=rYAMStKS3AHyirFo2MAyEOPeXK/C/N2NWNEMtLbJ2tq37JBziP2NuOEJXsYcE8XmyIEfRKh+h8nV1rPFJQ28ITHvhS/xuVocMTKdmE5xSR/7FMgqhy+O37++r59n+PdBkVR5HVEIwiTpZ2NzKxjzcNb92KiaO2xjCWmkyXdyGJ0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=zKTe2y5k; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=mW201AnM; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Thu, 11 Apr 2024 08:40:18 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712824819; 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=TV4lGUvfwBKBZs0So2M2CaulVHj6EJWSlMyp6cjcgcs=; b=zKTe2y5kGB8QpwRNs5Ps9FTgkb0bffKMJ2HXWJSJbvT6cL3oQPRhIScpjb45pug1uJn0vk bR5UOdmGJWp0GnO1F1cRrPbQZvIWOYspsLGyZ8sTtqwv219IyeKsPgQBMco7cj5aYM6+JM LA5unPzyrxT6J2MiKXH+24d9mVAwL+7zyFweta583iSmMsKu1TOEPwI8ur23+lmXfeyqJ6 5s/nJdk5HdMAGW8IOL1CSTeJZTCE/QS4sSyQQHT9a0yViSP2dyJlASXR/g1TnHM+rcyw9r LXgb/uxdhq1tjtGow1tXkriwlHyFrQR/ggiM01CallAgZKKTCPXmrw/1amuY8g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712824819; 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=TV4lGUvfwBKBZs0So2M2CaulVHj6EJWSlMyp6cjcgcs=; b=mW201AnMK74SamCh5fAASdQEwaMEOA18SDSlTvb6HNH9a1J3FGTG44X5FUiCHkittOd23Y 1/Q77TxXb9FPdgAg== From: "tip-bot2 for Josh Poimboeuf" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/urgent] x86/bugs: Replace CONFIG_SPECTRE_BHI_{ON,OFF} with CONFIG_MITIGATION_SPECTRE_BHI Cc: Josh Poimboeuf , Ingo Molnar , Sean Christopherson , Linus Torvalds , Nikolay Borisov , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <3833812ea63e7fdbe36bf8b932e63f70d18e2a2a.1712813475.git.jpoimboe@kernel.org> References: <3833812ea63e7fdbe36bf8b932e63f70d18e2a2a.1712813475.git.jpoimboe@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171282481815.10875.1887182579071664403.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the x86/urgent branch of tip: Commit-ID: f3f51c5865a9ae1488a35d97338f9f3f548adfee Gitweb: https://git.kernel.org/tip/f3f51c5865a9ae1488a35d97338f9f3f548adfee Author: Josh Poimboeuf AuthorDate: Wed, 10 Apr 2024 22:40:51 -07:00 Committer: Ingo Molnar CommitterDate: Thu, 11 Apr 2024 10:30:34 +02:00 x86/bugs: Replace CONFIG_SPECTRE_BHI_{ON,OFF} with CONFIG_MITIGATION_SPECTRE_BHI For consistency with the other CONFIG_MITIGATION_* options, replace the CONFIG_SPECTRE_BHI_{ON,OFF} options with a single CONFIG_MITIGATION_SPECTRE_BHI option. [ mingo: Fix ] Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Cc: Sean Christopherson Cc: Linus Torvalds Cc: Nikolay Borisov Link: https://lore.kernel.org/r/3833812ea63e7fdbe36bf8b932e63f70d18e2a2a.1712813475.git.jpoimboe@kernel.org --- arch/x86/Kconfig | 17 +++-------------- arch/x86/kernel/cpu/bugs.c | 2 +- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index b63b676..4474bf3 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -2633,27 +2633,16 @@ config MITIGATION_RFDS stored in floating point, vector and integer registers. See also -choice - prompt "Clear branch history" +config MITIGATION_SPECTRE_BHI + bool "Mitigate Spectre-BHB (Branch History Injection)" depends on CPU_SUP_INTEL - default SPECTRE_BHI_ON + default y help Enable BHI mitigations. BHI attacks are a form of Spectre V2 attacks where the branch history buffer is poisoned to speculatively steer indirect branches. See -config SPECTRE_BHI_ON - bool "on" - help - Equivalent to setting spectre_bhi=on command line parameter. -config SPECTRE_BHI_OFF - bool "off" - help - Equivalent to setting spectre_bhi=off command line parameter. - -endchoice - endif config ARCH_HAS_ADD_PAGES diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 0494787..25111ad 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -1628,7 +1628,7 @@ enum bhi_mitigations { }; static enum bhi_mitigations bhi_mitigation __ro_after_init = - IS_ENABLED(CONFIG_SPECTRE_BHI_ON) ? BHI_MITIGATION_ON : BHI_MITIGATION_OFF; + IS_ENABLED(CONFIG_MITIGATION_SPECTRE_BHI) ? BHI_MITIGATION_ON : BHI_MITIGATION_OFF; static int __init spectre_bhi_parse_cmdline(char *str) {