Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp240994imu; Thu, 3 Jan 2019 18:38:12 -0800 (PST) X-Google-Smtp-Source: AFSGD/VLMSx6PuLqdKbeu9gRDC5j08kus9QswfYeQNemuOaGWobxMhrexLE34UexicbFiCIxEdSt X-Received: by 2002:a62:9fd9:: with SMTP id v86mr50329953pfk.191.1546569492136; Thu, 03 Jan 2019 18:38:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546569492; cv=none; d=google.com; s=arc-20160816; b=F93yzGfauGKA+eq9MUrMby5WpQwjKI2RcjVMMcWhDC5EqWUl5jh7pjmMPIHktDFVD2 pLfOlT2c3dNBXiV8cCDjcXoo7H+zmJTNNs55n/7chWJ00rHZzA1vmENBrXbcsdwa4s7/ mrnxbT5JaiJLEGtAS+uvMNmaRz2cCpMfmgj00QmS6OUGNRK52Tn0nP6idYrHJmjO/FL0 s3VRh+QZUArfZJRA/RMj5yt0qibYiOkiMRDZocNmGh5FGnzdqq47ks3JmL+9DFw6p4MU A4D3gtoxSvmUE9RXhaPhS52IoHHfdbz20JSSurigXQgZP7PProAKuiPhS0U9bfRP/2Eo uLHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=NlhT239mPwJNfea82GnpVRzfA61F7G9jBgRJ0+ZJ8n0=; b=Yk7qCNhyAWDnNTb/DU6PpDOYEOqb3AtRkfxnBTNIn4JN6ZcIeLlaHsI8utveMRNALU s3YJvGGOEJFE7bWZsh62PuNod9F1dg6Ie6OEiWyzq32LHIp++HCs4pS4EGS301bD8hgY /ROg5oR0PndbQKKX5U9Os2U0TgiBAeZxTc8pVQAmA54Pj1f+ZcGXDcmz8k4Pt5A3Af8p CHFambogAYjWAFwN1QwI3CgML56Jsopv9+M2zwtFBktp8lpfJLL6fEzhr9F+eaqQ8Fsg mKFUUxyrTJ3aZGsn+6lmiswqd8YueDciUfqH/7K5vGz5/rjwtPltoMJPzK7ZYeqgC9MZ 7fgg== 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 69si16773214pgc.164.2019.01.03.18.37.35; Thu, 03 Jan 2019 18:38:12 -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 S1727849AbfACUct (ORCPT + 99 others); Thu, 3 Jan 2019 15:32:49 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:56688 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726036AbfACUcs (ORCPT ); Thu, 3 Jan 2019 15:32:48 -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 063DBEBD; Thu, 3 Jan 2019 12:32:48 -0800 (PST) Received: from [192.168.100.243] (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9AE393F575; Thu, 3 Jan 2019 12:32:46 -0800 (PST) Subject: Re: [PATCH v2 1/7] sysfs/cpu: Add "Unknown" vulnerability state To: Stefan Wahren , Dave Martin Cc: 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" , will.deacon@arm.com, 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 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> From: Jeremy Linton Message-ID: <5818faa8-e820-7aee-5aaa-42ced65d6f9d@arm.com> Date: Thu, 3 Jan 2019 14:32:44 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1951199845.271163.1546543806398@email.ionos.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 01/03/2019 01:30 PM, Stefan Wahren wrote: > Hi Jeremy, > >> Jeremy Linton hat am 3. Januar 2019 um 17:46 geschrieben: >> >> >> Hi, >> >> 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? For spectrev2, wait for another version of this patch.