Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2418495lqt; Mon, 22 Apr 2024 10:04:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWV2w2CZr2y5w/gy5Xd4AzsPgO/8eRVUDc7Lmix38+1NmSJ9MFTuJSXqbbETScc7bYrCn4MLvlmIX8KbDzBu1VdLvJcCpIc2rXavfAdQw== X-Google-Smtp-Source: AGHT+IEyaDhxvvadSvxLBQs0B0wWNNnGOhHpL0xT2tgBmsaGg5kSLJg+VI98lMrGqeqsj6lULnk+ X-Received: by 2002:a05:6a20:9191:b0:1a3:c3a9:53b7 with SMTP id v17-20020a056a20919100b001a3c3a953b7mr11512845pzd.55.1713805489717; Mon, 22 Apr 2024 10:04:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713805489; cv=pass; d=google.com; s=arc-20160816; b=CB3anh+2WXvY9Zu2Oy93dDLhWHBRZTng+gO0eZzkFqpgxBFbcpg7iE/YgyedwY64TW GoF+u/Y0KSwNWu4Ypg4b1352UP+qvqnXd/K2FTSRuruZboUOcfK9WT6SKGC0ptUXQ76p YVoLfJIsXau81Os/anVNT0syJc3LOhy4WLnrZw/QKjojJBuTMBVivD1fEFSDlgvbq6BZ 3c+j6ffdgdTSLNnLtKdCsKVxS1zN0nP7cQpXJ8sbZQTgxS8LEYSoyH4tcPq1XoCMr8iA 28a3//j3CAvG3PSgypCLe3Z5I+85qS07lintkx03UCMoNp7GtINaVSyH7yBbiAkklP2u xATA== 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=RcxZMik0TKevJdYhFoU/PQpjeiPff+g7faQ8eEohWOM=; fh=5XJJypkQeI5s73nZGmyRskmPdYeXtfodQOf0GbSr5UU=; b=efESlLUH8l2zmZS+MdSUJ3IDWFyvfuwp0iBL/M7Sq44s/YIbmu4P+kf8jCiagSuBaC bpZxSt9o3ylB/l3pcNAt/YqGzDFwnWqczOnLvmhYZp1q77JxxB/KKDo3+WrhOaE8AXit s83AmI6Da+mj9rIV+41iSHM4otwTCKAYCoSwjHrXnvbihvCpVJiFcGGmAhcKcMujSyqu 1YCmECXt/jrZRbvXDs5b32aNa2Ju7a8MrXry98D+ZRqoMh4JnW6C76Mlu1zux4OLwfOK EQsjWxkR9/nJHmOaHXE5NW0z4iD9t0IaiT4k1YPv3vvSi9bZOg5yRl2uAFx2l8IM28Eq +ubQ==; 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-153769-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153769-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id c10-20020a631c0a000000b005dcbba4b76csi8285426pgc.331.2024.04.22.10.04.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 10:04:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153769-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-153769-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153769-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 41AC3B25C51 for ; Mon, 22 Apr 2024 17:00:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 83C2A153831; Mon, 22 Apr 2024 16:59:00 +0000 (UTC) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (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 6CDFB154C12 for ; Mon, 22 Apr 2024 16:58:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713805140; cv=none; b=mqHBwB2ECECBURLax9TGEWnDzAymAGPy1zP9rlBG3Y11SbIPctlwNa8WNVV0+mG49cza9xCYsh3ib8qTw/5vs9yaj6zQlqV+67Sb4iOtZbSG1NZUHsbQifUv/2Mh0b7b53n28rIo08xZAfuvKD1ZwZM/04fMKeEVjWQAKy2AwWI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713805140; c=relaxed/simple; bh=Fjjwd9JMyXBtYEIPinJUKp5+nS7NszZndg1YDzHArOo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rgPeMWrEbpKxodE01uXT7+lE1GP1ZIHP1Ituecvwl49ExfPFZUP8n/x+zHTEkeH9ZSFlJ5qdjKNrg1BikBc8JpxFlBzCxDP1+/NSkafBa8uK0F3ADXzLSYEvmguSqCT/Z23q+oyRU0riokcXHgY6yyBezo//56TPBDkTe2t/4eA= 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.221.52 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-wr1-f52.google.com with SMTP id ffacd0b85a97d-34665dd7744so3539565f8f.1 for ; Mon, 22 Apr 2024 09:58:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713805137; x=1714409937; 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=RcxZMik0TKevJdYhFoU/PQpjeiPff+g7faQ8eEohWOM=; b=DpqUhgxNAKxqw0WOjyhFje6iaJ6GnMSAPXiZXS6SVxix4m/OSUjFHX4MB+ohdw39J6 LljkQ0i3zrMaxu5EDgpqZVgZL7UMirL9bH/6pPtzgIfcYNZ6Rz9KURpq2s2u+0qPR2wF hOjMPj1gi1oQBVRF5L5ewZyo90EWPCaajinQ0Lc7qTeWZZWc55EAKyJlccr5y0f74CoO Tt+Wrz8k5Siu5YBt/DnGM6PhrRyqIYjnQjEobLakm+NMPrVje7gynBhzj/lyNmWIe788 NHsovbFkFGOzlsEoOGs63erhyyO4CB5qqYBiXD63d2JD5pbNWoogoWGRPg8anAyx4kI6 ygjg== X-Gm-Message-State: AOJu0YzPO7cyH2naCq+ZnnUeb6CuRmx9zLWOs1h3gDiMJJDP+/MJbJc9 6XvF4vkKuUh30xPMKeM9ONA6xPlNU/dmmBzmxF4HCEuYPjlfvW5T X-Received: by 2002:a05:6000:1212:b0:349:c76f:c737 with SMTP id e18-20020a056000121200b00349c76fc737mr6751728wrx.47.1713805136761; Mon, 22 Apr 2024 09:58:56 -0700 (PDT) Received: from localhost (fwdproxy-lla-008.fbsv.net. [2a03:2880:30ff:8::face:b00c]) by smtp.gmail.com with ESMTPSA id l9-20020a17090615c900b00a555be38aaasm5941202ejd.164.2024.04.22.09.58.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 09:58:56 -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 05/10] x86/bugs: Add a separate config for L1TF Date: Mon, 22 Apr 2024 09:58:19 -0700 Message-ID: <20240422165830.2142904-6-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 L1TF 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 | 10 ++++++++++ arch/x86/kernel/cpu/bugs.c | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index bba5b65034dc..192d20348b41 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -2685,6 +2685,16 @@ config MITIGATION_MMIO_STALE_DATA attacker to have access to MMIO. See also + +config MITIGATION_L1TF + bool "Mitigate L1 Terminal Fault (L1TF) hardware bug" + depends on CPU_SUP_INTEL + default y + help + Mitigate L1 Terminal Fault (L1TF) hardware bug. L1 Terminal Fault is a + hardware vulnerability which allows unprivileged speculative access to data + available in the Level 1 Data Cache. + See