Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1842221lql; Wed, 13 Mar 2024 09:33:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVhfCc03ue0k/wfQBwP9jANtCLSMWR0ylXomoXNWZX398mihz05XOOXnf6BmTy3GucdqZPTdbMYXyZLPXXO6P3bdT08w5VRKh2/rr0H3g== X-Google-Smtp-Source: AGHT+IE6pTCmwk32SHREAaJk57XBfsrKR9nAEZwa+RkaWFpNSTcPrK2239gUOFcP99aUe+zNXFCV X-Received: by 2002:a17:907:8e07:b0:a46:511d:5ef3 with SMTP id th7-20020a1709078e0700b00a46511d5ef3mr2171189ejc.6.1710347600902; Wed, 13 Mar 2024 09:33:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710347600; cv=pass; d=google.com; s=arc-20160816; b=FlFbnhyuVHBKyppLUugZx8X5BRXtcgNyjntJ6tdcBeDNEgimnSIYLBQBncoG3dxbtq 5i37ABM6Rh5CZd95d6DKYMoSzftQStl2NQBGQ8Mbzm74+GuZx9QvYtTXDuxL/Gj/mdv0 npwddDUVsg4KbO0jFcCaE2dFe5wmLP14Y9pah+zDzFyL7I/gEET6niQKfAT27w1+kaFt OB7L9L6xwe+N4n8kmgdkJfEgGVnvlqAWBi+4HwLmdv4mptewbQxmZImMe9wTeKCJl3vh Edh1O+5MiO4EsYdSgXPh/roxw3kXmG7fBmiI0HjELznOcarJMqBShupCKeygePYGU2VD qVVQ== 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:dkim-signature; bh=J3Hi0Zr6d0zaFS9ghn1FJbYNxF0B22qwY/LTx7ojAyU=; fh=yt9bdIl5jWBWQShzSObvYJRlp1hhkB1Bsv7jf7n/3yc=; b=PHUnL9DpP/7GY467WV2hhxhY4CiNaZtPvHTlp3KTEzii0wNB6ezJMOM7X4QiwMvakM dxhr+cq59a1CxiHY+vH2NXf0oFl+0+Yh9P8UhNQMhHJH1L8kzsE1Q3/VDwBdsWkZRu7N K/lfTZovIM0pRh/vStiq4UFC35NBoJpeHGndP7yWRk0M+P7b8PTFb4qkBy1VYrIE/4+k 3ZiyZaZf5MfEdY2b9/1+8rAFq7hmmwe93zRzE6Sl0UnMsBxxHh4hsnC+ADHDPid6pPON 4X1jhIccuc4WP3ZLCfySmmspjJ8gJuXORjY3Mjbn8dXJPSwGGTZzPT9fZ9FzVS0SUbfq iCKQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gZpRugsN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-101741-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101741-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 w15-20020a17090633cf00b00a4659bf5922si726050eja.208.2024.03.13.09.33.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 09:33:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101741-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gZpRugsN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-101741-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101741-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 6E7581F2312D for ; Wed, 13 Mar 2024 16:33:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 273E14F602; Wed, 13 Mar 2024 16:32:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gZpRugsN" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D0334D9F0; Wed, 13 Mar 2024 16:32:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710347562; cv=none; b=snwuP/75mYpE+o5YbHAb/CCqQBi2S+i1nDoYVWf8AwLQ5Vh5FtlMSwyvR8Y6AMqaxfKNOFJqwaIAb+vnblMAn6pBTqLlj5I0wN2hq8wxgqzBDqNraVgAFc107Tzw4v+TpElPBpxXs38d2jSEZlVuHFy6PDwsyz8MGWvoGplAFws= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710347562; c=relaxed/simple; bh=IGNLt7LksMqSz477acUIJclwQc6RWa1/h14SdnAgjFk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Lk+1jvzamlHmvB6Zp1Bc7hxpX+1yOlXM2hNwi/CcH9VbnmlIwVATtpGVhP+2xtOje1i8LiBpVG5RaTrHHRvd++49tbpVTLtr3gMDiFkaxWLLZpdyAKBuJHqwqh1tI7hdMJT7X0GwkXv/2ks6lHVOOaKrAToXWpVlExtJOhp7BAk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gZpRugsN; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99E1EC43390; Wed, 13 Mar 2024 16:32:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710347561; bh=IGNLt7LksMqSz477acUIJclwQc6RWa1/h14SdnAgjFk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gZpRugsNeUat4hQCopM4P5NpPM+H9zBKzBFpphsQCtdT7O5sQmNaF64l40IgXLRQU 1TP04Q+tDyC0op7FBlKuy+kme0pXZYPPo0CrLgJhlflkJZ6eUHZPCvOdnynrf98Ban lsRq4uWoaopxSk6FblkarloJxPfquyxNrhZwf3t66mq8SXnhNkxREg1yiX0vxxCgPg ppRG1goe+XADhSAIS8/IO8cwQQ7++2Cut3dEcE6iTtxyb5BCM/HMNthCpg6SFTR+Cm zQm6sLh/GLtJ7owyp2EUEtTwr6SCWuq2tNJx+nlxTnL4M1cPH31jTdQITDwcluYHhQ 7S4RJN52SN5Mg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Pawan Gupta , Dave Hansen , Thomas Gleixner , Josh Poimboeuf , Greg Kroah-Hartman Subject: [PATCH 6.7 02/61] Documentation/hw-vuln: Add documentation for RFDS Date: Wed, 13 Mar 2024 12:31:37 -0400 Message-ID: <20240313163236.613880-3-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240313163236.613880-1-sashal@kernel.org> References: <20240313163236.613880-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.7.10-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-6.7.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 6.7.10-rc1 X-KernelTest-Deadline: 2024-03-15T16:32+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Pawan Gupta commit 4e42765d1be01111df0c0275bbaf1db1acef346e upstream. Add the documentation for transient execution vulnerability Register File Data Sampling (RFDS) that affects Intel Atom CPUs. Signed-off-by: Pawan Gupta Signed-off-by: Dave Hansen Reviewed-by: Thomas Gleixner Acked-by: Josh Poimboeuf Signed-off-by: Greg Kroah-Hartman --- Documentation/admin-guide/hw-vuln/index.rst | 1 + .../hw-vuln/reg-file-data-sampling.rst | 104 ++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst diff --git a/Documentation/admin-guide/hw-vuln/index.rst b/Documentation/admin-guide/hw-vuln/index.rst index de99caabf65a3..ff0b440ef2dc9 100644 --- a/Documentation/admin-guide/hw-vuln/index.rst +++ b/Documentation/admin-guide/hw-vuln/index.rst @@ -21,3 +21,4 @@ are configurable at compile, boot or run time. cross-thread-rsb srso gather_data_sampling + reg-file-data-sampling diff --git a/Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst b/Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst new file mode 100644 index 0000000000000..0585d02b9a6cb --- /dev/null +++ b/Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst @@ -0,0 +1,104 @@ +================================== +Register File Data Sampling (RFDS) +================================== + +Register File Data Sampling (RFDS) is a microarchitectural vulnerability that +only affects Intel Atom parts(also branded as E-cores). RFDS may allow +a malicious actor to infer data values previously used in floating point +registers, vector registers, or integer registers. RFDS does not provide the +ability to choose which data is inferred. CVE-2023-28746 is assigned to RFDS. + +Affected Processors +=================== +Below is the list of affected Intel processors [#f1]_: + + =================== ============ + Common name Family_Model + =================== ============ + ATOM_GOLDMONT 06_5CH + ATOM_GOLDMONT_D 06_5FH + ATOM_GOLDMONT_PLUS 06_7AH + ATOM_TREMONT_D 06_86H + ATOM_TREMONT 06_96H + ALDERLAKE 06_97H + ALDERLAKE_L 06_9AH + ATOM_TREMONT_L 06_9CH + RAPTORLAKE 06_B7H + RAPTORLAKE_P 06_BAH + ATOM_GRACEMONT 06_BEH + RAPTORLAKE_S 06_BFH + =================== ============ + +As an exception to this table, Intel Xeon E family parts ALDERLAKE(06_97H) and +RAPTORLAKE(06_B7H) codenamed Catlow are not affected. They are reported as +vulnerable in Linux because they share the same family/model with an affected +part. Unlike their affected counterparts, they do not enumerate RFDS_CLEAR or +CPUID.HYBRID. This information could be used to distinguish between the +affected and unaffected parts, but it is deemed not worth adding complexity as +the reporting is fixed automatically when these parts enumerate RFDS_NO. + +Mitigation +========== +Intel released a microcode update that enables software to clear sensitive +information using the VERW instruction. Like MDS, RFDS deploys the same +mitigation strategy to force the CPU to clear the affected buffers before an +attacker can extract the secrets. This is achieved by using the otherwise +unused and obsolete VERW instruction in combination with a microcode update. +The microcode clears the affected CPU buffers when the VERW instruction is +executed. + +Mitigation points +----------------- +VERW is executed by the kernel before returning to user space, and by KVM +before VMentry. None of the affected cores support SMT, so VERW is not required +at C-state transitions. + +New bits in IA32_ARCH_CAPABILITIES +---------------------------------- +Newer processors and microcode update on existing affected processors added new +bits to IA32_ARCH_CAPABILITIES MSR. These bits can be used to enumerate +vulnerability and mitigation capability: + +- Bit 27 - RFDS_NO - When set, processor is not affected by RFDS. +- Bit 28 - RFDS_CLEAR - When set, processor is affected by RFDS, and has the + microcode that clears the affected buffers on VERW execution. + +Mitigation control on the kernel command line +--------------------------------------------- +The kernel command line allows to control RFDS mitigation at boot time with the +parameter "reg_file_data_sampling=". The valid arguments are: + + ========== ================================================================= + on If the CPU is vulnerable, enable mitigation; CPU buffer clearing + on exit to userspace and before entering a VM. + off Disables mitigation. + ========== ================================================================= + +Mitigation default is selected by CONFIG_MITIGATION_RFDS. + +Mitigation status information +----------------------------- +The Linux kernel provides a sysfs interface to enumerate the current +vulnerability status of the system: whether the system is vulnerable, and +which mitigations are active. The relevant sysfs file is: + + /sys/devices/system/cpu/vulnerabilities/reg_file_data_sampling + +The possible values in this file are: + + .. list-table:: + + * - 'Not affected' + - The processor is not vulnerable + * - 'Vulnerable' + - The processor is vulnerable, but no mitigation enabled + * - 'Vulnerable: No microcode' + - The processor is vulnerable but microcode is not updated. + * - 'Mitigation: Clear Register File' + - The processor is vulnerable and the CPU buffer clearing mitigation is + enabled. + +References +---------- +.. [#f1] Affected Processors + https://www.intel.com/content/www/us/en/developer/topic-technology/software-security-guidance/processors-affected-consolidated-product-cpu-model.html -- 2.43.0