Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp295018rdb; Fri, 6 Oct 2023 04:00:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHl1jkwjz1hdf2kOP112E/uGoCOlDpoJzDslO/Eb7Zet5KVI63jb32EGmhKKdZa6xEdgf7h X-Received: by 2002:a17:903:24c:b0:1c7:4f87:3dbe with SMTP id j12-20020a170903024c00b001c74f873dbemr8639719plh.31.1696590006142; Fri, 06 Oct 2023 04:00:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696590006; cv=none; d=google.com; s=arc-20160816; b=NfzWb3nIwNVDXZLwq4I1cnn9JaSm85IVA9txuUzRkNQq2bxDt5hA3WXE0DcgGEyzZR cPXYw/LYzWngnF09YajzZZLjyKeWcopuBiHLKmNsisjwqU8AlGG0x9M0mdkiK6c+8Xvm m2y00ooKbRdqfb6jaUHjCiPfaccgyWJlhVb1azsDttt53C7T4qTXHidEjr/o2F8QmSUs +BiyK1GN/vxSUEolhZH8qVp+NYAaLp9UZ3Z+S01rD6rtRxZLhIHkQE1mikJDzYikDyBf K4YfKqL9H68GSQE9o/hLjq4RXkNk1N8q4MlAJbJOANSk5wegjjadZTeppoMNO7undhNH LbaQ== 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; bh=rAuuYKt1AgIPyV6uxItWEA2AncLhqXC4C5AM+mIo8z0=; fh=mkCBcD6jpz1LzP7bMwS7WqtGpUA6yCYaufzCJBWwWAo=; b=0N0VRaUitwMA9Ooj2NqsRmBOiioeHN+X2xaiLv3+yUDWqMR3Yawg1yRGXFp4Ua+7eq c0mJWUYeQrM9Du44hhoeDrgIHPtw9DZgBYKLD0pIZ/eDole22je+/lpDbrORujTcRwxc IyIYQRE2VsXo34ixumR+U6SXR2tlGRzR8KrQmsyRkSfWHn4ZwQO4JLfQGKkYAPVAfHhD xwpP8XV9AdXXuZTkl6/IENnHfiiGWNeRsbHM170W7G7XBDfWAVNAs0h5yqgqNkEGKr02 cFHsap0FJeWDNa403g7Vg8BvrAacUBBRZgJMpIbXxhNuxsT9NJD3TmN1FHFmvbPvd+2k KAgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id z2-20020a1709027e8200b001bbcddd6e82si3511198pla.91.2023.10.06.04.00.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 04:00:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id D4E8A814595B; Fri, 6 Oct 2023 03:59:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231820AbjJFK7w (ORCPT + 99 others); Fri, 6 Oct 2023 06:59:52 -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-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> X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Fri, 06 Oct 2023 04:00:00 -0700 (PDT) X-Spam-Level: ** 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/