Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2414708lqt; Mon, 22 Apr 2024 10:00:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW86VpJh1cHfxA6/FYguwNwkW26FCQF1i8HorzQ6LEiA+lC8xaB0IIA/80Fns9CbjIu/awqlrvtsqEGv8Tlydyq6ugJnTyVSW4a4lqeWA== X-Google-Smtp-Source: AGHT+IFZey1sZtDaa+EUSwsQFjBi9wNf5Rzb6I0vAYiZxvr5XLZzQWO1A5We3oE0gJLl0KBf8OiW X-Received: by 2002:a17:906:3d49:b0:a51:fef6:b7d6 with SMTP id q9-20020a1709063d4900b00a51fef6b7d6mr7564888ejf.19.1713805232191; Mon, 22 Apr 2024 10:00:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713805232; cv=pass; d=google.com; s=arc-20160816; b=Jtvu0lHHpDNI4PnzGUFyTwIgILNWstyfcvny5I+RfovHgpNap+AFiuev2gXVGXfzLC UyW1PPjj2xqvsqx2L4u2isx2XvbFak+4vQe5jiudJP8EFh7i5VYKQd19y6OWlWPEpTfm Uc9Fr+HNFmyWWABYJjVLOIki2p8hr9yXqYF5G0SfsSKMryr2oIpLanvHwy7lNEkbGTS8 b4/alja40Hvb3eB9eIv0V9toZtMiBnK4ewIdGFvI0YO6e3vHVviK3m60Ep18uHViNPKT ykB5Wt6OJpyMKoitgUoITfzCmvUsF0Sr+29QR4ANnTidnblHUKijhPyiQOA97aaobIZA h/pQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=K16+OPsEQjJ9rybaX0bQn7NDfdzmf1VzGQpkmeZBSqE=; fh=5XJJypkQeI5s73nZGmyRskmPdYeXtfodQOf0GbSr5UU=; b=E/wVzOS8T69wmRRHl5Zr20qbuvQAFaXcx0G5/XCC9327qMqFG7xdSp21xaV9vMbYbs uKSmayHM9TvyxA7n/bUlJi5IJeOGh0MlAhjIW96BG2L6U6AOnphZ809P/GpJGdiA8vb/ wPaAIS5OPZAnXwUugJma/ZvT0XacKgpN1RCMjsxmXY7WSEqbquNS43gCP/L/QidIyxP9 mSo8O/9QgNpW85152z0mCx48EaZMUaz69XAb/EHSgcp57MhHgAVva/7Him2AJnT0sqq8 BRvhAF4c7ULwcblAaaMa2rCZXgSWWqAyftBR/w/YhiaSVpgLNSkbut1T1IlbVKQeqQgR IbfA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-153770-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153770-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id j1-20020a170906094100b00a51aaa75b95si5628324ejd.624.2024.04.22.10.00.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 10:00:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153770-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-153770-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153770-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E6AE91F219CE for ; Mon, 22 Apr 2024 17:00:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C4EC15531D; Mon, 22 Apr 2024 16:59:02 +0000 (UTC) Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6B5BB1552F8 for ; Mon, 22 Apr 2024 16:59:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713805142; cv=none; b=dwX8vsASCOQ4nRbRXg+xT51XpRfTQpXcvUmI/WHWXVpUItmYJhbU0VWvvB3gusyNuIoemDwtarsHZA6tklVk5x/piS1MesxCYHvvItGc4kr9et59FqomvTIcMqonj8ah1br9qWL/emFo3ZdRl1sXu9Aok2MSXnCD5R8hpe3Lrt0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713805142; c=relaxed/simple; bh=YgvAz9KHnENdbdQSX+/hzGCPyOv+Dc9oxXqawLxd/M8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oAoFP4A9Q8Mer/JcS8Zj1o61mvFzTaGJzUmQe7quPtUOj2BsS0AQb2zbbYPBROpmbBDlLdQhmBoW1KeXXg8u0tBHMhnp+634Tx1ToQOdXAepQym93PqRoUTM6detHYB5X+Us5/S0vuOnPM9/PCK584Obi/txcjjb6OTRbIGaWmI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.208.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-56e56ee8d5cso5870913a12.2 for ; Mon, 22 Apr 2024 09:59:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713805139; x=1714409939; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=K16+OPsEQjJ9rybaX0bQn7NDfdzmf1VzGQpkmeZBSqE=; b=Dq4zBNUr7ibGoEx/KORlxCsbIawRLDvi/eMFQS6rsDNR4TelIFeJmTx60QMrpGTF1R sG1qRXIrNQjc2ZQ8bVxNygsl5wuRahai55xJ3zlhG4N0K2rHMvnQKYzFLUDU0K4+xBo4 U/3NAsWdrlqFQx6IcWf2Qg9U3lCOkuqkUeBfZTX34eVduHk6SthHBEjho74LeWyqyf2m GWr1fOPzP9m//3xVRtWQLKkJEH8L1/h5M8Rq7JphyZU/b9I/wKhUAy0APnYf9ZMeSLqQ EE3xusN3MlRbwTm58jFiwvJTFvKfmBzvAT+FDNBwmtTnPwibTy97rdByDIjyZyzjBGl+ N7HQ== X-Gm-Message-State: AOJu0YwHR+eODBbKEfH5BUoP93ZFMdABwEPChmAGLR71uTCZ6ETXouQW bJKn2AfuF2/ctxcSnk9A87Ou0DCiVYCmNi2KzmCMHgLoV9cXVoe/ X-Received: by 2002:a50:9e66:0:b0:56d:b687:5a45 with SMTP id z93-20020a509e66000000b0056db6875a45mr6908036ede.1.1713805138567; Mon, 22 Apr 2024 09:58:58 -0700 (PDT) Received: from localhost (fwdproxy-lla-003.fbsv.net. [2a03:2880:30ff:3::face:b00c]) by smtp.gmail.com with ESMTPSA id k4-20020a50cb84000000b005705bb48307sm5729767edi.42.2024.04.22.09.58.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 09:58:58 -0700 (PDT) From: Breno Leitao To: jpoimboe@kernel.org, mingo@redhat.com, Thomas Gleixner , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , Pawan Gupta Cc: linux-kernel@vger.kernel.org Subject: [PATCH v3 06/10] x86/bugs: Add a separate config for RETBLEED Date: Mon, 22 Apr 2024 09:58:20 -0700 Message-ID: <20240422165830.2142904-7-leitao@debian.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240422165830.2142904-1-leitao@debian.org> References: <20240422165830.2142904-1-leitao@debian.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Currently, the CONFIG_SPECULATION_MITIGATIONS is halfway populated, where some mitigations have entries in Kconfig, and they could be modified, while others mitigations do not have Kconfig entries, and could not be controlled at build time. Create an entry for the RETBLEED CPU mitigation under CONFIG_SPECULATION_MITIGATIONS. This allow users to enable or disable it at compilation time. Signed-off-by: Breno Leitao Acked-by: Josh Poimboeuf --- arch/x86/Kconfig | 13 +++++++++++++ arch/x86/kernel/cpu/bugs.c | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 192d20348b41..f5c941a0a837 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -2695,6 +2695,19 @@ config MITIGATION_L1TF hardware vulnerability which allows unprivileged speculative access to data available in the Level 1 Data Cache. See