Received: by 2002:a17:90a:9103:0:0:0:0 with SMTP id k3csp11811990pjo; Thu, 2 Jan 2020 14:42:25 -0800 (PST) X-Google-Smtp-Source: APXvYqysKZY/IZ/cqt5e17V2y/fIOKMvk2khhOEUvuC+n+7vr/xTySRZSl5vgYI4BA3KcErALQa1 X-Received: by 2002:a05:6830:22ee:: with SMTP id t14mr91933243otc.236.1578004945696; Thu, 02 Jan 2020 14:42:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578004945; cv=none; d=google.com; s=arc-20160816; b=NCAoRs2H78lKeUC+mfl9l0+5JgQKj5HJk8+IMgBuFDo2YuEQtDcjcE0Atmlzj2t2em H0uszwA3lSGB285qI+0n27iXeu1ywHIS/pMA3dUbuF7LinGx4WknnqNQBcTnSp0P2dLo TUBtu5qNFQ6E7YuIWhFVc1gLiO7spMnfYZ+QawZhIH7xJj6Myywt07tTcklC5cT0YZsA TIvAHqKgf+2/OTCMzvVEXrHPF4XroLY8/EWKpux/11t6+Ajm/4HAhpQ1i3l5hST6qGg5 Z6Bd7a0dq3HiUqRtbNsM8EaptyaguqZqgPiH+IiwUzv+1hFRT68wYe+C52Xk60hdYdX/ Vq6A== 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=4WKoiKF5Pvfoj37p+osAUxBo5GPk5fNB/4UFAaQKSqk=; b=IQU7gda0RTfcRohecDHGP7bCj3Jeh3NCZ/11lIYUOa2mGEwrSAhzjN6lxNJQshuEPg H0geb970VXjxMfYwCnMSHnUlqANSKWfhOyy4BByxepiuAmdmtFI9nbkWpYnMfljnNN6p hCciZDzMpmVoz8c+HaZEmchpcbzLCHER+zYmgBKPVyDx+c1BU6NTFz8uScg0ARJvgIzX OfPpz+9urN321AMB01CN/2TSebqVB/DUQaAtZqYPpKlOuXrbbBFgrhwP04gBSfbBxw3I 9yrfmciZmG6uVR8m+7gaCvDnuQOogL52/aAVrhJNYaj95hVepWsxAjlHffhcDX/W9YO9 dTwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mOBFSwH0; 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 p21si20400835otk.162.2020.01.02.14.42.14; Thu, 02 Jan 2020 14:42:25 -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=mOBFSwH0; 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 S1731213AbgABWlE (ORCPT + 99 others); Thu, 2 Jan 2020 17:41:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:50572 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730607AbgABWhn (ORCPT ); Thu, 2 Jan 2020 17:37:43 -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 02BAC21835; Thu, 2 Jan 2020 22:37:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578004662; bh=K6HirVqhJpK5VtHANmdbKAC4jtJhKUL1RIZrVexjqaM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mOBFSwH04kX+iaK163lPG8pff8QoXHTnvtstHAZIglr1cBFEdSYa6yNWcKd7NG5dA +X6+3U0UIpZZ6kUpC1YkV7W4DtX1UGxteBDzNbvqVwt3wi3droX+NtCdrYqMxsEvMi A3+QNzIYTFM1EjbTakBE5DXUVbfaVxSzHqdCGo7g= 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 4.4 100/137] powerpc/security/book3s64: Report L1TF status in sysfs Date: Thu, 2 Jan 2020 23:07:53 +0100 Message-Id: <20200102220600.484272850@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220546.618583146@linuxfoundation.org> References: <20200102220546.618583146@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 156cfe6d23b0..fc5c49046aa7 100644 --- a/arch/powerpc/kernel/security.c +++ b/arch/powerpc/kernel/security.c @@ -161,6 +161,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