From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA6E2E936FB for ; Fri, 6 Oct 2023 10:59:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231862AbjJFK7x (ORCPT ); Fri, 6 Oct 2023 06:59:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231475AbjJFK7u (ORCPT ); Fri, 6 Oct 2023 06:59:50 -0400 Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 766CACE for ; Fri, 6 Oct 2023 03:59:45 -0700 (PDT) Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-5335725cf84so3616020a12.2 for ; Fri, 06 Oct 2023 03:59:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696589984; x=1697194784; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=rAuuYKt1AgIPyV6uxItWEA2AncLhqXC4C5AM+mIo8z0=; b=gyoLuVp2V3+erT/+L4SkKZMM5fEIBFkdW0Lf5cT4jWvPZ/uXnDgHE66xNFunFBO7Co RZx2QOutdLka2TptTXDIv0TfiuQXlbbPCCMo/if8utiFYdXfRNiCjTXFfeKze+vzMYpj 5simal4qY/laxmI+GSXSjcKKpMXYFh6jON24o0pSZpmcPhQoA6aw/XvBW6ZFdMDY+kBX OjVyDOFCysondwuMS+NfAtGYqhI+amVkXsuyBUTRo109cqp2kXEtrMYYQsBHk3ayP9BK L8mZWl0y00qPCSnqRCYv0Yf9HVmf1unPp0r5yaZvvddqM+NapHS+oItv49RG7JmJaXQl jV2w== X-Gm-Message-State: AOJu0YzIODY55XZywtJbTI9EgIX2KLxwo3yMyY+sFLljiKL0cge15Le0 rdZfxjkwdqzQ+fl4MGz9Ws/39/hIANM= X-Google-Smtp-Source: AGHT+IFf2FQsn9AXzxNxCXar1vrjQNt3kFz2IQq0VUCg2GqPLtb9flOIgIfwACr9pyXMHVJOghrtKQ== X-Received: by 2002:aa7:d9cd:0:b0:533:49d2:dc8f with SMTP id v13-20020aa7d9cd000000b0053349d2dc8fmr6473773eds.17.1696589983603; Fri, 06 Oct 2023 03:59:43 -0700 (PDT) Received: from gmail.com (fwdproxy-cln-009.fbsv.net. [2a03:2880:31ff:9::face:b00c]) by smtp.gmail.com with ESMTPSA id c6-20020aa7c746000000b00537f5e85ea0sm2393308eds.13.2023.10.06.03.59.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 03:59:43 -0700 (PDT) Date: Fri, 6 Oct 2023 03:59:39 -0700 From: Breno Leitao To: Borislav Petkov Cc: Linus Torvalds , Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , Josh Poimboeuf , Pawan Gupta , leit@meta.com, "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" Subject: Re: [PATCH v3] x86/bugs: Add a separate config for each mitigation Message-ID: References: <20230628142129.2468174-1-leitao@debian.org> <20231005162545.GFZR7jiUNyNkscijUl@fat_crate.local> <20231006095410.GBZR/ZQmaako5yMhVs@fat_crate.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231006095410.GBZR/ZQmaako5yMhVs@fat_crate.local> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 06, 2023 at 11:54:10AM +0200, Borislav Petkov wrote: > On Thu, Oct 05, 2023 at 11:29:02AM -0700, Linus Torvalds wrote: > > ... > > "complex" conditionals may also be annoying, but dammit, they are > > important documentation about why we do those things, and unlike just > > comments that will inevitably bit-rot, they have semantics and get > > tested. > > Thanks for explaining - it does make sense to me. Thanks for clarifying it. > So, from the looks of it, we're halfway there: > > - SPECULATION_MITIGATIONS is there for people who want to whack off the > whole crap > > - the separate Kconfig switches are for people who want to do > a finer-grained control. And yeah, they might be annoying the first > time but you do them once and then you use the .config forever, like > with anything else. > > So yeah, sounds like a plan. Breno, please add Linus' explanation to the > commit message why we're doing it this way, when sending your new > version. Sure, I will update the version 3 of the patchset[1] and add Linus' explanation plus some new mitigation that showed up in the meantime. [1] https://lore.kernel.org/all/20230628142129.2468174-1-leitao@debian.org/