Received: by 2002:a17:90a:9103:0:0:0:0 with SMTP id k3csp11791805pjo; Thu, 2 Jan 2020 14:21:14 -0800 (PST) X-Google-Smtp-Source: APXvYqxOiOjW/CqHs0I8a5qe3shvumneEt/KPrPsX6ndajiDIEcKsuqzwv4Z5QMuSVrgmdXQpukb X-Received: by 2002:a9d:369:: with SMTP id 96mr85500661otv.228.1578003674506; Thu, 02 Jan 2020 14:21:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578003674; cv=none; d=google.com; s=arc-20160816; b=wa8ypsozIV/lU6pfUDYFUJDpn31Yi0+WZZlbztEr0/iAUyqahAiCEzLp2ersOqJ8JC 62kHtrY41dTqxXGhYjgUlEcIWL0XR3E3Y0a5tvGiq9HkyKcegQnPzOF3/QYVHv/TiB29 Qr2LxL3XxUpsb/R2MGNOONuklsZaX2pgz0K2RrNRkgyqBFeHeezu9adewyaIuyiyGzFI 5U9B3Z54KGgZ3T9LYT0Dw60Dd0p8lTmbs1YMa2tVpDidRbkna8CkixHWIV3wZSDY+nlQ 9FPLS/oAFjrojmA/DSudBS88lcFI9lD/OisdP3H3M9ndUIZAnHrxTdda+jV3XU/KCSNC VAog== 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=I69n+OO965xQmvMusH3qKURG1UnV3fuShZUiv1Xs18o=; b=COHljp6F4yp0M0OfGaDPTqJwr6jsKgE0mKySajeD4tQewcTnWEzpiGe4DXaVYm+Wma o+9aqT1eYn1zOuElrEsN25fieiuc4N4gklvKWdqtrk2eI7FtDxbC5ZT+zo0HCZj4rnoW nLG2pBhy+pSDGP0xoGRfwDzQHRKk8Dns9sDBdO5w7FlqqT9RegPtXMyQ8FKxYNQT7iep DqtPY571cmMNT5SmXv56sqBR0HzB257tpfyW6emNfsF48McUgSrBT5nmQY2zjH4JR15Q C/Q4NJesniq4GJyGW2A7b+KkDSSOkqhqTGmSF8ogLQ4YY2LJ0tXm9r5o1NnqI8EKr8hL 53PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YJYHSa+h; 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 l26si28254663oti.152.2020.01.02.14.21.02; Thu, 02 Jan 2020 14:21:14 -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=YJYHSa+h; 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 S1728791AbgABWU0 (ORCPT + 99 others); Thu, 2 Jan 2020 17:20:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:37864 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728781AbgABWUZ (ORCPT ); Thu, 2 Jan 2020 17:20:25 -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 B80062253D; Thu, 2 Jan 2020 22:20:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003625; bh=Ey+4mqV5as7tmiwq9ePBpI3MdmtvqTfueHdaI/JCZIg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YJYHSa+hE3VezLI+cgXHn3AOukyHZszZt3NMhYWt3HljDF+vY6ymA49+Ie6EGepXp bttnRQc1ypQWHayM3E0cAuO9t7BVrCo24TQMxxKWH/77G2mk4Jm0mcixfPlpaNbHhT A8wnRTixvZou9lBM61gj0eCABD24vP3U8uRUofdk= 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.19 020/114] powerpc/security/book3s64: Report L1TF status in sysfs Date: Thu, 2 Jan 2020 23:06:32 +0100 Message-Id: <20200102220031.162084250@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220029.183913184@linuxfoundation.org> References: <20200102220029.183913184@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 a5c5940d970a..a4354c4f6bc5 100644 --- a/arch/powerpc/kernel/security.c +++ b/arch/powerpc/kernel/security.c @@ -160,6 +160,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