Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp438937rdg; Thu, 12 Oct 2023 09:48:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFZm8+xCenylzeMwAaDSwYncWY3iATFZMG8I4sYnk4E4Ic4S+cL1WcZ+RFhUs25rK+qfavz X-Received: by 2002:a05:6a20:1593:b0:155:5c28:ea74 with SMTP id h19-20020a056a20159300b001555c28ea74mr26221381pzj.12.1697129320396; Thu, 12 Oct 2023 09:48:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697129320; cv=none; d=google.com; s=arc-20160816; b=0PFf+Ba11PbEScv/Wi4zWaQY/OVJ4aYPBSGkBespIPOFbh5OnqKdz21S1QLGtK+hnn BB4LWbJNWBY9u66rQ4O1j59WoAqoSJ0TxuEraWwy1gEDNvVcJVTi1LQ44kr3c99/0scq wIRyEjfwPLCfSyGUH0IQLu5pdMQzxfWrDNb6DYeTX9ljtXXBWgr90RQqVK8qNwA/myx7 HVf2firSAAt0uBxAaUWLk1FvhhLbRXU/ZQKC1b3Mc5CIljPOe2vv3i4ODrw4z2Z49Yt3 w4AstkaWwYdZ436nHx+8AraNIXNqbpoi90S8qPQ1n6uFZcYWVf0NZpd1XLuFJI5mxhYo 5AdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yzLiwVC3chrgWnn0Pszne5p+tiT1z8t6484EJ5/0LGg=; fh=sFuGEEet6qqmFB6wimFNMEPr5KRENRB8TAGg7dYSyOo=; b=rDb6CwiGExjsp6wCyX8lSLcs0BOofeUM8+TqdRLnElYIYHsChq1hFr3dzC9/4IOL5P GT3kmyd8cAcz82cfSALGdLa1ksn/H3k1UWxz587bItUeI24LqhQnMj+nqqI3+kuU7dLM e8JnFbKi/+mjodAe+outLFT4N6MJ/ZU0eR6pmaH1FWzKrCUWNQCkr8fcZBPzc+G+oCZg cR+ndcg90Ii9KHe0a5gUt8jXtBSI2n16HSi6kJHiPez9UZppS3V2dzsT5CQyVyvqGWsl 3uXeAW5iLhWVstbWpsQAydP6/IvieGem1E9jx0nRU3Ldz3wPhX8VI8nSnvwUF46TXbcM 48yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YAg6MqhB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id u14-20020a170902e5ce00b001c9af9ace1dsi2825995plf.347.2023.10.12.09.48.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 09:48:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YAg6MqhB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 01B12807751D; Thu, 12 Oct 2023 09:48:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379539AbjJLQsU (ORCPT + 99 others); Thu, 12 Oct 2023 12:48:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379203AbjJLQsT (ORCPT ); Thu, 12 Oct 2023 12:48:19 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 543ABBE for ; Thu, 12 Oct 2023 09:48:17 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75305C433CA; Thu, 12 Oct 2023 16:48:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697129296; bh=0de80uOB+SpKXQu5Erh+GY63yoTazWhZ2zzX49im/+Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YAg6MqhBv2YbjeTTZt4FJI7yhkZs94Mctwz01BGGk4/q5xmAMukI6WbSrBKAPuAwC K1aB4dfjxlw7GFL0whc80uOodjKyc03C27H7GmlAfoqUPl+WkiA2V+0JIlPqxcf618 BZ4txRix90abWc/XWNWSL9hYdyVPRwUnPoLWyieuqykdvft4xdLfXcFEIHvVniz2OO gZxLHIshBcPiaC2SbjnwIFhiSkl1+VuwK4mmMEoF2n8/HRS6X0NjhxqHEPVens+TxC jYXI3YoE81UpE6F02uVYk/ruyYhfaZNBo0xl6oJKMVXIXN9G70C7R/2TKA1vZ+kEgP iYJ1rWLD/jKQw== Date: Thu, 12 Oct 2023 09:48:14 -0700 From: Josh Poimboeuf To: Borislav Petkov Cc: Breno Leitao , tglx@linutronix.de, Ingo Molnar , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , Pawan Gupta , leit@meta.com, "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" Subject: Re: [PATCH v4] x86/bugs: Add a separate config for each mitigation Message-ID: <20231012164814.oc3r3sovsfrldpop@treble> References: <20231010103028.4192223-1-leitao@debian.org> <20231011044252.42bplzjsam3qsasz@treble> <20231011190317.GDZSbxdd5TuCIp5+JN@fat_crate.local> <20231011220325.5uje4xnfxuccumm7@treble> <20231012072920.GAZSegUJkwHbcernQo@fat_crate.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231012072920.GAZSegUJkwHbcernQo@fat_crate.local> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 12 Oct 2023 09:48:38 -0700 (PDT) On Thu, Oct 12, 2023 at 09:29:20AM +0200, Borislav Petkov wrote: > On Wed, Oct 11, 2023 at 03:03:25PM -0700, Josh Poimboeuf wrote: > > I wouldn't call it senseless churn. There are concrete benefits -- for > > both users and developers -- of having all the mitigation config options > > living in the same config namespace. > > I don't see it. What does the same namespace give you? So you see in the > code a bunch of ifdeffery and some or all of them have > CONFIG_MITIGATION_ prepended. To me it doesn't matter whether they're > mitigations or not - it is just the next Kconfig symbol. It adds clarity by making the options more self-documenting. For users who care about such things it makes it easier to identify which options they need to enable or disable. And it makes it clearer what those options do without having to go read the docs. For developers it helps code readability: "ah, this nasty code is for a side channel mitigation". Also it makes it easier to grep for. > > Sure, the change might cause pain for users who disable these options, > > but do those users actually exist? > > Apparently there are use cases where people simply want to disable all > that mitigation crap because they want their performance back. This > thread being one. And I know of another one with a similar sentiment. Right, but we have a global option for that. I was wondering if anybody actually uses the individual options (though I agree with Linus they should exist to help with code readability). -- Josh