Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp178464lqj; Wed, 10 Apr 2024 07:31:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUdMnP4ucRPln0yCt+x5ep/Mmn6YVKWwnGJxrL6kqYWoGy5PST1yL/h4TrP1J/FqgK/ocnIt9YMPR7GsYI2KHDy33OSiQgEPavZFRkutA== X-Google-Smtp-Source: AGHT+IGZJRzw/Js5QkVRKdEDbGmTXo7fgp7vznx9d8gCHQLB9ObjFrDUU/pGv1DZ1G4A4wVndAg5 X-Received: by 2002:a05:6870:d184:b0:22e:8647:7570 with SMTP id a4-20020a056870d18400b0022e86477570mr3520905oac.54.1712759497605; Wed, 10 Apr 2024 07:31:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712759497; cv=pass; d=google.com; s=arc-20160816; b=oN9U0mY0qulzj+zfT2gcWSW6Bsi+Qe59wBhNDwbYDbfILTjp9UBbzOYjoVNBhMjRER 1dk7S0T1PZBZzpCb47W3677mQR3DIBOIqNciL8rQvETHK2UDTjehicHdSbAaPC0j/8zQ z5cN9Neh816HZjrWOG85cP/TjpljKwv6Isi9wFVpxQdNPo8+tCstjRhD77+i/eZjfchr 1sq5WUzCUPmBI5+XRt4i7lg6D6wxjTvLGLpEudcLskoBmu0RqUOYi55zqGRJG8/1oQWs sG/tG+V9oc7o8sHTtTQbc+UGICS7PwXKpYp7wUSBS4jGn52Ij91KSah5no9pJXLkyOVb MI4g== 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=pxVO6IH2aKWgClrF7W/S2towoDPaWd3E2DJSD4+8qmw=; fh=PE2AfA+e3mCa+iWAt+BhD4BETW5pGl05DxD1LfFwCec=; b=MrDZhXyQOO2HPNkPkOgoXLt4r+6ohHLVPR/9cWnyR0tcTWZ0QVmhZYNN1foWNuF26M rEdSeZRQBKIEl3Ol79OrJD1rfVxvSFi2NgOhJlxrIbwEJhHQ4MHqZG7eSsDEL5zW82bk OcEcfjp2/KQA1X+n5D/v8Hcbwd2WeW/wCUtHmGE0l5iE1J+hvGW1LWCz2MyQEHjaqQnS Vdo+qnEcGnGDy6SUwbd4DKrDyVa9g0YM4OFGihhqjHnG6hXTH1ky7jbVV7+ym0l8hX0T 7jTnts4go+YruWHXhf1Rwjgpn7+9HMtrJ+xSuXjEa7hntjs2nAYwcn0t9tky7410fvTC fkYw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=F2WZ5N5q; 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-138752-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138752-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. [147.75.199.223]) by mx.google.com with ESMTPS id u7-20020ac858c7000000b004348d65e03csi8093916qta.136.2024.04.10.07.31.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 07:31:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138752-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=@linutronix.de header.s=2020 header.b=F2WZ5N5q; 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-138752-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138752-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 565E41C20370 for ; Wed, 10 Apr 2024 14:31:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AE42216D9BB; Wed, 10 Apr 2024 14:31:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="F2WZ5N5q"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ue1xY9Dk" 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 75A3716131C; Wed, 10 Apr 2024 14:31:22 +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=1712759483; cv=none; b=RfG7Lsr80bOr7yXCxtojbfW5wgjcKhAv5H8VX74Q3TPD61IkqtYQdDio2bnb6e9fSJdGj+mCo3YpVYnAttl4DIQcGNAtuvr5fl1YbD2kl1p+4Gtkyo5gq5weA11rQco6lyylLNjZuz8hhq8Amv9vmrW/Xv9Xh6rmnqaRa/Cf9Is= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712759483; c=relaxed/simple; bh=OGX5xmHt8QB4zrJj4PlvpFzX8zpWwHB+DHJ1mYOEqPo=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=ZYedL3fJXmw59u1P9bJSxSjwIJIChio8k5NM0LizLKFbqCKqwdsfQj1PRomAVd3URngkPJL5I3TLVHr3nGdBSrkir/QQ8vdPrLSqbiE89xYYhvgWMtd9hf7PuP6CT+T/IDAS/4Wx1FKye1yV2ngdLpetvauHg2S00iBV0vFHk1k= 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=F2WZ5N5q; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ue1xY9Dk; 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: Wed, 10 Apr 2024 14:31:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712759480; 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=pxVO6IH2aKWgClrF7W/S2towoDPaWd3E2DJSD4+8qmw=; b=F2WZ5N5qQlnKKSeXgYTtBmsdvUXw2IwBS0VMZvXLtSY2zvQ09DIyswwZcH52FO0S5kfMPq 9JdLaBjeB8bUKLK7/5f0/tFDKVSVy+aToobxJer3jkqmgs1+QpHwQMJjTIpmBsjA/HqSK8 Ll+fMkqiWxW7j7Sc5ZEoiAGpM31zK6uWqRku1eTHESjB+HQ10ytx+7Vn3G52rbMJdU1HCb HJOIUrtkrsaNHKRrRf+RZ1wIKYUsQP6WP0N52Y2idv9Z1vGeWYyWFIp5/RTBcT1Drhsvyn vDC4sugs6OaLw9IjnWkhseg6HdQYTnfSNHDZUA3LJ00xyA0d5QKPsjmXAzDEDA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712759480; 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=pxVO6IH2aKWgClrF7W/S2towoDPaWd3E2DJSD4+8qmw=; b=ue1xY9Dk6GYFvryU4dZFqI8uCAToeuYMjxCiVvlZwddN5+EZ3+fwxDlOu1rX/hx4r85Vs4 NH5mRDTw6FBm6aBg== From: "tip-bot2 for Sean Christopherson" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/urgent] x86/cpu: Actually turn off mitigations by default for SPECULATION_MITIGATIONS=n Cc: Sean Christopherson , Ingo Molnar , Daniel Sneddon , stable@vger.kernel.org, Linus Torvalds , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240409175108.1512861-2-seanjc@google.com> References: <20240409175108.1512861-2-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171275947986.10875.18301514121591592136.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: quoted-printable The following commit has been merged into the x86/urgent branch of tip: Commit-ID: f337a6a21e2fd67eadea471e93d05dd37baaa9be Gitweb: https://git.kernel.org/tip/f337a6a21e2fd67eadea471e93d05dd37ba= aa9be Author: Sean Christopherson AuthorDate: Tue, 09 Apr 2024 10:51:05 -07:00 Committer: Ingo Molnar CommitterDate: Wed, 10 Apr 2024 16:22:47 +02:00 x86/cpu: Actually turn off mitigations by default for SPECULATION_MITIGATIONS= =3Dn Initialize cpu_mitigations to CPU_MITIGATIONS_OFF if the kernel is built with CONFIG_SPECULATION_MITIGATIONS=3Dn, as the help text quite clearly states that disabling SPECULATION_MITIGATIONS is supposed to turn off all mitigations by default. =E2=94=82 If you say N, all mitigations will be disabled. You really =E2=94=82 should know what you are doing to say so. As is, the kernel still defaults to CPU_MITIGATIONS_AUTO, which results in some mitigations being enabled in spite of SPECULATION_MITIGATIONS=3Dn. Fixes: f43b9876e857 ("x86/retbleed: Add fine grained Kconfig knobs") Signed-off-by: Sean Christopherson Signed-off-by: Ingo Molnar Reviewed-by: Daniel Sneddon Cc: stable@vger.kernel.org Cc: Linus Torvalds Link: https://lore.kernel.org/r/20240409175108.1512861-2-seanjc@google.com --- kernel/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/cpu.c b/kernel/cpu.c index 8f6affd..07ad53b 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -3207,7 +3207,8 @@ enum cpu_mitigations { }; =20 static enum cpu_mitigations cpu_mitigations __ro_after_init =3D - CPU_MITIGATIONS_AUTO; + IS_ENABLED(CONFIG_SPECULATION_MITIGATIONS) ? CPU_MITIGATIONS_AUTO : + CPU_MITIGATIONS_OFF; =20 static int __init mitigations_parse_cmdline(char *arg) {