Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1389101rwd; Thu, 15 Jun 2023 09:52:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6xfmuDozwo8MwhyeNMAQvWttQqGeYK+WBqGykWv6JkhaDv/QJC5er4/bdzgz1cq42pIm2H X-Received: by 2002:a17:902:d485:b0:1b2:22cd:9827 with SMTP id c5-20020a170902d48500b001b222cd9827mr7108995plg.1.1686847925257; Thu, 15 Jun 2023 09:52:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686847925; cv=none; d=google.com; s=arc-20160816; b=lLdrXtq8ulkXalKtgeGMARhZyxDwNXgSoYlwlqDIe/9axTXFHpmo6wd+UEpEEtJgYL kd0FPu8Z8hL1D/R0hPO/jRE/osyUeDqahejmRHzVIyaNPhCjt69gQCg26Dvk4DY4Ox7L wJltg52hayIOvqxs7e5fF07paRfnafKeyJp1Dp3lVaPJdow756dWCyd2i6BecQWdJ+ew bFDmbhp4gP6eLCZ8Uw9mlZ2+/5SLGoIvZy6VGRUxZ81D+qNl6b3jJ0jPjnfAH1llb+sN XxsYDGIhL4KjIh0rsDOP/DU4h6oYCDUVQ8DW+QvKAcrQ8m3NQ2teYLAMLPgVX1qSVG+1 uZLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ZKrXpTuTUilsXuTU2ZCSebU2HevXpno2wTvArxmiD/I=; b=YS1cq6BUkaRorB20+C4HSTo7ZpcLWmFR5wgazisS3xkvA6nVsNHBT0Og5HYvqNVh8j TLYKZjBJVh7bpXCLUPevOYDxxbg/0k10ALQY3GWnGPVjr7CSWowVFyPQRRu2CF5kcc0A QFkHjiBfHUc7YibkR3EGFsmdUvghjdk6XPPVCqp7LOoffZFTTvlqLWiRKJ6Whn5pQI30 9Y6VII5F6RQ2pRwu9XQaellsraXNdCVBq28qIEr0GEZNBdJjS3VavYPr0cL6NSqwjw+8 1/c/E2V6xBqEWdHJp+nYjj52+s/9qD7xYk16+psdsO6OKdK+5mrvfOU+Jog6O0dzsqZk qVEQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z16-20020a170903019000b001ab089f7319si1875419plg.52.2023.06.15.09.51.47; Thu, 15 Jun 2023 09:52:05 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234594AbjFOQpO (ORCPT + 99 others); Thu, 15 Jun 2023 12:45:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235592AbjFOQod (ORCPT ); Thu, 15 Jun 2023 12:44:33 -0400 Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F0C42D68 for ; Thu, 15 Jun 2023 09:44:27 -0700 (PDT) Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-4f764e9295dso3560527e87.0 for ; Thu, 15 Jun 2023 09:44:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686847465; x=1689439465; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZKrXpTuTUilsXuTU2ZCSebU2HevXpno2wTvArxmiD/I=; b=LcO9jiu05ylVTSZzr4SU4EZgahdLYPBHHgeZTetrC4fDUqTA7NAf80UFCBdrM4ZME6 wohdzicshdhWcqZQOHaM4W4S5IkhVS9gcJGxnl49s2DrGH8WdF35bX/yP7RQWFRuASfN ENlP8IkX2JnwDto3haQPfvQ6ClW0WXsf3LsMsp05NQJTuS+ue+nMqU4gV9jE/0bjGUCB qLFsZoaUs23gb6fICZGxz225UiEiswUgpYc5v+7BmR3A9U6Yp4bxN4usqgulaiDz41y9 4a9KN6/MYT5mWSlY6h1nFrBzwyVnwVGHU7fs2hgN90RGamUlAkdctOCDU9cD4gEiNKWo vBgg== X-Gm-Message-State: AC+VfDxMawcGudHlCS7BI6BH94x/xtHEZWEvZelulSNV1YsoKyBDrQqc JFPlHp2dtEkCdn9ZFIIjiBM= X-Received: by 2002:a19:7b14:0:b0:4f8:83f:babe with SMTP id w20-20020a197b14000000b004f8083fbabemr1970034lfc.62.1686847465120; Thu, 15 Jun 2023 09:44:25 -0700 (PDT) Received: from localhost (fwdproxy-cln-007.fbsv.net. [2a03:2880:31ff:7::face:b00c]) by smtp.gmail.com with ESMTPSA id l16-20020a1c7910000000b003f8d770e935sm6143947wme.0.2023.06.15.09.44.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 09:44:24 -0700 (PDT) From: Breno Leitao To: pawan.kumar.gupta@linux.intel.com, jpoimboe@kernel.org, peterz@infradead.org, tglx@linutronix.de, bp@alien8.de Cc: leit@fb.com, hpa@zytor.com, x86@kernel.org, mingo@redhat.com, dave.hansen@linux.intel.com, linux-kernel@vger.kernel.org Subject: [PATCH 0/2] x86/bugs: Break down mitigations configurations Date: Thu, 15 Jun 2023 09:44:11 -0700 Message-Id: <20230615164417.3588162-1-leitao@debian.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 There is no way to compile a kernel today with some of the speculative mitigations disabled. Even if the kernel has CONFIG_SPECULATION_MITIGATIONS=n, some Intel mitigations, such as MDS, TAA, MMIO are still enabled and can only be disabled using a kernel parameter. This patchset creates a way to choose what to enable or disable, and, get the mitigations disable if CONFIG_SPECULATION_MITIGATIONS is not set, as the rest of other mitigations. Also, we want to print a warning message letting users know that these mitigations are disabled. This is a follow up to this discussion: https://lkml.org/lkml/2023/6/12/798 Breno Leitao (3): x86/bugs: Create an option to disable MDS x86/bugs: Create an option to disable TAA x86/bugs: Create an option to disable MMIO vulnerability arch/x86/Kconfig | 31 +++++++++++++++++++++++++++++++ arch/x86/kernel/cpu/bugs.c | 23 +++++++++++++++++++---- 2 files changed, 50 insertions(+), 4 deletions(-) -- 2.34.1