Received: by 2002:ab2:7988:0:b0:1f4:b336:87c4 with SMTP id g8csp6919lqj; Thu, 11 Apr 2024 08:28:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUi0gLVitJjzrY0qI9GgyqTukERodHVauv2s8CmoioiqfVxvx4gumroP354ZA0UWylZHAGuLlNsJ0tAiHF1yIzddN3MIkGDVppLhfZGeQ== X-Google-Smtp-Source: AGHT+IGqqI7xR1txKgjmXGC7LOXHb75d3xHNJS6I19B198fjDLA+XnPvmeffmxmHaKkFu2JFWJjt X-Received: by 2002:a17:902:9a07:b0:1e5:32f5:8f08 with SMTP id v7-20020a1709029a0700b001e532f58f08mr3352730plp.44.1712849287952; Thu, 11 Apr 2024 08:28:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712849287; cv=pass; d=google.com; s=arc-20160816; b=OskOvIq7ofy9faC4NC5fgFssw1GTq3u0Y2LGEjzwNHjxKvUIgQgRUUvBnwD/J1/io7 hfywnIUrSJA0NxNbe32UzVLHRm6wz6DdEcIocoUctvBdKqg9TsGOWsQ9WhT7EGRBAOdL Bg1gDkuEQ48SRHB9MzBJ1y+Pu4FHebdwCkQLJJCBOah90oU+weVI82Ta0B3KuCgRM/iL sRC3n69zfoDoyS9XzUOdQTu+hbYHZStp0FAlC5S9gq9xKXBrvF0lFY6HMk5Z6+U+Lzoi e1/nH4+TQFIRJ7vGbd+C72CBN31WBkC3wUuKTLf7Osww4HLzqQY1SMy/nciT8P13FZxa LL6Q== 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=CPfB6NJA3z+Eo+VrB+qmgybAIF70/RQLN8awckdPADs=; fh=H+k68uQL9JlVoSk3RqC3JOXCWd31EPA6ZJQ6XNu9XAI=; b=BKvqXFI4JxALUiPmjHU0WUM36RIQ79EtobwZnPPurGSgdXiiCuoBMILejHpCZBns4y px6cmrK79lDZP+LaGYy9uSgQsSwFNI/H036/T3kgxcp+7Bv8pQsj6CZWJUgfmoVeqOTg VB1nvnd2N+jq8WVw49RCkOXol9scjlB1Tdc+R2hp0ZUt3sgYCuueNmdTKalOvWs8qQv5 9BlcVjZ6ggJ3WMNHloFW94F2ylNREtUHVfdCxY4eq9EHslCezWqvRSGDLJie12sC5BPl WYl3r4CrnWBH2utwfRztjiEEf8rGJe4o0Qv84BFvwBpmW+74W8JE5GDkIWiYySRZWrxU NLtQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oDwA6l63; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-140744-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140744-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q16-20020a170902789000b001e4621295c7si1377683pll.344.2024.04.11.08.28.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 08:28:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140744-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oDwA6l63; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-140744-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140744-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A8DA9287073 for ; Thu, 11 Apr 2024 15:27:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 96C0D22615; Thu, 11 Apr 2024 15:25:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oDwA6l63" 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 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