Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp629568imu; Fri, 4 Jan 2019 04:19:21 -0800 (PST) X-Google-Smtp-Source: ALg8bN51JdQADSpLa999lADE+Rqxn1LcmAzdHC3sCvE+Lz172jD+j+ervvqdmWUA2eEqOkhxSSiJ X-Received: by 2002:a17:902:8d94:: with SMTP id v20mr16153217plo.194.1546604361246; Fri, 04 Jan 2019 04:19:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546604361; cv=none; d=google.com; s=arc-20160816; b=QJxGe1vQ5Xp8StydS56pOUMTe+99zoPVCIEFczlaQFbMHeVtJPFgkpRe98nswJrPrl BJ4Vla3886gcX7AqHlq7+CfRJI1yJa6l9TOc8A3QrOHBZij5D+3dnFbY6PqJk7WXEnwN tM0K/V3jpvBJaibi2vOF0Bc4sON5FWw84HvlVGLdF2oOc8QGD8/vSvBk+eYCPVzkOhHT wqeEGSeZQZvgKElw8j7kbKB2g13kqyItcxkdeV8OkDrp7jcpBmNaOq0YBTMDeRRT3oFS /1FW3AeLypfSUi6MY6omIPBANwrNMGEpuSyzpub2qoQkUjyMpkQjRrFJfTipIJqXI619 8d9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=9H3jMWPyHAsgyYKzM1v0t1SxU2Mk+gDxvRWHzcsa7RU=; b=GcCZV+Pr3Zfg1VyRt627jRG5P8c1WRlcu3px4s43sS0k9XB1834fUQ/jVWwTTrE8EJ 0MY+a5bRdLtKoHElXQF2FD1rQPMhK9zTepdyTa6WJhzibwGhjXumT+UBF53JK/UdqKFE ZfTATYnOkR7KeMJ7Ywb7AywKNWPcpmhRcwePbRwnZufSDsJj4jHfRcZ5p/mIAOCutNPE bjoNmcfu9QmDNGUGFl9SWPEIpd1zOAw78FENt/izuG50JPzfGWS5BnuSGIU9m/8nwt/x 1J/2kr8PNzRzf39Z1wwxPhWHBCqJsYtgHqsutiLRrQFDJC/wpS230TUt4jGDnX9DcuVf cFsw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n59si40725230plb.388.2019.01.04.04.18.52; Fri, 04 Jan 2019 04:19:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726382AbfADKNM (ORCPT + 99 others); Fri, 4 Jan 2019 05:13:12 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:39276 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbfADKNM (ORCPT ); Fri, 4 Jan 2019 05:13:12 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B895DEBD; Fri, 4 Jan 2019 02:13:11 -0800 (PST) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 84A453F575; Fri, 4 Jan 2019 02:13:11 -0800 (PST) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 074761AE0C51; Fri, 4 Jan 2019 10:13:12 +0000 (GMT) Date: Fri, 4 Jan 2019 10:13:11 +0000 From: Will Deacon To: Jeremy Linton Cc: Stefan Wahren , Dave Martin , mark.rutland@arm.com, julien.thierry@arm.com, mlangsdo@redhat.com, Konrad Rzeszutek Wilk , suzuki.poulose@arm.com, marc.zyngier@arm.com, catalin.marinas@arm.com, "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, steven.price@arm.com, shankerd@codeaurora.org, Dave Hansen , Peter Zijlstra , Borislav Petkov , David Woodhouse , Greg Kroah-Hartman , ykaukab@suse.de, Thomas Gleixner , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 1/7] sysfs/cpu: Add "Unknown" vulnerability state Message-ID: <20190104101311.GB24160@edgewater-inn.cambridge.arm.com> References: <20190103004921.1928921-1-jeremy.linton@arm.com> <20190103004921.1928921-2-jeremy.linton@arm.com> <20190103163740.GC3529@e103592.cambridge.arm.com> <1951199845.271163.1546543806398@email.ionos.de> <5818faa8-e820-7aee-5aaa-42ced65d6f9d@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5818faa8-e820-7aee-5aaa-42ced65d6f9d@arm.com> User-Agent: Mutt/1.11.1+30 (d10eec459b35) () Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 03, 2019 at 02:32:44PM -0600, Jeremy Linton wrote: > On 01/03/2019 01:30 PM, Stefan Wahren wrote: > > > Jeremy Linton hat am 3. Januar 2019 um 17:46 geschrieben: > > > On 01/03/2019 10:37 AM, Dave Martin wrote: > > > > On Wed, Jan 02, 2019 at 06:49:15PM -0600, Jeremy Linton wrote: > > > > > There is a lot of variation in the Arm ecosystem. Because of this, > > > > > there exist possible cases where the kernel cannot authoritatively > > > > > determine if a machine is vulnerable. > > > > > > > > > > Rather than guess the vulnerability status in cases where > > > > > the mitigation is disabled or the firmware isn't responding > > > > > correctly, we need to display an "Unknown" state. > > > > > > > > > i applied your patch series on linux-next-20190103. On my Raspberry Pi 3B+ (defconfig) i'm getting this from sysfs: > > > > l1tf:Not affected > > meltdown:Not affected > > spec_store_bypass:Unknown > > spectre_v1:Mitigation: __user pointer sanitization > > spectre_v2:Unknown > > > > AFAIK it has 4 Cortex-A53 cores (no PSCI firmware), so shouldn't be affected. > > So, for spec_store_bypass, as you noted your getting hit by the lack of > psci/smccc to report the ssb state, and this patch is just reflecting that. > > In the case of spectrev2 it may be correct to blame this patch set because > its displaying "unknown" since your core isn't in the black list, and your > core isn't new enough to have the csv2 bit indicating its not vulnerable. In > this case if we do away with the unknown state, we should probably depend > entirely on the black list and simply display "Not affected" if the core > isn't listed. (meaning we may report cores not affected when they are > missing from the blacklist). > > > > How can this be fixed? > > For ssb, the correct answer is probably fix the firmware, but given the > situation, its likely this kind of machine is going to force an additional > MIDR list to report the state correctly. Maybe Will or someone can chime in > here? Marc Z is already working on this iirc, since we need it to fix the message printed to dmesg about the mitigation status anyway. Will