Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1858593lql; Wed, 13 Mar 2024 10:01:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU+pMoJsih8kSUUBBKDncP5zkqwoHA6B7dHXOrRL3k2HS09X8Fm7bBRBP9FvUQxBq9Mt/Lpj/M+b+DbuZyjmQCk2c31ObKtCa6dbagLdA== X-Google-Smtp-Source: AGHT+IGlfqHOUCh1LfFxQGA6BVr+OWYnAgzI13PsY//DT0BstNBK67F2JNSRTtrewack4W2bVqWg X-Received: by 2002:aa7:c38b:0:b0:568:90b5:3295 with SMTP id k11-20020aa7c38b000000b0056890b53295mr652603edq.7.1710349305528; Wed, 13 Mar 2024 10:01:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710349305; cv=pass; d=google.com; s=arc-20160816; b=oA2v2HO/o6JpK2VByAeh1pUsbeySg7t2ZP+asusxGyozYswx7QjQCpRHjGeUCUM2OV fAleEKCRSFTAfcq1bLcbdzfaQ0wC4Bg7Zh3iPb3jNwJbSX+3knruFOFJKE1kYe38Ce12 7YrGAT9JVNXMkZmiDzrs0WHva4E5E6Abu1ew0HFG7MPfTaN8rkeMYg4eYOEpr+MOHfe5 RaJSnuqySmqFmly62LKvdmGXL9gzF3lAcgf41OBr6n/s0dVGC8HKt7vsITV8ss0BoBZu q7DfycTb0WFAyjS8ezT4edEeIRF967p3coonS4TXcrU9AuxSqynUG8kFxwSo6Mu9eH+R 9Gew== 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=josAOUaoxRgBwMWKWDImjJGa8QmLBdCi+9ZK7gXiYTEIZUCNhrde1kZF4ZNlkJ/m/I xyIQeSKwlz6W/5ghzi24SBsVIeXuUeA3uGYB1v+IktNSJ/0WxamuICyZMegGXvy3UOPE orPxwXuvEXBxdd57cDyLyOROwn76ClQBSZ4refRv/uPMqoGlXA0cmgBqa5MYX/rmJxf3 7jjUkOk+r89SLOelT8TDXbW1WaN6e5aBiTQ53A1Hn6D/EzJuLesv9CrnibGtU7founY8 3e9shxqGyAdNR2rdFifHZPnFZ1cwvGH7qCmPpdstktmpY4BhG9x8S9Ukr66aiO6FSzNA bSJg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EpR8JBX8; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-101860-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101860-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ew10-20020a056402538a00b00565e08477b6si1114834edb.139.2024.03.13.10.01.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 10:01:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101860-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EpR8JBX8; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-101860-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101860-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 184651F280D5 for ; Wed, 13 Mar 2024 17:01:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A956763E4; Wed, 13 Mar 2024 16:38:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EpR8JBX8" 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 3E989762E3; Wed, 13 Mar 2024 16:38:18 +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=1710347898; cv=none; b=mHe3ZlXMEB/bPAOgoKzN6A2Qc0w94gUeC6zyc3MqMsrvSHGqn1etTu30WjEAL2Jx4E/R02xYFxCCnSlqO67Hlmz/om88m2MPOO4sIw89ehI+kvlPQyqF0oVpQOb2yjja7m1nG5xDPGNQSWv9Ryicp1+HBCdjGKx+4XOT9Gt4vOk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710347898; c=relaxed/simple; bh=IGNLt7LksMqSz477acUIJclwQc6RWa1/h14SdnAgjFk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qdEPoEzX3AS9qpknycCKaYnADTdanGXe753QSYyxyaR0c1IE4ffG8u0IEqIzb1UdjNCsO8j5rzUrBQSe05afJPthHlvOn6fxxWX6DLDw+qKzQF53Z1yl5CgUt+7WatWiQD0T4jMMpOxwzqBT5RZivVfVqW1vS4zddBrguJmNhJY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EpR8JBX8; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E20BC433F1; Wed, 13 Mar 2024 16:38:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710347898; bh=IGNLt7LksMqSz477acUIJclwQc6RWa1/h14SdnAgjFk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EpR8JBX8bpmn6/sHHV+eHoazoiuAk6mhiaytz0KdePvbiFFF8P8vW+5RZKXWR6M0V ht+P3TD6jh+GSZ6JAQyWXE6uJvA93faEintvmDQ8qKHb/d1KICuwL0DQo3QsD5OfL8 0Blu6QWx07ji9LYcdVnBrdPQll0W93M97BK/Ahwm+kbkifySrL1ZMOeHWrxkKwpD8a XJMtylLfanFjtfrS7eSDUc34Qb8gg64ebJXQpBuwQbZOgaXu1vyx2gIKbFILbj4nQv zsfIMSgyUXRVwHFXxpOIBonM+OTewQchLzCUX3XKTv0tThZknsdEkDMdmwOPZnYJZs 5UCsb6EOKE/Rg== 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.6 57/60] Documentation/hw-vuln: Add documentation for RFDS Date: Wed, 13 Mar 2024 12:37:04 -0400 Message-ID: <20240313163707.615000-58-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240313163707.615000-1-sashal@kernel.org> References: <20240313163707.615000-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.6.22-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-6.6.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 6.6.22-rc1 X-KernelTest-Deadline: 2024-03-15T16:36+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