Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp196027lqg; Wed, 10 Apr 2024 22:42:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUaLlfttCnTZN+5CCdR3QxDskEynmapkgAXO19mTfCl+kivqhbAsVvs9YVyg0NDTAQFW4c7CcwNWCTL6vXfNjzL1qgpMtSsth/ZTUz+Qg== X-Google-Smtp-Source: AGHT+IFuyn9+eUcRZJmoSJ0nfELFGVNcuBDAQ26OgD06u860b6pe8t0JI2KYdTHFAETo67Tpiiyd X-Received: by 2002:a05:620a:c07:b0:78d:6aca:80b9 with SMTP id l7-20020a05620a0c0700b0078d6aca80b9mr4600385qki.38.1712814132577; Wed, 10 Apr 2024 22:42:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712814132; cv=pass; d=google.com; s=arc-20160816; b=iAiGt2f71M8f2BCTm634nr0U9geEaFFUCqmWN0X52yBFJsLZ50r+JT3Lwf1PlDrZ2M VUiUjZNFQNw5flUh9gOhyE6nMELtmb7Y/Nr+e0nX8xgkNJ05/Zl64c+JjB04WWfzuz9Q 2pGwblhcMrTH+FnBcki7QnKw2+tM7tBG3EzLqCLR8DFvV3HyCmXebALv/1dwFlmSD/0u CkBrYFBy0u4tkoZ03Os6ri6axiI0rEdrNKmYNVDQR3WG1BFm3ptP1GKqWOTm6uCV1Mtn y1EHXjm92mLHe4KLfNkKQp4/KIUTj126smngkGcR+JTcXG2mTLqNnSl90AQwZbJwGE8s p3kQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=1rmYK8ZxTbsBLooUiEBxk9IZRvjcujzywUAU8gnk/RA=; fh=7OJFrLnOA6s1ycE/HULnfMliS+3S6sqMIgc3sc3R36M=; b=xwuPyZz9sgi2L90ZLBfUrxen8rMolcrfITQbJYicBwrmLJv8oyY+jTrJpt/opyVQfW BvJ94fjxYdjUgb/+8Yvm1VSlm7NFu4Bkwb97/7HryjpMvkzJpks3mboBiCNY46WOhMLe WC+osAV/8RL7+HfL3MSCqH7gUqP5cVuYxC8ZJMKYh6pjy5ZkvNv4gDinmlOxJaK2bt/y rJAl8firapjRcxG6NLDwLG8CNHcLpFzIq9Po6FNIJa8XOULKTqWcFwiu9CZzFCILNEIV 8MFhpDfrgTCdl4nrc4H6Vf9CmGpQs1HPFfel4sOIQTlYGXG/jC8YptTMrYGMmNRBZM0P zmLQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PX5VsAxl; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-139795-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139795-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id vv16-20020a05620a563000b0078d674cddcasi819638qkn.693.2024.04.10.22.42.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 22:42:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139795-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PX5VsAxl; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-139795-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139795-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 4E66F1C22973 for ; Thu, 11 Apr 2024 05:42:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2FE9F13CA86; Thu, 11 Apr 2024 05:41:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PX5VsAxl" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 59BB613C9D1 for ; Thu, 11 Apr 2024 05:41:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712814118; cv=none; b=fJf4+fT9afy0Zve+bwx2Ab/haonNaizJUThOujz+lCgQ3JBVj6MSdwU4XWse5Row0dA5pC7eiAWEeNlK2XGfmYpYUxTUBs87MK9Vrp0Sf6CtHfugCIxHzzYx8mA/Nf33Osmc4Y+Nqfe/CeSu8BpU67fJsUNPohOl1pbleff/7bg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712814118; c=relaxed/simple; bh=RJUrOT3501HyBBPzrkesvvBDDHFyiVAUaxFIjmMpLgQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TySXEkUMzqBWDqfE4fflT/q3fOBg/IZZuIMtbgsGmoIJfLfZTnXIodnO+5bXP7iSvA3Pvuxyu/TLt3r9b2mdi9R14TZ0P8DolyNOhAIjY1OieswJnFYbE2wf9MShD/8ytrw5vEHRMa9rLnyawqpy3GRvpyqszvXnvq6Pv9kPkzM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PX5VsAxl; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1876AC433A6; Thu, 11 Apr 2024 05:41:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712814117; bh=RJUrOT3501HyBBPzrkesvvBDDHFyiVAUaxFIjmMpLgQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PX5VsAxlgKsa8cIbWeVLSCXZKu9o68lSgcISoWXGPTDwQQ+fNA/Wi/0d+peENEd6q Y4VW42xr+QXnn4lygcKbt0AASg/6CqLc/ZZcjTD122UcAWVmH20vFR7ms9kOsOW5IW Vofopajve5+MsvsVoeRk/a9YaEmoobkIVJO0qO5aFfBuinVNjCFaG/fgIs2rsIIqEX YuG2TqgUkWnNGkxmNY97W2QJVT63CPw7ocaCvW+HoUhnOB+aSAwa8Bnk31tWjGjjlr as3c12nMz8CyPA9ZwRTBcRSvs2+VX82OwKcSgmcrO5hCOYoG0n6pT1jykXn1R3HQRc 2W7X0XdFTSpTw== From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Linus Torvalds , Daniel Sneddon , Pawan Gupta , Thomas Gleixner , Alexandre Chartre , Konrad Rzeszutek Wilk , Peter Zijlstra , Greg Kroah-Hartman , Sean Christopherson , Andrew Cooper , Dave Hansen , Nikolay Borisov , KP Singh , Waiman Long , Borislav Petkov Subject: [PATCH 1/7] x86/bugs: BHI documentation fixes Date: Wed, 10 Apr 2024 22:40:45 -0700 Message-ID: <8c84f7451bfe0dd08543c6082a383f390d4aa7e2.1712813475.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Fix up some inaccuracies in the BHI documentation. Fixes: ec9404e40e8f ("x86/bhi: Add BHI mitigation knob") Signed-off-by: Josh Poimboeuf --- Documentation/admin-guide/hw-vuln/spectre.rst | 15 ++++++++------- Documentation/admin-guide/kernel-parameters.txt | 12 +++++++----- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Documentation/admin-guide/hw-vuln/spectre.rst b/Documentation/admin-guide/hw-vuln/spectre.rst index b70b1d8bd8e6..3cf18e4a1d9a 100644 --- a/Documentation/admin-guide/hw-vuln/spectre.rst +++ b/Documentation/admin-guide/hw-vuln/spectre.rst @@ -439,11 +439,11 @@ The possible values in this file are: - System is protected by retpoline * - BHI: BHI_DIS_S - System is protected by BHI_DIS_S - * - BHI: SW loop; KVM SW loop + * - BHI: SW loop, KVM SW loop - System is protected by software clearing sequence * - BHI: Syscall hardening - Syscalls are hardened against BHI - * - BHI: Syscall hardening; KVM: SW loop + * - BHI: Syscall hardening, KVM: SW loop - System is protected from userspace attacks by syscall hardening; KVM is protected by software clearing sequence Full mitigation might require a microcode update from the CPU @@ -666,13 +666,14 @@ kernel command line. of the HW BHI control and the SW BHB clearing sequence. on - unconditionally enable. + (default) Enable the HW or SW mitigation as + needed. off - unconditionally disable. + Disable the mitigation. auto - enable if hardware mitigation - control(BHI_DIS_S) is available, otherwise - enable alternate mitigation in KVM. + Enable the HW mitigation if needed, but + *don't* enable the SW mitigation except for KVM. + The system may be vulnerable. For spectre_v2_user see Documentation/admin-guide/kernel-parameters.txt diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 70046a019d42..a029ad6c4963 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -3444,6 +3444,7 @@ retbleed=off [X86] spec_rstack_overflow=off [X86] spec_store_bypass_disable=off [X86,PPC] + spectre_bhi=off [X86] spectre_v2_user=off [X86] srbds=off [X86,INTEL] ssbd=force-off [ARM64] @@ -6069,11 +6070,12 @@ deployment of the HW BHI control and the SW BHB clearing sequence. - on - unconditionally enable. - off - unconditionally disable. - auto - (default) enable hardware mitigation - (BHI_DIS_S) if available, otherwise enable - alternate mitigation in KVM. + on - (default) Enable the HW or SW mitigation + as needed. + off - Disable the mitigation. + auto - Enable the HW mitigation if needed, but + *don't* enable the SW mitigation except + for KVM. The system may be vulnerable. spectre_v2= [X86,EARLY] Control mitigation of Spectre variant 2 (indirect branch speculation) vulnerability. -- 2.44.0