Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10246606pxu; Tue, 29 Dec 2020 19:27:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwCu17zCq9oLXYxxX6ukUpMQRLx5Yt+VLc8NgSvPqFlOYh4KVapobWo8A+vql8oHyVMJ09z X-Received: by 2002:a50:875b:: with SMTP id 27mr49680146edv.24.1609298870908; Tue, 29 Dec 2020 19:27:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609298870; cv=none; d=google.com; s=arc-20160816; b=KY41DBBe8yqpMOjLeDPnQvVGUe5eJLgA5TUonQj4cYKwKN77I0E5ws/0dI0NuLsIW7 gc8OSkWKXC1qEODZpDCLKJLNuKRieUcYSuwdMzXKoCRNTH+eBa32pggBsr2At/44EexE j4rhKRE8RTw+on7ek+PXZb/gHPXT37KQWrvBHYwfH9CCGK+AHxQmk5p9tlfEn5Ze1ngy AJdJJiRBguxtyXQJfHeFiSEGLQpyW5UjPHTW3+yPfLNHxbAPHiq8WONBKovI9PZsb1vn KYoI28YS9rHZ0MvmVxe0++tpOCe25YOq+kqZjexEs4PMeQoyPaxW+cE9gYLhAneUexJ0 Fpag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=4MYdTmaPFbfIp2JehjVAudmUNN+0za867mNhsvApiQo=; b=c7ia1ZovPQYOwQkuTv74/MTohPay13BAFwaVu2wz3SEX6zlMsumcaWMmrkHOxPpTfm DtEk0tMhPfdWUsmZc5itv4u17DACZ8xUOVBAwDvmVUtuqKMHBHf4jO7vs5/2aXzMruIw 680Vovw6fiP2d3R/RRo0bzwjBJ/N4Z5MM0bQFqkjv6UWVxKfaTrxCvnypK3yv4lS/AIf A4HmOpSAhSCyH39msly5sovp9bSUuxsGNknDHeCfwu/ln2Ovi6FT6/haYd8YtqXVSRka RHi3LQALibSQ70Y+cbYHmmHGnGrsKNUDP5B/8s3T8q7v8s1FXPo+b18oNMfJwwQzt55f 6p3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=w0m+HLjD; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="iwsh/Tpg"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o6si21182349ejj.354.2020.12.29.19.27.28; Tue, 29 Dec 2020 19:27:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=w0m+HLjD; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="iwsh/Tpg"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726322AbgL3DZb (ORCPT + 99 others); Tue, 29 Dec 2020 22:25:31 -0500 Received: from wnew2-smtp.messagingengine.com ([64.147.123.27]:41083 "EHLO wnew2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726138AbgL3DZb (ORCPT ); Tue, 29 Dec 2020 22:25:31 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.west.internal (Postfix) with ESMTP id BBC4C9FE; Tue, 29 Dec 2020 22:24:24 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 29 Dec 2020 22:24:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=4MYdTmaPFbfIp 2JehjVAudmUNN+0za867mNhsvApiQo=; b=w0m+HLjDLPTjyhXGsS7hqGaucbE1s qQZw61LaFryTPgXU7puFZTrW/FkQUUxO6zHErQEHSDaMW/ETQzuePdI4idJ6Voje pLDIDTu2aWThVfqwwf0eheBurVklUJhVin+0ju6uNWAs7Vb8AJaHIXbDrYYDsuv4 Ys7G91saQDfTDQgoemzAFjRjhuQDhlPOLlh0qye2yBQvpVISn1KqruapYuOsLcaS DKXAFV0ESk/vY7hIwUzwz5W73rBvXfEHwDUzNmReske5PXbySyf5At9+p3qfSGRf CKgGzcf7PjOV3NggZQy9AWDgeq+KUuWIVwXfkWEu5X6Hej24cHMyerq4w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=4MYdTmaPFbfIp2JehjVAudmUNN+0za867mNhsvApiQo=; b=iwsh/Tpg /SuEtceUNp2bcq4TNUILvg5J69abZ+iTwRUCe0qmwsdQI3AfYXbItxmuwxBgQPdU RPuC301cva2beqTEuBybTHzKuCszknI0rDYsIGk+mX/m7ExV3QxhA5+i4kk0HvV5 4hkuaRNCchTRL0F3kdL9fxs3m6Miuu/yVmUV+obeI214+vydxVF+NuC2Nvn75PLF km10szXIbujhH65oxjuDp/cEmrK6jSPcBbxbIQajevt5f+FuSWe2vgppyxQoYojG 3CvANJeYVs/LFwDKrxqqdlzN+9zG8ax/h9noUIRgQacVsdYvGZIn+lKP96AxXGbn 2In3wuHOrqEy2w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddvvddgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeflihgrgihu nhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqnecugg ftrfgrthhtvghrnhepjeeihffgteelkeelffdukedtheevudejvdegkeekjeefhffhhfet udetgfdtffeunecukfhppeeitddrudejjedrudekledrudejudenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjihgrgihunhdrhigrnhhgsehf lhihghhorghtrdgtohhm X-ME-Proxy: Received: from strike.202.net.flygoat.com (unknown [60.177.189.171]) by mail.messagingengine.com (Postfix) with ESMTPA id B50581080057; Tue, 29 Dec 2020 22:24:18 -0500 (EST) From: Jiaxun Yang To: linux-mips@vger.kernel.org Cc: Jiaxun Yang , Thomas Bogendoerfer , WANG Xuerui , Alexey Malahov , Serge Semin , =?UTF-8?q?=E5=91=A8=E7=90=B0=E6=9D=B0=20=28Zhou=20Yanjie=29?= , Paul Cercueil , Tiezhu Yang , Huacai Chen , YunQiang Su , Liangliang Huang , linux-kernel@vger.kernel.org Subject: [PATCH 3/3] MIPS: cpu-probe: Vulnerabilities for Loongson cores Date: Wed, 30 Dec 2020 11:23:09 +0800 Message-Id: <20201230032314.10042-3-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20201230032314.10042-1-jiaxun.yang@flygoat.com> References: <20201230032314.10042-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Loongson64C is known to be vulnerable to meltdown according to PoC from Rui Wang . Loongson64G defended these side-channel attack by silicon. Signed-off-by: Jiaxun Yang --- arch/mips/kernel/cpu-probe.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 2460783dbdb1..24b21f51353c 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c @@ -2092,6 +2092,8 @@ static inline void cpu_probe_loongson(struct cpuinfo_mips *c, unsigned int cpu) c->ases |= (MIPS_ASE_LOONGSON_MMI | MIPS_ASE_LOONGSON_CAM | MIPS_ASE_LOONGSON_EXT | MIPS_ASE_LOONGSON_EXT2); c->ases &= ~MIPS_ASE_VZ; /* VZ of Loongson-3A2000/3000 is incomplete */ + c->vulnerabilities |= MIPS_VULNBL_MELTDOWN; + c->vulnerable |= MIPS_VULNBL_MELTDOWN; break; case PRID_IMP_LOONGSON_64G: c->cputype = CPU_LOONGSON64; @@ -2100,6 +2102,8 @@ static inline void cpu_probe_loongson(struct cpuinfo_mips *c, unsigned int cpu) set_isa(c, MIPS_CPU_ISA_M64R2); decode_cpucfg(c); c->writecombine = _CACHE_UNCACHED_ACCELERATED; + c->vulnerabilities |= MIPS_VULNBL_MELTDOWN | + MIPS_VULNBL_SPECTRE_V1 | MIPS_VULNBL_SPECTRE_V2; break; default: panic("Unknown Loongson Processor ID!"); -- 2.30.0