Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp309359lqh; Mon, 6 May 2024 22:31:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXjRdzmRKdQcztmiZ+p95XdgEP47GPb271w7GoyVdex3aVuWNmBWmpYqn8D2ePrvKRkaza78DbYK6blDmsg0vG6YUci4uo9RTGImNX5TA== X-Google-Smtp-Source: AGHT+IFGjD5Xd0LNI1/UND8eg6+guSGnapr6XZTcVx/0bZit0+0QAJ/kUIO2xw0PZVUxC6DTa1WW X-Received: by 2002:a17:90a:ac18:b0:2ab:87c3:d12c with SMTP id o24-20020a17090aac1800b002ab87c3d12cmr9877489pjq.2.1715059889723; Mon, 06 May 2024 22:31:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715059889; cv=pass; d=google.com; s=arc-20160816; b=K1kbqWNFES1hZ+FbuOC9Pp/Zg1d2ce7U+UOqIrqQMRj73cGJMVbE8dnIPdfrM/kgcV f8/qdiBgt1z0TNH7YDw2U/MVAaAmMKeuNjNaneNYFfSmiVp/SOyDJABjkbEeccc1cxC+ Yn7Oe5LYc3nfHzZG3j94yvO1dR4UYqjBQzZREHXKpqQYRNdDELVNQmIJeUcsrqg97pc7 8NYAGFG9Yr2m0AmQlzUEzzL0UPyBA0RBIF0rehB4lj0IczK3S6VqCrC0+95cGk5OMGQd 69g+Q/ZQK2eVo/lIgn2/X/l25JlsEm/nYaWVTnZ7+Gwj5yW0RsMHcsxNbiZtn8YRxrCY jebA== 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=RgAHSQzSH5JOZ5nhflpEFTGL9VJhtxsspgCaVuAUE3Y=; fh=D1drUkjhd6cQ461FGcgjExl1O+jZ7EhaGJAtOyxVAPQ=; b=ITZhEAlTW7/pmYPKpzIyDHIWtU+VCesIr0hKFFe7ZtbW5UBzaoyKxrv6LxOgEXaldw 3NSQ+SgEvQcirYV+LZ5QfR+s9xqUJnpq4BNDjoDigeckNnVRh+5/FDlC0lKrIXmJtt8j 87WcAP12bWwJsB7xOya4t++UP+dZis322zEwji+u0Pc4VuPEotUjeBySrGE1vyZXsoqb uVNw+7VRgbA/shWRIramTo7Dbmmi04WsZ5OtRTby/8mC5zmBu91suX6z8nlhon/IPbsK NtuYt3EIlzDwmQlHEqjBWLxQlPFhkztdkpi3rph0jLIcvquT6KaJKW5k45XY6E9rwAsz 06mg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LFouRxV1; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-170694-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170694-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id lt20-20020a17090b355400b002b32e35fc7asi7565920pjb.167.2024.05.06.22.31.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 22:31:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170694-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LFouRxV1; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-170694-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170694-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 48E39286D71 for ; Tue, 7 May 2024 05:30:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C5F606E5FE; Tue, 7 May 2024 05:30:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LFouRxV1" 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 EB1766CDA0 for ; Tue, 7 May 2024 05:30:16 +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=1715059817; cv=none; b=gPa2nD1gfMwK71wSRSTWwNC5qATImsWplOSREeEAooYiw1uK74KBOCmD1wqO+NKiDPiDI6sRfLDrzToiiCEpKXTsVpQjDZ6HQYSIkjGwEHdKf8Vv0HlgvP8wYQX/tLNnaj+oFdaZs39aaj/HZ2oPxZj6hi0KydaLKaCarq2E8CI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715059817; c=relaxed/simple; bh=2XWzJuggqdkJpIwIhJYrHAlr+6tDiUNf1CJRhn6Hg/U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=o1cMzt0XW8LHK50+9KNdPvwD3gqxhuk4R/OyRedSbZIdO5oCNCCcU+4VvBWGiWmdI4OOtawD6ZDNMfobViOLkPeEZS+JeP/WAJA45124WW0sgaMV2T31rAg4SsPM0FWKuvziU/GMC9t6eMgGfQH05IFOuc4B36DjK3LCXPMgY2Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LFouRxV1; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B82CAC2BBFC; Tue, 7 May 2024 05:30:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715059816; bh=2XWzJuggqdkJpIwIhJYrHAlr+6tDiUNf1CJRhn6Hg/U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LFouRxV1SP6C7lHXFAJ9qwPjuT7MqVhEDOAQ0cuKyPEw9Javd0m9EITQ9LX2ortYv PClEWv3ZlKxVuwuZMcqwnlzl7Kjx2jXwh+02ts3T/ezfPJkupQdd/Hgj7Ca0w34Xws fJJb0GBdlYgkYMtcFk0h98yPcZxGirDXUVd+RvgV4r2ZHCMEHREiwr+CVpvmRKtwS1 8wCbnaQJb8HyQgivbQ2neRcRhFy2OcCgtB22P7cEnGk8+AUIIl0gBrIh+Np+0eqPy6 e+QNSTzvsuADcOhTcGi0zoBBP+sSLD/6XAFLVlSTwnbcTMw8RF1E4xKulqu77FkT1K m69kB/pspqq4A== 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 , Ingo Molnar Subject: [PATCH v5 2/3] x86/bugs: Remove duplicate Spectre cmdline option descriptions Date: Mon, 6 May 2024 22:30:05 -0700 Message-ID: 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 Duplicating the documentation of all the Spectre kernel cmdline options in two separate files is unwieldy and error-prone. Instead just add a reference to kernel-parameters.txt from spectre.rst. Signed-off-by: Josh Poimboeuf --- Documentation/admin-guide/hw-vuln/spectre.rst | 84 ++----------------- 1 file changed, 9 insertions(+), 75 deletions(-) diff --git a/Documentation/admin-guide/hw-vuln/spectre.rst b/Documentation/admin-guide/hw-vuln/spectre.rst index 25a04cda4c2c..f9797ab6b38f 100644 --- a/Documentation/admin-guide/hw-vuln/spectre.rst +++ b/Documentation/admin-guide/hw-vuln/spectre.rst @@ -592,85 +592,19 @@ Spectre variant 2 Mitigation control on the kernel command line --------------------------------------------- -Spectre variant 2 mitigation can be disabled or force enabled at the -kernel command line. +In general the kernel selects reasonable default mitigations for the +current CPU. + +Spectre default mitigations can be disabled or changed at the kernel +command line with the following options: nospectre_v1 - - [X86,PPC] Disable mitigations for Spectre Variant 1 - (bounds check bypass). With this option data leaks are - possible in the system. - nospectre_v2 + spectre_v2={option} + spectre_v2_user={option} + spectre_bhi={option} - [X86] Disable all mitigations for the Spectre variant 2 - (indirect branch prediction) vulnerability. System may - allow data leaks with this option, which is equivalent - to spectre_v2=off. - - - spectre_v2= - - [X86] Control mitigation of Spectre variant 2 - (indirect branch speculation) vulnerability. - The default operation protects the kernel from - user space attacks. - - on - unconditionally enable, implies - spectre_v2_user=on - off - unconditionally disable, implies - spectre_v2_user=off - auto - kernel detects whether your CPU model is - vulnerable - - Selecting 'on' will, and 'auto' may, choose a - mitigation method at run time according to the - CPU, the available microcode, the setting of the - CONFIG_MITIGATION_RETPOLINE configuration option, - and the compiler with which the kernel was built. - - Selecting 'on' will also enable the mitigation - against user space to user space task attacks. - - Selecting 'off' will disable both the kernel and - the user space protections. - - Specific mitigations can also be selected manually: - - retpoline auto pick between generic,lfence - retpoline,generic Retpolines - retpoline,lfence LFENCE; indirect branch - retpoline,amd alias for retpoline,lfence - eibrs Enhanced/Auto IBRS - eibrs,retpoline Enhanced/Auto IBRS + Retpolines - eibrs,lfence Enhanced/Auto IBRS + LFENCE - ibrs use IBRS to protect kernel - - Not specifying this option is equivalent to - spectre_v2=auto. - - In general the kernel by default selects - reasonable mitigations for the current CPU. To - disable Spectre variant 2 mitigations, boot with - spectre_v2=off. Spectre variant 1 mitigations - cannot be disabled. - - spectre_bhi= - - [X86] Control mitigation of Branch History Injection - (BHI) vulnerability. This setting affects the deployment - of the HW BHI control and the SW BHB clearing sequence. - - on - (default) Enable the HW or SW mitigation as - needed. - off - Disable the mitigation. - -For spectre_v2_user see Documentation/admin-guide/kernel-parameters.txt +For more details on the available options, refer to Documentation/admin-guide/kernel-parameters.txt Mitigation selection guide -------------------------- -- 2.44.0