Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10934834pxu; Wed, 30 Dec 2020 16:34:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJwfwOUNoBhI34rct8GmU5FXPadicSIhpEe7HTfPubgvSHkDt5CU4WMzx1bDWH+KJKyGzLFH X-Received: by 2002:a17:906:b217:: with SMTP id p23mr12354689ejz.461.1609374859182; Wed, 30 Dec 2020 16:34:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609374859; cv=none; d=google.com; s=arc-20160816; b=g0E789KOQhnL2M7SOrf4QM3Shwkc4JnIjKlHKQZhXSz2q9uzGzwq2d2oPhb+xQdWHx A9SyMAbJeB+TYQ0LK20XJNhI171s2tz3bdnt6RGoVUskSipP5+M9waMpauCgsSSVvF4X BGXc8yNWDlIiRghZaiktIPdh1aJo2IaOhY3KM4OhSb6BP0+5sFO1GG/ZIeMOBXrrRl4I kL807IBvc0vKje/SzC5kFDs8wF5d6LmVvAYrjP1kGY82+wn039EdK6QzowkbnQ4piPV+ XAYe9DzwhKuJvKT+GhQNDJVifcOctWmizjU/xUhjtTQs6LvNyZZWYUdSrDFTIInGVxF2 Cvrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=AXI24aUtoEI0Yq3szqXgG2ef/FFAw1nhLHbKxQL+QcI=; b=H2zsHc6CnXNGiPbKBo0DONtT4sTByiDIvm/VvsWBS/b7oKi++IPGoWqJL4GoZ5fFT0 vGtMlNdgEWxb/7W/WquHYzFsPOc40EqhtB413if+RXtrsFD9YzaTc93TkDptHwj74y8Q 2gtTMvBh6KPgjp1QnNBSI4I3wD4YVjeDwyt3mbMVKj6KXQHWsjCR/FWjIw3bUoXFh0QA KDpSbg3SuusyDul6871nbzWGJ1uhbHcn7bi1GLN/+ifV2SfCGVrQ9zj2SUOgCre9H1ou 2+3uPhneMtXNjoYcEbNFql9tocxdxS2War2iM291yCpnpBVtJDzugQkEXEAmSbZ8AQDy UcVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TnGQQBda; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y24si23813096edv.565.2020.12.30.16.33.56; Wed, 30 Dec 2020 16:34:19 -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=@kernel.org header.s=k20201202 header.b=TnGQQBda; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726486AbgLaAce (ORCPT + 99 others); Wed, 30 Dec 2020 19:32:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:56484 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726434AbgLaAce (ORCPT ); Wed, 30 Dec 2020 19:32:34 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3AD4C2220B; Thu, 31 Dec 2020 00:31:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1609374713; bh=Tn0LiqPnpZnHJamEQGERGFpUWOzDz5GQlr6Pt8wUPYc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=TnGQQBdaVNnXzj9xTIlosUAuwZEXGzXri++IBQZ9fJgXtNcJNMUmjRe1CujIooEv8 QqeKaovIqguHkar6jB8/2arK++Ltn1wsQ05hxIkuXNE/ex2qdSfp0o6GZsr4BTllvZ RbQYX6bRcTCWIbh+VaIO+bDa/rQrWI4DnyG16hWb6VI0CRc5e7InP5C4bgJOxvJeSP drpBrQk0JLxfX/VJ8oOnTt+ojfNgNF2ni8Q7xs5Pi0JF2Nc1N8iC0tiR7TQiLXlS0p IClTgGHTHusWwslXYE8HuOHpozoSuyE7nrY9g/zVH+Sjy2rBkHRiCtjtWDzb47UDO8 jL0Ar5U7k49tg== Received: by mail-io1-f42.google.com with SMTP id 81so15994390ioc.13; Wed, 30 Dec 2020 16:31:53 -0800 (PST) X-Gm-Message-State: AOAM532EaJ9KbzEK7q29Q+3v8AjvJdJvUcIhFDT9ODtOcIxwcqDL2bN4 QA+54Rmv454W0W6TqKtkSuO+YV6eBra6oORJfSw= X-Received: by 2002:a5e:db4b:: with SMTP id r11mr44848340iop.148.1609374712729; Wed, 30 Dec 2020 16:31:52 -0800 (PST) MIME-Version: 1.0 References: <20201230032314.10042-1-jiaxun.yang@flygoat.com> <20201230032314.10042-2-jiaxun.yang@flygoat.com> In-Reply-To: <20201230032314.10042-2-jiaxun.yang@flygoat.com> From: Huacai Chen Date: Thu, 31 Dec 2020 08:31:41 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/3] MIPS: cpu-probe: Vulnerabilities for MIPS cores To: Jiaxun Yang Cc: "open list:MIPS" , Thomas Bogendoerfer , Serge Semin , WANG Xuerui , Alexey Malahov , Paul Burton , =?UTF-8?B?5ZGo55Cw5p2wIChaaG91IFlhbmppZSk=?= , Tiezhu Yang , Paul Cercueil , YunQiang Su , Liangliang Huang , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reviewed-by: Huacai Chen On Wed, Dec 30, 2020 at 11:25 AM Jiaxun Yang wrote: > > 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 >