Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp208693lqd; Tue, 23 Apr 2024 22:36:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVWF/7nTw7OFQHZSZcOef8wdEMcy7FjseLShdb/xFqCMimXkpMcQez8DVxeWAQiX9KAXswAEyDX9v+U+rlUmCwktUmCMNQCtzbgBDrXXA== X-Google-Smtp-Source: AGHT+IFVd1x5ydrPdyUjsXftV+5R2tCqpLMFGxtqJMsjHoqZiK7RWUfhfxTWdQZVvllcCjtlGH2w X-Received: by 2002:a05:6e02:b21:b0:368:c433:51db with SMTP id e1-20020a056e020b2100b00368c43351dbmr1931423ilu.23.1713936964495; Tue, 23 Apr 2024 22:36:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713936964; cv=pass; d=google.com; s=arc-20160816; b=mwWWcxdm96+nv2Diy+CzN84CS19GBhSh3EVqFJK0/v5oOlHUOvPUhOJ+qbJ6sg8m1R udAdnWcR/Jx6VcRFzi314AhcQpqMohbHlonhqoXothtU/V9SUWH8I81YdoxyjBHUXOL/ VS3iBpKtDuPDJNU+xW6hFVzFVO3XmcsdAnSfRJf+dggvZnIXazG9/mI9h2Qn3lt7H5T2 NYMXmnN1FZZAwy3gtKNARnink3xCf+9+fpvfqg7pGQvipX621DJwCXNze6JA0Y0LHsyF kywlzIJ8OoDiAChjPp60C/TLl7Ycda2TifaH5spd8hECWe50zkYlod7YZgOBbPOjfSMI 8kCA== 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=/CyNBke6uV7kCHHq3e99ciY+9310Gjk0r2HmU7UDOEc=; fh=6iEQOK0lUcFckgqLUfnTpHtHpn4khv32YwQR7TmFgvw=; b=SeasxyvfAyUlcwrFt0VUiYbAeup9T4nkZqm8exFwNf/I8TdWYwGE3JamUygLlmzPW8 EGVzsVQmRWXi0+q2ulrXFbKy+YbLIINV5dY/y66qRf0K6LMBu6qUqGgZLe2w4jJGn841 cxq0epVY45u6rjb1C79f71/hXryq7TEXug5z+eN1AEHEu4RK/jA7iFJf188hVHu2gXMP 01zs2MyTKTOlR8LhYSwO8mTk0w3+iLCWvJOdI3LjG2Et9c/cw1xRUld1A+mInrJaEFUT ZqQY37BT6kL9sWShwFlob0vccYZRuH5NFBBxKbnxz38MeD2zHotfFWZHAuUUzrvMP53P 2r3A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=me6Gb6RE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-156314-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156314-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. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id l13-20020a63f30d000000b005f3c5cf0de8si10385987pgh.233.2024.04.23.22.36.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 22:36:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156314-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=me6Gb6RE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-156314-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156314-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 EF344B2354B for ; Wed, 24 Apr 2024 05:35:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F1AA315688B; Wed, 24 Apr 2024 05:35:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="me6Gb6RE" 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 1D177156880 for ; Wed, 24 Apr 2024 05:35:13 +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=1713936914; cv=none; b=D7SLkxki2kcINc5ZBBAP1dSCBd/IbAG0fw9Ljv0RauRdTy0brg1hCb78sSR3ehjeL/Zvowebibroy0ZyPVu5xO0KyTch2sQF2rWPmJkJH8vxcMIRDAFKMsYthOyKvc7s2sVTaW2Mly3UR4I5ohmii8knK/OrSWeMFWY892r2VIc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713936914; c=relaxed/simple; bh=Jn60dYRd1TpXyCZr+gNbLZI2wVr5L4k3MosQ5rxQ7qI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=a0MpnedCSB0fC6zblL8ytP5y0D7ZhPw95Yr2nuZhUTSlRrIUWkRF+hAske3la9vrLAot8yNkkLHlapMgRT8NxyghPjDo3yvxc4Pw+03PoOY1wJi3rNYla4+K3TgqwVkRJBBGOiHbhWxoHHgVBBli+QBlMUx7oYQwufsdiYtHcWU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=me6Gb6RE; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CCD0DC2BD11; Wed, 24 Apr 2024 05:35:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713936913; bh=Jn60dYRd1TpXyCZr+gNbLZI2wVr5L4k3MosQ5rxQ7qI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=me6Gb6REqEGYDSgYaLVysK5rTC3FApIW8/DgWMIAHN4p1u3QswSoRh8VwHmCNdEdi 0Qp4yfmWcMElMmp2jdFRidrf5pJblWD6ehNyj7NhuTtJL6NwWCa7EI/hZvfbxr3EN5 jafbO1E2767NcasRIql5YRa+uRfshrdkUjYIKwWUEXleEE8k6igrPElxn6D9JClkJN 7CdIvrfgctJqUr1rbwnX3vycp+ezdY+W/ShyfQ8bBJiHv8Ws4vsjn+lH876yefNL64 1eC10b8vRgryE9PfJZzMDsC2x7n/wHqriZRAxFCBgnXR7FKmwnSgB5iT2/U0V12trg dzgsY7rSaJVoA== Date: Tue, 23 Apr 2024 22:35:11 -0700 From: Josh Poimboeuf To: Sean Christopherson Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Linus Torvalds , Daniel Sneddon , Pawan Gupta , Thomas Gleixner , Alexandre Chartre , Konrad Rzeszutek Wilk , Peter Zijlstra , Greg Kroah-Hartman , Andrew Cooper , Dave Hansen , Nikolay Borisov , KP Singh , Waiman Long , Borislav Petkov , Ingo Molnar , Stephen Rothwell , Michael Ellerman , Geert Uytterhoeven Subject: Re: [PATCH v4 2/5] cpu/speculation: Fix CPU mitigation defaults for !x86 Message-ID: <20240424053511.grt6tgt34wwpvzog@treble> References: <9d3c997264829d0e2b28718222724ae8f9e7d8b4.1713559768.git.jpoimboe@kernel.org> 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: On Tue, Apr 23, 2024 at 07:10:23AM -0700, Sean Christopherson wrote: > On Fri, Apr 19, 2024, Sean Christopherson wrote: > > On Fri, Apr 19, 2024, Josh Poimboeuf wrote: > > > CPU speculative execution mitigations were inadvertently disabled on > > > non-x86 arches by the following commit: > > > > > > f337a6a21e2f ("x86/cpu: Actually turn off mitigations by default for SPECULATION_MITIGATIONS=n") > > > > > > Fix it by replacing CONFIG_SPECULATION_MITIGATIONS with a new generic > > > CONFIG_CPU_MITIGATIONS option and moving the x86-specific mitigations to > > > a separate menu which depends on CONFIG_CPU_MITIGATIONS. > > > > Ah drat, I didn't check my mailbox until after Cc'ing Linus my own version[*]. > > > > I don't have a strong preference between the two, though I do think it's worth > > nothing that this will (obvioulsy) allow disabling mitigations at compile time > > on all architectures, which may or may not be desirable. > > > > [*] https://lore.kernel.org/all/20240420000556.2645001-2-seanjc@google.com > > Josh, when you get a chance, can you weigh in on my menu-preserving approach? > > I want to get this resolved asap so that we're not scrambing on Friday again :-) Yeah, yours looks good. Lemme go ack. -- Josh