Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp955492lqt; Fri, 19 Apr 2024 16:28:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV8ZVSBrNDceKM+yNrzppBUnUaDx0ist4M7vfD0ecgKh6NJSguMMjkQihNr0FGhZ8Nt0o4YHDZ109JQNR6V2ogITtkq+BtS0fycd520mQ== X-Google-Smtp-Source: AGHT+IGEQwk434WmDK3mOmueAiAakUP9iz5b1fHo8I8bDR+WsCjULnO26w/y2Bqd1Xxe6UWEsvsP X-Received: by 2002:a05:6830:1353:b0:6ea:30ba:37f9 with SMTP id r19-20020a056830135300b006ea30ba37f9mr4339034otq.6.1713569289262; Fri, 19 Apr 2024 16:28:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713569289; cv=pass; d=google.com; s=arc-20160816; b=Ri49jhXGXNG55Yk2nvI8eNIYSrr8Jcjrp+jWXrMDXO6dmV5OlfBj9L6biGNkmqXA8B ldaijcqfEU2znUoszUKPaeoGQ76Q6f6zKsKTxVQVzG8YFHYWQfjj0vo+cvu85tfW4ati hNAn0darMFSui2V0o/zDP0jw2IaLaJ3lJHYs+EPV/aLvw7H3kxQBqX8w3QrUhSdsBe16 bD4vSVMOcK+wgEy3bo+G4orh6oxD1++6H3nhnpgyax30tCTfz5+YoACS9Zx6KY53IrCc hRj4eHaIjzQzJt2c48V7G5fm5vaPojNIPT95eOCNsxOX2omjQpC9fyOZ2I5l/MRlQ3Bv 9CYw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=0COLxRjPIo77fJ3J44TSQPzwMK0xvmc5G2PIo/aN2Q8=; fh=nMhMXUgY4IumE4n+zAtkqrtcsVv0lwthk0uCZbyLkgI=; b=EHJKl4sMtiL+JGgI5R0O2zo9e5qfIf0np/ugQglxQz+PJcrwIFecTt0IqIOQbQKR1+ bh7ZfqX+27JhZp3PTA8B9n/8YScd+1bt83UGW3zk7QwcqhdmKNawP/Udjdw3cucj2rTD puzL5AIN2BTQdEPICkKfr6Cx4QS7TNS9lRbii4QanvqkQoxNGKrbTdZS1X+dtKXnYupx f3LjGjn7kXZWqbgDJJ9bHszAY9tXTXOyYFWHfULXb3o1Y+gvZpeXtOG22ZrGN1728T0Z 3kx0kTqoaK1gnAnnVqi0R8ytUxtUwdc6Q+obTtEtRn4J0Xj5DfFxI6CrRLCGLB7HK4+E 7qLQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=jRzCfYod; arc=pass (i=1 spf=pass spfdomain=ellerman.id.au dkim=pass dkdomain=ellerman.id.au); spf=pass (google.com: domain of linux-kernel+bounces-152016-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152016-linux.lists.archive=gmail.com@vger.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 e11-20020a63500b000000b005f0a5246e88si3793287pgb.392.2024.04.19.16.28.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 16:28:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-152016-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=@ellerman.id.au header.s=201909 header.b=jRzCfYod; arc=pass (i=1 spf=pass spfdomain=ellerman.id.au dkim=pass dkdomain=ellerman.id.au); spf=pass (google.com: domain of linux-kernel+bounces-152016-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152016-linux.lists.archive=gmail.com@vger.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 E6168B21707 for ; Fri, 19 Apr 2024 23:28:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DCAE113D890; Fri, 19 Apr 2024 23:27:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="jRzCfYod" Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (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 C0D9C64D; Fri, 19 Apr 2024 23:27:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=150.107.74.76 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713569273; cv=none; b=KMJ/nAYqM3R5uLkAwq2w0IZw5eOdlyZajKGios0i/HM1/GAXNq/gTRgLwkTNxmoyLW0vaqHnTjjk2Xx30TMbj2R37MrP8pMHwIqJqaWDQPxZscjHlRMf11OJOK5CE2ydddg7kZ3ZgIRD3jef6ly0RKOR2JBggheTiQxSiRMPIbI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713569273; c=relaxed/simple; bh=+Qx+phbbez3nCafVJWvHw2p/4Osq43K/uQphuHmnUwQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=mDLb4QCC1OCpKhSdW8ZmnRBcHAcCMtbFOnhoSI8wul1PvvMKFtgERjRx6owDsHjmJFUGurahqd0X2HAxBbGctE9dOfLmPTn9/KgJsAPs5CVdNkt/DC8/9f6lraX7aVMwBgRB9nrd/kM8lnannijdhQSuTp55OTTpu2vj20QleO4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au; spf=pass smtp.mailfrom=ellerman.id.au; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b=jRzCfYod; arc=none smtp.client-ip=150.107.74.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ellerman.id.au DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1713569268; bh=0COLxRjPIo77fJ3J44TSQPzwMK0xvmc5G2PIo/aN2Q8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=jRzCfYodBkOvSSB3DEIlwaJYIHkgEocozaQ66gtnmx5Gcv6SEyXG11mGfxhHYwSke WWOSHQ4aB+1bBQcWeYCAG4b09buYqx/SU3cEtl4pcEOrjy5qFSbteJsh+mrhevSvxn eX6sDRRAJTTN2fZJ5Uy9PDZF/YUOPbI4SFIogsdFCK/v4MXX8pdHgeJbEMx5Y0LjnH fPP/0ocARMSuF7TM+93Ar+IzQiu/3IzaNgE3E3diUMRA9RxmuUv/7ZvjuE8qz7Bo4T aqvOs5qIPJXQHQXCUrFvX7AAfrZi/wrUZtJbkVKni2l6MslwX2g82hcad7fASbUyd0 wQboUqWmZ1ALQ== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4VLrR66xPqz4wjF; Sat, 20 Apr 2024 09:27:46 +1000 (AEST) From: Michael Ellerman To: Josh Poimboeuf , Sean Christopherson Cc: Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Greg Kroah-Hartman , Peter Zijlstra , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Stephen Rothwell , Geert Uytterhoeven Subject: Re: [PATCH 1/2] cpu: Re-enable CPU mitigations by default for !X86 architectures In-Reply-To: <20240419160537.namt5yaxhhvwwa3r@treble> References: <20240417001507.2264512-1-seanjc@google.com> <20240417001507.2264512-2-seanjc@google.com> <20240419160537.namt5yaxhhvwwa3r@treble> Date: Sat, 20 Apr 2024 09:27:45 +1000 Message-ID: <87mspp9bm6.fsf@mail.lhotse> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Josh Poimboeuf writes: > On Tue, Apr 16, 2024 at 05:15:06PM -0700, Sean Christopherson wrote: >> Add a generic Kconfig, CPU_MITIGATIONS, to control whether or not CPU >> mitigations are enabled by default, and force it on for all architectures >> except x86. A recent commit to turn mitigations off by default if >> SPECULATION_MITIGATIONS=n kinda sorta missed that "cpu_mitigations" is >> completely generic, where as SPECULATION_MITIGATIONS is x86 specific. >> >> Alternatively, SPECULATION_MITIGATIONS could simply be defined in common >> code, but that creates weirdness for x86 because SPECULATION_MITIGATIONS >> ends up being defined twice, and the default behavior would likely depend >> on the arbitrary include order (if the two definitions diverged). >> >> Ideally, CPU_MITIGATIONS would be unconditionally on by default for all >> architectures, and manually turned off, but there is no way to unselect a >> Kconfig. >> >> 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: stable@vger.kernel.org >> Signed-off-by: Sean Christopherson > > It seems confusing to have two config options which have very similar > names and similar purposes (with subtle differences depending on the > arch). I agree. But can we please get Sean's fix into mainline before rc5. cheers