Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9892703rwd; Wed, 21 Jun 2023 13:18:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4CAvQDzGqNXQhwS+GZ7i0hrj8fpy6v+z6wHrZbs/PdrrSokSqcgfWMxqQ+7TVmzFKBtnfO X-Received: by 2002:a17:902:ed13:b0:1af:fd3a:2b7d with SMTP id b19-20020a170902ed1300b001affd3a2b7dmr14341327pld.48.1687378692920; Wed, 21 Jun 2023 13:18:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687378692; cv=none; d=google.com; s=arc-20160816; b=nlOVawwRuyDJ1VMtUsDRYwIiyD2/lR0NQspSYP4L4GWdOpWBcwgjsSRVJNu0y38aMT 1DdmHvJ6b3g1BvuC34Bxo6DHcgMHCF/SZ0RouBIex2BEa5DQkz1T63BrOBPPsVi9C1ZX 8xg2AjWC1FbJHU+gaJXiihm9+22gC/mYKmiFvC9/GNrwLTzMZugrFcFX2wbPjXQnQxcz hakDWK4BKSMIGEK4sB4tWp+Gi59V6bhrS3Gs1g++nFYUK7InZTNxfz2y0D6vhsVdUU6I 7e/i7VclDZ6c8qj31HUtK2k7RBX67ijC4WJX5elxfemU1V1kTLU+qLKo8GgcR4Ype5KD fu3g== 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=I25j5XvsqOc6ZUCaqmlS5SPOyIfInS8Zmat04qY/FY4=; b=tz6Ad8rwf0UWjGcqAVvwHD+MHZ6UTGE2ntDsALyc0FHA+SO+rnERQU92CselRBh5wE 6aCUq67a/9TV7c4HJKKgVfhA+D3IjWfAawVyJz/9ZXhuMLcotlQZUvYkOoJ11KaQp9vk uYRVaOrFvj7icJI5qsr6AeVLHTxaA8jr6TuJcsxVbrr1cgxec0mdYF1RPoVfdybSfbni Xll9RWiwDsAqIRnJxIYw4XOzC1Yhe0880cwu5DGQBqdeNUh+DY06rKZVNGzy2wSqEOhB sChp9aR31ywV1YcFurYSpU8PV+bHXY2KWyHIGMDlkT5k5vim67f0IkOfpckL7+FqWw+T y70g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nZ7QMmZD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s6-20020a170902a50600b001b55f047727si4622185plq.36.2023.06.21.13.18.00; Wed, 21 Jun 2023 13:18:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nZ7QMmZD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229948AbjFUTlL (ORCPT + 99 others); Wed, 21 Jun 2023 15:41:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229913AbjFUTlJ (ORCPT ); Wed, 21 Jun 2023 15:41:09 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78950171C for ; Wed, 21 Jun 2023 12:41:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687376468; x=1718912468; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=GIezgd37pTI6LXKw1SI7h5jfqmOPU2vrDOcKboJC5RI=; b=nZ7QMmZDfIhTX/YsCFYgHOZOXh0J4Pciy/7pqozDstSN6tCOrHo3T3B6 iuW/LUulh7VysE1T3MKlzhMu91TVZzVATTmQZ3hgjNMi2G1IAVoFGVUAD XHlGSUU9jURqRzpG3dFEaOKklbth8dJGYbvxX2LzYb3wj5kGaNqaxRNem 8w4PFf/1nBHMlwCiJbTxAsfLmegdT2Sj3XVDRllLNKfDe2QneTwP4FMAO TdiFX0BJc7s1U0kn53AOKKukXuf/gi0gNfBjogzD/3XqK9YjTp67BJtHB oUuZ4/NuWq99JHbmMTheUpDJu5P/8l5OkxZ83I1uOlo7AV9pZcQ0QblDa Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10748"; a="360299946" X-IronPort-AV: E=Sophos;i="6.00,261,1681196400"; d="scan'208";a="360299946" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jun 2023 12:41:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10748"; a="888812841" X-IronPort-AV: E=Sophos;i="6.00,261,1681196400"; d="scan'208";a="888812841" Received: from absteel-mobl1.amr.corp.intel.com (HELO desk) ([10.212.231.126]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jun 2023 12:41:07 -0700 Date: Wed, 21 Jun 2023 12:41:01 -0700 From: Pawan Gupta To: Breno Leitao Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , Josh Poimboeuf , leit@fb.com, "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" Subject: Re: [PATCH v2] x86/bugs: Break down mitigations configurations Message-ID: <20230621194101.bmwesljror2yqjxx@desk> References: <20230616164851.2559415-1-leitao@debian.org> <20230621001327.qdyebewnx7r5aiy3@desk> <20230621173135.wiprtgzslhw5z5or@desk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 21, 2023 at 11:36:53AM -0700, Breno Leitao wrote: > On Wed, Jun 21, 2023 at 10:31:35AM -0700, Pawan Gupta wrote: > > On Wed, Jun 21, 2023 at 08:54:17AM -0700, Breno Leitao wrote: > > > On Tue, Jun 20, 2023 at 05:13:27PM -0700, Pawan Gupta wrote: > > > > On Fri, Jun 16, 2023 at 09:48:50AM -0700, Breno Leitao wrote: > > > > > There is no way to disable MDS, TAA, MMIO Stale data mitigation today at > > > > > compilation time. These mitigations are enabled even if > > > > > CONFIG_SPECULATION_MITIGATIONS is unset. > > > > > > > > > > Create a new KCONFIG option for each mitigation under > > > > > CONFIG_SPECULATION_MITIGATIONS that allows these > > > > > mitigations to be disabled by default at compilation time. > > > > > > > > I don't think all mitigations are still controllable at build-time e.g. > > > > spectre_v2 eIBRS mitigation will still be deployed irrespective of the > > > > config. > > > > > > Right. This patchset only cares about MDS, TAA and MMIO. I am more than > > > happy to send a new patch to also disable spectre_v2 eIBRS. > > > > What about Retbleed, L1TF, SRBDS etc? I thought the goal is to control > > all speculation mitigations? > > > > To be consistent CONFIG_SPECULATION_MITIGATIONS should control all > > speculation mitigations. > > If I understand where you want to go, you think we should create a > single patchset that creates a CONFIG_ for each mitigation, > and move get it under CONFIG_SPECULATION_MITIGATIONS. Yes, a single series (or a patch) that adds config for each mitigation would be good.