x86/srso: Add SRSO mitigation for Hygon processors

Message ID tencent_4A14812842F104E93AA722EC939483CEFF05@qq.com
State New
Headers
Series x86/srso: Add SRSO mitigation for Hygon processors |

Commit Message

Pu Wen Sept. 28, 2023, 6:59 a.m. UTC
  From: Pu Wen <puwen@hygon.cn>

Add mitigation for the speculative return stack overflow vulnerability
which exists on Hygon processors.

Signed-off-by: Pu Wen <puwen@hygon.cn>
Cc: <stable@vger.kernel.org>
---
 arch/x86/kernel/cpu/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Borislav Petkov Sept. 28, 2023, 7:30 a.m. UTC | #1
On Thu, Sep 28, 2023 at 02:59:16PM +0800, Pu Wen wrote:
> From: Pu Wen <puwen@hygon.cn>
> 
> Add mitigation for the speculative return stack overflow vulnerability
> which exists on Hygon processors.
> 
> Signed-off-by: Pu Wen <puwen@hygon.cn>
> Cc: <stable@vger.kernel.org>
> ---
>  arch/x86/kernel/cpu/common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
> index 382d4e6b848d..4e5ffc8b0e46 100644
> --- a/arch/x86/kernel/cpu/common.c
> +++ b/arch/x86/kernel/cpu/common.c
> @@ -1303,7 +1303,7 @@ static const struct x86_cpu_id cpu_vuln_blacklist[] __initconst = {
>  	VULNBL_AMD(0x15, RETBLEED),
>  	VULNBL_AMD(0x16, RETBLEED),
>  	VULNBL_AMD(0x17, RETBLEED | SMT_RSB | SRSO),
> -	VULNBL_HYGON(0x18, RETBLEED | SMT_RSB),
> +	VULNBL_HYGON(0x18, RETBLEED | SMT_RSB | SRSO),
>  	VULNBL_AMD(0x19, SRSO),
>  	{}
>  };
> -- 

Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
  

Patch

diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 382d4e6b848d..4e5ffc8b0e46 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -1303,7 +1303,7 @@  static const struct x86_cpu_id cpu_vuln_blacklist[] __initconst = {
 	VULNBL_AMD(0x15, RETBLEED),
 	VULNBL_AMD(0x16, RETBLEED),
 	VULNBL_AMD(0x17, RETBLEED | SMT_RSB | SRSO),
-	VULNBL_HYGON(0x18, RETBLEED | SMT_RSB),
+	VULNBL_HYGON(0x18, RETBLEED | SMT_RSB | SRSO),
 	VULNBL_AMD(0x19, SRSO),
 	{}
 };