From mboxrd@z Thu Jan 1 00:00:00 1970 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 C11A914A83 for ; Thu, 11 Apr 2024 15:25:01 +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=1712849102; cv=none; b=tV/ARM7hW4zur1vKTn3Jj7CjUG+94NB1UjQW4bhyLHZ5Oa9cDb7TFDRvN+1bp/OGVDDY2aApbnnYvnHixfj3WpmkIJYbkwmFQAkPLDnewdbBl0e5oSYDiDKBI3XPvHlGu+slVfe5w+63mIGbcUpB2gE7Os3fOwi8yzIDDy8NYOY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712849102; c=relaxed/simple; bh=txhQwj0RH6HuEI7sGViKR/jkLhrL9FSe2rh8HBbOiow=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gKjThqRdxAeRoAnObdpsVE6z0Z9UtUXNd7obTXPnOnOhmBM/u40zmBP4AY+IKbmzIfEcpRsf/nnjjSdFtL/iAHnTAG01maGV0suDGMd9s6rScBDWLrOhK9tumFDIlqQ2NCD6wIHhGOKiffKOEN65gL8fCWs0HjrPojLuePSr8x8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oDwA6l63; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oDwA6l63" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29E07C113CD; Thu, 11 Apr 2024 15:25:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712849101; bh=txhQwj0RH6HuEI7sGViKR/jkLhrL9FSe2rh8HBbOiow=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oDwA6l63qRBVtrk5OEmaEso5morlwUcROxXGcUmH9UsHlslvvITD9RSG6K5xT5Y7G UVL/KBHNv8ve8hqbm5tEMZTV1nj9TKK67L3cUYpcAlZujmlYzQKuuXUs/pDzpaFfs9 Sbmk4v+offDN3CM7daL4zGS562rhWXK2/opwpB7Z6XWCEyZwStqn8KSJgnW53N0vsq +WbwqpTmfPQwngXrbKrJWrPe+nIEylZo+wNgh/+mJwwCQU3EXIaVlThlD2b+JXb/dM D0NELXXd1Kt11xeqk4IEPa0FkGT0i1nuU/kNoJhs6rg9EQJ/4sM3rCGCneZNXrYViY 8dD+PjOY+gsDA== Date: Thu, 11 Apr 2024 08:24:59 -0700 From: Josh Poimboeuf To: Ingo Molnar 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 , Sean Christopherson , Andrew Cooper , Dave Hansen , Nikolay Borisov , KP Singh , Waiman Long , Borislav Petkov Subject: Re: [PATCH 7/7] x86/bugs: Replace CONFIG_SPECTRE_BHI_{ON,OFF} with CONFIG_MITIGATION_SPECTRE_BHI Message-ID: <20240411152459.53ofd6hmhfzgi6td@treble> References: <3833812ea63e7fdbe36bf8b932e63f70d18e2a2a.1712813475.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 Thu, Apr 11, 2024 at 09:48:42AM +0200, Ingo Molnar wrote: > > +++ b/arch/x86/kernel/cpu/bugs.c > > @@ -1628,7 +1628,7 @@ enum bhi_mitigations { > > }; > > > > static enum bhi_mitigations bhi_mitigation __ro_after_init = > > - IS_ENABLED(CONFIG_SPECTRE_BHI_ON) ? BHI_MITIGATION_ON : BHI_MITIGATION_OFF; > > + IS_ENABLED(CONFIG_MITIGATION_SPECTRE_BHI_ON) ? BHI_MITIGATION_ON : BHI_MITIGATION_OFF; > > Uhm, after this patch there's no CONFIG_MITIGATION_SPECTRE_BHI_ON anymore, > which is kindof nasty, as IS_ENABLED() doesn't generate a build failure for > non-existent Kconfig variables IIRC ... > > So AFAICT this patch turns on BHI unconditionally. > > I've fixed as per the patch below, but please double check the end result > in tip:x86/urgent once I've pushed it out.. Oof, thanks. The result in tip looks good. We should add a permanent build time check to catch cases like this. -- Josh