Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp209479lqd; Tue, 23 Apr 2024 22:38:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUryiGmJIC4QmKCbhJyuQRXzPCmg1ritO3r5nNBW5bJpS6lTbe3uSaZj30pIfX+5PLqj4sS5kjzxTOwwEj5NiIFcMjPfHS/iB8XPfSUnw== X-Google-Smtp-Source: AGHT+IHiVYHFgxgBRN91vUB0M7rTjH+NpTtP3rse3J2axc8ndY3ffCs7p0g+Zx052bhGKANOv5E5 X-Received: by 2002:a05:6a21:1798:b0:1aa:5b05:7925 with SMTP id nx24-20020a056a21179800b001aa5b057925mr1606344pzb.4.1713937125734; Tue, 23 Apr 2024 22:38:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713937125; cv=pass; d=google.com; s=arc-20160816; b=nfMHms2gFIqzHYn4pptwdscu6iOXmrP+PDqpm8cIbhD7t3MtORg7C6/u5m7W1Kl+LM +Rr8NyWlJgC9w8tQvv7WmP8oSexQJ4N4IL5yVJCtsYsgBOKsIz8w7+ldGorNSpwCkEkZ YgLQNkqXxS6q00arAbv2lj20T/6UTFhxN9P7f85491bilKmPbw35lBxyOXfjUY+YEUCq oAvEX8XCxkltLn7Diln2IRvfPTn6ce/6hkDvD61fN2+Ycc5P7r+TzggBYf7sXg5HT/oT PCC5M8H2DDESzX/zEf38MOqDs0SdJI91BUi6WLX89j1VADHg+uAKfjNCfv8n1G0QhzcY Hs0A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xVXS6GE+nvqHTbnbGau25hI+UhlIsXpNIhfY5Xx/3xQ=; fh=n7cliQ4HFgozDRhIsYgtU9ja6s/RVWF5pv+bgDdfGws=; b=Gk39ED14Sy/YfIUPwgTZQdCt6RgMWLPUDk+VPF++MWH30GyuBRoQJGUgnymxRs8WR6 yA4nFA51HgZTKTYZZTLoDbXJDVEN4jD2cCGEzX1Pu5PTC4pFgbP/BpAqVNxmD2CN2oSZ AL/FbM8Shw16OE+UetEHptT1lY5cRtFTlX8+bcUGo88K9bzEHwx4oWdnh35ilnzyju0b KEW7n2Y7xYpw7RkheV1pkE64W7EopdUTGXt6YPyo2K9b/HyiPTyf9B3K9zHzlsmPiKyP zIDJ8Et17yY0BNO3Eurk8J/XVeqAczakk/xXvQjK9QpIHcqf07C4zlS63P4FeATL+wai QpUA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a+odHiyU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-156320-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156320-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id gf1-20020a17090ac7c100b002a503b8a00bsi12530490pjb.160.2024.04.23.22.38.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 22:38:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156320-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a+odHiyU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-156320-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156320-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id F36DBB22A2B for ; Wed, 24 Apr 2024 05:38:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3B14115667F; Wed, 24 Apr 2024 05:38:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="a+odHiyU" 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 65B5413CFAD for ; Wed, 24 Apr 2024 05:38:09 +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=1713937089; cv=none; b=tBkRH5oxx9pjuEuykkZGx1gQiXfz/LXja0BFsijyU9+jj33mDB2eakE5ZkQKsntMfemNkQrH0Nkov1YVdzk81/Eq8Eg/eLNLmB0gUNqKqnSyjSbh/8Lrd9W+IbAiEiCQaG3nMcu27XTDrYJFSAF9bYkMAQjRwT6wvYGnPaYrW/g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713937089; c=relaxed/simple; bh=IlbcZ8F41Wfapy7sUdM5dRgxbyIGgYyViKkqCfKnQ8U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SwajPj2XovPBg3Jrquz1SzvMAUwfNZDxrWwwNnwdLL+FzbTMl2k5UaTELwRwmdDdIFYPJRBd6tiqpH0Zmw6L/tylpdLg2I9zazQenk4F268U2phsZMLTctJT1JZpoKzd4FuoX967rQy/gvPzwK4XGnXeN3vnymZgGUq8/3uz4i8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=a+odHiyU; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E87AC113CE; Wed, 24 Apr 2024 05:38:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713937088; bh=IlbcZ8F41Wfapy7sUdM5dRgxbyIGgYyViKkqCfKnQ8U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=a+odHiyUXaEWCWQH/Qqpcyqm3gvbgcKeCmHl6RsMaZU5thY13uJfaJPTsyN4RDEGX bxm7B+YSchqAlG2C9dgG4cURcQLDH5u/xqi1CeSgzatv6D1PkS3JAR8t9u8E+Iu6KQ tc7OdcT1L0FjbNr7kFUT+avPod5wfluTbYtErESPkQfW1hIBzu98e3qZqC2KeYKgyF 0KKvgpDLbhSrcIFfmjjq2b6LSLhwv+zUQcn0oNqnTIcvunQzZhDKLQYDHO4nQT1SEM BBkuTCTD5vJFAfdgaIHyO/dJ0K+fx1G07wjtIMrIH9n9LY72SDPrISkYTxAQzPTMrh njhHGAKrJJ4SQ== Date: Tue, 23 Apr 2024 22:38:06 -0700 From: Josh Poimboeuf To: Sean Christopherson Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Peter Zijlstra , linux-kernel@vger.kernel.org, Stephen Rothwell , Michael Ellerman , Geert Uytterhoeven , Will Deacon , Linus Torvalds Subject: Re: [PATCH v2 1/2] cpu: Re-enable CPU mitigations by default for !X86 architectures Message-ID: <20240424053806.5u5klchl3pvqu2zw@treble> References: <20240420000556.2645001-1-seanjc@google.com> <20240420000556.2645001-2-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20240420000556.2645001-2-seanjc@google.com> On Fri, Apr 19, 2024 at 05:05:54PM -0700, Sean Christopherson wrote: > Rename x86's to CPU_MITIGATIONS, define it in generic code, and force it > on for all architectures exception x86. A recent commit to turn > mitigations off by default if SPECULATION_MITIGATIONS=n kinda sorta missed > that "cpu_mitigations" is completely generic, whereas > SPECULATION_MITIGATIONS is x86 specific. > > Rename x86's SPECULATIVE_MITIGATIONS instead of keeping both and have it > select CPU_MITIGATIONS, as having two configs for the same thing is > unnecessary and confusing. This will also allow x86 to use the knob to > manage mitigations that aren't strictly related to speculative execution. > > Use another Kconfig to communicate to common code that CPU_MITIGATIONS is > already defined instead of having x86's menu depend on the common > CPU_MITIGATIONS. This allows keeping a single point of contact for all of > x86's mitigations, and it's not clear that other architectures *want* to > allow disabling mitigations at compile-time. > > Reported-by: Stephen Rothwell > Reported-by: Michael Ellerman > Reported-by: Geert Uytterhoeven > Closes: https://lkml.kernel.org/r/20240413115324.53303a68%40canb.auug.org.au > Fixes: f337a6a21e2f ("x86/cpu: Actually turn off mitigations by default for SPECULATION_MITIGATIONS=n") > Cc: Josh Poimboeuf > Cc: Will Deacon > Cc: Linus Torvalds > Cc: stable@vger.kernel.org > Signed-off-by: Sean Christopherson Acked-by: Josh Poimboeuf -- Josh