Repository navigation
x86: hygon: Fix FPDSS on Hygon - #2250
Conversation
Upstream: no AMD Zen 1 and Hygon are both affected by FPDSS(Floating Point Divider State Sampling): allows an attacker to leak data via floating point division unit. The upstream fix e55d98e ("x86/CPU: Fix FPDSS on Zen1") fix FPDSS by enable msr 0xc0011028 bit 9, which also can fix FPDSS on Hygon CPU. Hygon-SIG: commit none hygon x86: hygon: Fix FPDSS on Hygon Signed-off-by: luoshance <luoshance@hygon.cn>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe Hygon CPU initialization path now mitigates the floating-point divider state sampling vulnerability by setting the shared AMD FP configuration MSR bit used for the Zen 1 fix, with a one-time diagnostic notice. Sequence diagram for Hygon FPDSS mitigation during CPU initializationsequenceDiagram
participant Kernel
participant HygonCPU
participant MSR
Kernel->>HygonCPU: init_hygon(c)
HygonCPU->>HygonCPU: pr_notice_once()
HygonCPU->>MSR: msr_set_bit(MSR_AMD64_FP_CFG, MSR_AMD64_FP_CFG_ZEN1_DENORM_FIX_BIT)
MSR-->>HygonCPU: FPDSS mitigation enabled
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Hi @luoshance. Thanks for your PR. 😃 |
|
Hi @luoshance. Thanks for your PR. I'm waiting for a deepin-community member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the change enabling FPDSS mitigation during Hygon CPU initialization.
No open issues 🎉
What changed in this PR
This PR enables the existing floating-point divider state sampling (FPDSS) mitigation during Hygon CPU initialization, extending protection already used for AMD Zen 1.
Changes:
- Set the mitigation bit in
MSR_AMD64_FP_CFGfor Hygon CPUs. - Emit a one-time notice that the mitigation is being enabled.
| File | Description |
|---|---|
arch/x86/kernel/cpu/hygon.c |
Enable the FPDSS mitigation and add a one-time notice in init_hygon(). |
Review effort: Balanced
Upstream: no
AMD Zen 1 and Hygon are both affected by FPDSS(Floating Point Divider State Sampling): allows an attacker to leak data via floating point division unit. The upstream fix e55d98e ("x86/CPU: Fix FPDSS on Zen1") fix FPDSS by enable msr 0xc0011028 bit 9, which also can fix FPDSS on Hygon CPU.
Hygon-SIG: commit none hygon x86: hygon: Fix FPDSS on Hygon
Summary by Sourcery
Bug Fixes: