Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10245876pxu; Tue, 29 Dec 2020 19:25:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJy+ZrzmOm7FElmpv4i/KO+GuHrgRlaJYlsMC50qexZx8jbTV1l7qo8uaKj1OL7gPFTtTmIO X-Received: by 2002:a17:906:b7cc:: with SMTP id fy12mr48247821ejb.44.1609298750443; Tue, 29 Dec 2020 19:25:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609298750; cv=none; d=google.com; s=arc-20160816; b=A59HJubygmTJpq7aYtZy4vc7GRSR3X1qWwdXGU3cIkDJEQmKNqMpjtMUyrJsQt1b9H ZWS5OR6f4uheNCuHCHWOsJbb9RDZ1KIWjPlA7S70IftGiERJzZ7Q0Y34KG+VrZwoMIWb c/ev/847xymntWx4PjecQghG5j9P8Ic6fvewIJwHETys2m0j/v6oERf2JDfw86LdmTdE fN7Apch24KFBa4pFH5ayVqi4LoNuQeeevm8WWzNvbT6DbbGWQsSWtXsyMuaQfNbdyc9Y eADVWAZe+GMcr5Ap9oK0KAKYQ9WHvTD9GKEAIqcWTjQkqF4MsY8wyF5FEFcvsB9uSzPm uhcA== 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=AdOmgShaqlunGJ48VMFBnxSV7/YMKb8EbiuyvXg0/VM=; b=I4onpOzG/nkrpjmAfTZPDdNLP8cdrP2io8tqRlm4KZlGbFVE1pLSoFsrDQoIrYfWbL 91OytPTF2BLyH+VwwKGrm93tq4Sy1kdvH4ldTB8gxqU3OeTVWPdzZe99YUD8Mv//72Vk BWSvudwCc16Ax6gLJERCyHIPdSaH08Vjrv4ncoIFBdQomlLqxCJSaTX6NMJUpngcEzFZ sWVLoL9N+D0uVN5XQtHGE6WMbcTe44wJmw+sXUyEodZUAyd9wXUim3ARrqaE9F2m48pP llEUzcu2K2dWbqUfszAaPUiKUIeCvab4+jPdNi6Mg9wFtRHXQk3ksFDFU7/hSp7WCS2C A5mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=rnk7CxhO; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=NbmE9TJi; 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 dm6si21615873ejc.159.2020.12.29.19.25.27; Tue, 29 Dec 2020 19:25: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=rnk7CxhO; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=NbmE9TJi; 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 S1726218AbgL3DZB (ORCPT + 99 others); Tue, 29 Dec 2020 22:25:01 -0500 Received: from wnew2-smtp.messagingengine.com ([64.147.123.27]:57799 "EHLO wnew2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726138AbgL3DZA (ORCPT ); Tue, 29 Dec 2020 22:25:00 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.west.internal (Postfix) with ESMTP id 0F2E69E0; Tue, 29 Dec 2020 22:24:13 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 29 Dec 2020 22:24:14 -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=AdOmgShaqlunG J48VMFBnxSV7/YMKb8EbiuyvXg0/VM=; b=rnk7CxhO0XzXQ67eUM2W0tosmdC/W OWjDXnT3ihOUbv00SlIyafct7DPxb1JQ7/FuWbYLu3V5MtQf86zYp6Xxw+Syr7CE EHlqsjhK5Qt84Oa7iQXb3SeDxnzbF27Sg6k8aZN9WXqyWXxcBdS5YA32+WJCCnZP ys04T2yFUnj/fT+oVqgstLphTEn7nyJI5OuV9AgU0/d8IxyZMyDGa4opJifH3nOY 5F2UYqDNs9ai+76+/ND2x2W73FVEMt81NiPCSMyY39wlobyoBU82CRAtodyOtMXB puLEfZKcm1xqqgIAU19p4kU9u1HB1K+0ujtEVScKSsUVVEchjNK8Yxuqg== 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=AdOmgShaqlunGJ48VMFBnxSV7/YMKb8EbiuyvXg0/VM=; b=NbmE9TJi USeAc/YdqNAMcGax4YZiJ8xnK14nbafKiIDPK/CnJrbjMma5/WF0B4kJQtxzLzzu X26r7hwzUnaRTK1IEQUnkXH3GzlOjG3z4y4sU639azTmJRA84qEWBOOyUqiMySim j3qLOrD3qpIfkEhUec39tWhAXPyw8A/9R8ugWgA+vKyypUVWSG0+eRMVJ0qEZust mJY1j3DxszkQQaBwA65o2FGWQm9ALefRO8ZeU5/MMqQfabxFpJbBS3hVl8EZRHA6 jC3im1HpOBMC5U0XiCn8CNv8QOokSKdyleUfIx2EqnU+I8CGzBqqns5CD0DWQ9Ss i/KARfkvQaSCDw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddvvddgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeflihgrgihu nhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqnecugg ftrfgrthhtvghrnhepjeegtedvvdefhfdtfffgheffledvfefggeehkeetgfevheeludeu heeuuefgfedvnecuffhomhgrihhnpehmihhpshdrtghomhenucfkphepiedtrddujeejrd dukeelrddujedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepjhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomh X-ME-Proxy: Received: from strike.202.net.flygoat.com (unknown [60.177.189.171]) by mail.messagingengine.com (Postfix) with ESMTPA id 2F014108005C; Tue, 29 Dec 2020 22:24:07 -0500 (EST) From: Jiaxun Yang To: linux-mips@vger.kernel.org Cc: Jiaxun Yang , Thomas Bogendoerfer , Serge Semin , WANG Xuerui , Alexey Malahov , Paul Burton , =?UTF-8?q?=E5=91=A8=E7=90=B0=E6=9D=B0=20=28Zhou=20Yanjie=29?= , Tiezhu Yang , Paul Cercueil , Huacai Chen , YunQiang Su , Liangliang Huang , linux-kernel@vger.kernel.org Subject: [PATCH 2/3] MIPS: cpu-probe: Vulnerabilities for MIPS cores Date: Wed, 30 Dec 2020 11:23:08 +0800 Message-Id: <20201230032314.10042-2-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 Accorading to MIPS's announcement[1], only P5600 and P6600 is affected by spectre v1 and v2, other cores are not affected. So we mark vulnerabilities states for MIPS cores as known and set P5600 and P6600 as vulnerable. [1]: https://www.mips.com/blog/mips-response-on-speculative-execution-and-side-channel-vulnerabilities/ Signed-off-by: Jiaxun Yang --- arch/mips/kernel/cpu-probe.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 03adeed58efb..2460783dbdb1 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c @@ -1688,6 +1688,9 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu) { c->writecombine = _CACHE_UNCACHED_ACCELERATED; + c->vulnerabilities |= MIPS_VULNBL_MELTDOWN | + MIPS_VULNBL_SPECTRE_V1 | MIPS_VULNBL_SPECTRE_V2; + switch (c->processor_id & PRID_IMP_MASK) { case PRID_IMP_QEMU_GENERIC: c->writecombine = _CACHE_UNCACHED; @@ -1794,10 +1797,12 @@ static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu) case PRID_IMP_P5600: c->cputype = CPU_P5600; __cpu_name[cpu] = "MIPS P5600"; + c->vulnerable |= MIPS_VULNBL_SPECTRE_V1 | MIPS_VULNBL_SPECTRE_V2; break; case PRID_IMP_P6600: c->cputype = CPU_P6600; __cpu_name[cpu] = "MIPS P6600"; + c->vulnerable |= MIPS_VULNBL_SPECTRE_V1 | MIPS_VULNBL_SPECTRE_V2; break; case PRID_IMP_I6400: c->cputype = CPU_I6400; -- 2.30.0