Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3453247rdh; Thu, 28 Sep 2023 12:04:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGJcaHDi+fCRxG+zyDt7tWtEmh1RJ0IAgsWf2Af0ZKvoca7TVGCq918M6pIywtZtm/KHWQC X-Received: by 2002:a05:6e02:12cc:b0:34f:a4c5:8eca with SMTP id i12-20020a056e0212cc00b0034fa4c58ecamr2072239ilm.27.1695927890940; Thu, 28 Sep 2023 12:04:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695927890; cv=none; d=google.com; s=arc-20160816; b=hf67XqBYQ6mBjLaZGwGy3/blbpj71y3MF+jhOOjgHoZZGO1OX6rTuOQUZIDLel6Twc IDnOS3E+xth1mJgJhaR+fdrA4yfLktfsN282a0KpMctuZ3BaPG0I4zJZRPOFzSIyBJJo PyAWOhlD4e1Fe2nPRljsSps7lXHEhiELzPDTAxE6xNKXK7z3bZYvA3DYLjw4eryVYVWk wpK4ArsUmAwM8E4K2oHm3OTiS8C9Vuf/eI8npOhKSgWvrAmqWMKApRSlsXYKkqQNf6Qw wysou+TijrOR+hRHkiUH9V7tgFOlQVoUvXR6g3gBPuT7X6Su29NASB88j3g640NJhtFN frRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=jbR3cDbeRHa0JmkKqaiXbjtb3hzlj7I4AjDxoTZj+Lg=; fh=VrytmdnMEcea/WEcHDJASg5jYIn1WJ6IrC5+MTjzkfI=; b=I7zYQ+CHphZp8oRyCzLIaVlb9bNN1MAYI10CQ1iNawbmIpjLFJKBx7AU8PQuELEIki Q8xhQnHdhu6DWiXeR6nhFuLxHGq3m11jhNtqZ0W8bZGVkX2OtvO/aS5xAHjOJ7EpaFkd FvPk2hwejVF+8+EwV3K8eJvLaSM0WbvEQsQmE1bb5irGanQYx4q2Gsip0FuBtDE8JR/9 Rg7U53yHdZTedHgTppLeHwMwyxTtuG0xYd+MTBU7+rXoTyz7C8Xroj8q7hllZD08UqQn ikv3NIYuRriXs9KUUnb/RL9qlWQwr/Q1V7w2BkLnt3EPcn1a4R7KEGq1yGBhzxNVB7Dy 5piQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Dp+ZTjtm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id be3-20020a656e43000000b00578a30162c8si15941931pgb.537.2023.09.28.12.04.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 12:04:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Dp+ZTjtm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id B5C0A8075DFD; Thu, 28 Sep 2023 06:40:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232132AbjI1NkV (ORCPT + 99 others); Thu, 28 Sep 2023 09:40:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231532AbjI1NkV (ORCPT ); Thu, 28 Sep 2023 09:40:21 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44165136 for ; Thu, 28 Sep 2023 06:40:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695908419; x=1727444419; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=oPKqTqDJMkCV23vGa5LNVnNbgdlafADxMIVcynlp6Lo=; b=Dp+ZTjtmnrWHRvsg+m67Sy+xLNNfSuqqhLnSqzMuTX1YcFdHNV/dtHA0 xkbqep/PvoiWLv5eJHNgq295w5gl/8W2NCACX0hMpWt9oNc49NWQ72o0A CniXWvi4Yc7WDtrq09Hl4Jef/QBeq48uJIrcesb7qPmsGNWuPcoBUAEox 69WXHDl6lT1u0ctHaULuo7Ed8enz0M0oKZgWYqB0CQYVUaJm/vK8sHZIq lrxd6JoETL2oj7A7WZWHCMLuYzVmuIMEAsuCXa5psLzr2MWl1ApJR4BFL E2gggyW2VLZhQv6An2FJBN6QgUaKJqvT53YaNOXxtLUlxof0fpzYsqKly g==; X-IronPort-AV: E=McAfee;i="6600,9927,10846"; a="3627000" X-IronPort-AV: E=Sophos;i="6.03,184,1694761200"; d="scan'208";a="3627000" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2023 06:40:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10846"; a="749601019" X-IronPort-AV: E=Sophos;i="6.03,184,1694761200"; d="scan'208";a="749601019" Received: from jveerasa-mobl.amr.corp.intel.com (HELO [10.255.231.134]) ([10.255.231.134]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2023 06:40:18 -0700 Message-ID: Date: Thu, 28 Sep 2023 06:40:18 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v3] x86/bugs: Add a separate config for each mitigation Content-Language: en-US To: Breno Leitao , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , Josh Poimboeuf , Pawan Gupta Cc: leit@meta.com, "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" References: <20230628142129.2468174-1-leitao@debian.org> From: Dave Hansen In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,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 morse.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 (morse.vger.email [0.0.0.0]); Thu, 28 Sep 2023 06:40:32 -0700 (PDT) On 9/28/23 05:45, Breno Leitao wrote: > 1) Create one Kconfig entry per mitigation, so, the user can pick and > choose what to enable and disable. (Version 3 of this patch. May need a > re-spin due to the new mitigations being added.) This means, what, roughly 18 today? #define X86_BUG_CPU_MELTDOWN X86_BUG(14) ... #define X86_BUG_GDS X86_BUG(30) Plus two bonus ones: #define X86_BUG_SRSO X86_BUG(1*32 + 0) #define X86_BUG_DIV0 X86_BUG(1*32 + 1) ... and we've slowed down the rate at which we're adding these, but we're still seeing a couple a year. Perhaps Pawan and the others actually _doing_ the patches for these can speak up, but I don't think adding a Kconfig option will be too much additional work for each new X86_BUG. I still think it's highly unlikely that someone will come through and pick and choose among a few dozen vulnerabilities.