Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17893625ybl; Thu, 2 Jan 2020 14:14:53 -0800 (PST) X-Google-Smtp-Source: APXvYqz3TVgjW7eJL6yjRieIn2p8rHFc68zf5qgti/GRmrvgGIU5sKvUfdVXoA7aioBEdSvXlycV X-Received: by 2002:a05:6808:9ba:: with SMTP id e26mr3197912oig.81.1578003293243; Thu, 02 Jan 2020 14:14:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578003293; cv=none; d=google.com; s=arc-20160816; b=i5FLzFMfwTB+T3rSxJdiMqbByenqVRti1PIBUzKOO0uyUxd0x6RQ+VFX6WhT1I1uqy JGkG6qk3M7p3JgfR9VtDKNinb9BJkWVRAJWTJz96BYAY1cHx+Zbv0pdupzCQ8jULh45P s9Kzq3qzo6EGPp/09ap0nYC47E8Eks27s6GnZ/83KZuLvebI50z0q9cLCWYK2cVfoHEE 7ksRPyzkipCEm41ZyjLn9rzfzW0gu6k1OoM2SuM5MAcuSFOYYJFqsa+mGzpFTex3W17z 299ZV7B7kc5YLByz4hSBLd410V9TUq79nCLc8m9CkatiohE99Qa+i1+mlLUhldQwYrMS g47w== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GdzBJW6L4A/Us6S3hlpG7tqlEPjoFqmJt5LXydJcwaU=; b=v9txfCIJ4PwNLcWdXtnQXILHQC/KV+VKB125oAamWD5a+W76ubHSLqVKip9xruiTgN jxR2p92uCe8hMcwaBQpSdZGJcaeQgNVrVDWSyqfwF/g71usQeX0MG/bnaX8OSuE+NMM3 bsLpR0xFLO3A9BFl7V2cxhTl6ZFjdXvlWTU4eVGBSJORbSeWmSCoEJXHL/w9Vg5v5EY0 YQtYHUrji5bBT2WgORBKB6IBm26/qGBLqEwAKp5VqsnQE74rrAFcolPzQJVn7dNiN+6+ YXyrH7eCgBVW0vn7srYWJNfoCR8RtE8IHDeBjb2v6DE5ezttFRp6fwPamIuWZxko38gh a4eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SwVDNAK8; 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 i12si26667085oik.171.2020.01.02.14.14.41; Thu, 02 Jan 2020 14:14:53 -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; dkim=pass header.i=@kernel.org header.s=default header.b=SwVDNAK8; 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 S1727507AbgABWMg (ORCPT + 99 others); Thu, 2 Jan 2020 17:12:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:51640 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727482AbgABWM3 (ORCPT ); Thu, 2 Jan 2020 17:12:29 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 16D7021D7D; Thu, 2 Jan 2020 22:12:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003148; bh=d0+e1t3bL9jC5hQtgr2E5q3bRMzppD1fLXlNQxZvUC0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SwVDNAK8T1dC2Ta3ZCW5bqUEW8NmA9BAlW0lMYpYQ1T0JrXwMPYZh89uNCsyh3AhV OtWiKV94LHuEa+NUOCudO6A8m36EAIsFGGwt7lYHmeNrTpykr0cb7rh/1eUnkowE9P 3FcpKW6lcWBvb0I6qK09ZYm0DBTpm2E8IMLWgXkk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Anthony Steinhauser , Michael Ellerman , Sasha Levin Subject: [PATCH 5.4 040/191] powerpc/security/book3s64: Report L1TF status in sysfs Date: Thu, 2 Jan 2020 23:05:22 +0100 Message-Id: <20200102215834.225837187@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102215829.911231638@linuxfoundation.org> References: <20200102215829.911231638@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anthony Steinhauser [ Upstream commit 8e6b6da91ac9b9ec5a925b6cb13f287a54bd547d ] Some PowerPC CPUs are vulnerable to L1TF to the same extent as to Meltdown. It is also mitigated by flushing the L1D on privilege transition. Currently the sysfs gives a false negative on L1TF on CPUs that I verified to be vulnerable, a Power9 Talos II Boston 004e 1202, PowerNV T2P9D01. Signed-off-by: Anthony Steinhauser Signed-off-by: Michael Ellerman [mpe: Just have cpu_show_l1tf() call cpu_show_meltdown() directly] Link: https://lore.kernel.org/r/20191029190759.84821-1-asteinhauser@google.com Signed-off-by: Sasha Levin --- arch/powerpc/kernel/security.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/kernel/security.c b/arch/powerpc/kernel/security.c index bd91dceb7010..298a2e3ad6f4 100644 --- a/arch/powerpc/kernel/security.c +++ b/arch/powerpc/kernel/security.c @@ -168,6 +168,11 @@ ssize_t cpu_show_meltdown(struct device *dev, struct device_attribute *attr, cha return sprintf(buf, "Vulnerable\n"); } + +ssize_t cpu_show_l1tf(struct device *dev, struct device_attribute *attr, char *buf) +{ + return cpu_show_meltdown(dev, attr, buf); +} #endif ssize_t cpu_show_spectre_v1(struct device *dev, struct device_attribute *attr, char *buf) -- 2.20.1