Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2930997ybc; Thu, 14 Nov 2019 01:08:44 -0800 (PST) X-Google-Smtp-Source: APXvYqwGjpMXQvwIIs6Xz2IPiUtcaAsH1ElOLGxDaLSvsADRRgNO96iJilkMI7AQ6M5IbSGTzzMc X-Received: by 2002:a50:91ba:: with SMTP id g55mr8584263eda.118.1573722524236; Thu, 14 Nov 2019 01:08:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573722524; cv=none; d=google.com; s=arc-20160816; b=TOiFFrcx7cDZ+DcfckcCV3G+9r8vCJYj9v3l81tFTPIrGPUk24MvgOsR0uTBqoe/m1 bTCyZ68/i3B/w5vpzCCxJEmNIyPjXNBdXa7nwcCKeqUN0oWIx6VN7XCXYg5A8ikRtf+z 6ZoPTZT2VCqQF7UhWPiwX9h/ikBGhe07g/TSIOV5Rv09cE8T/4j+aZ+A2ZrYz0FYTniU x02NcgkE8YpgN6V+VBfoDcUQmjskBmUEdMZMlfsnr76qg9NkjhADKh5PMtWEWxABwu6s /ZUDklwPrIGb2Djvqq3IuF1Kc+zn8PMCZFGjmOSajgOiuTjkNRxZ+8drGS/c9xLst6Y9 NBVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:subject:cc:from:to :in-reply-to; bh=fyF7DjD5E+33Vwiz5bat7q+Ua/ZyIyNrGueuF3Aq/XA=; b=eykdvbKgDAcALUhzin+XsfjeAFyUhNjm93QdfFfPEXC24g22pTvCpXm15SNLKPsJ64 /khb8PDDuxcdeYmhCkS54JouSkJCzBDy9rTUH5Zt0ghx97UZ+tLScQk16TMwMJhgnG7y MR4ocFS2qzVt/ucxfKR9g8PJAtk5kn52bRrBPWBhfLaHN1KhVe6zCFjD2jV5f3k5nlr6 fVvd95PYIrkIdUiCJDgYx+LfOx8DE/8V2zN1FH74WnPT0X6cKFX01Qd+vnNlBTXFikAt xYoHkVQQR5PDWRDGsQiiXOep+FLAAmUATp2tbzRssTpGbwjPjoUgYv3R2+AsEieumR1U XCQw== 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 ce16si3107673ejb.118.2019.11.14.01.08.19; Thu, 14 Nov 2019 01:08:44 -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 S1726254AbfKNJHi (ORCPT + 99 others); Thu, 14 Nov 2019 04:07:38 -0500 Received: from ozlabs.org ([203.11.71.1]:34503 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725920AbfKNJHi (ORCPT ); Thu, 14 Nov 2019 04:07:38 -0500 Received: by ozlabs.org (Postfix, from userid 1034) id 47DFxM5mVHz9sNT; Thu, 14 Nov 2019 20:07:35 +1100 (AEDT) X-powerpc-patch-notification: thanks X-powerpc-patch-commit: 4e706af3cd8e1d0503c25332b30cad33c97ed442 In-Reply-To: <20190502210907.42375-1-gwalbon@linux.ibm.com> To: Gustavo Walbon , linuxppc-dev@lists.ozlabs.org From: Michael Ellerman Cc: mikey@neuling.org, maurosr@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, npiggin@gmail.com, diana.craciun@nxp.com, paulus@samba.org, leitao@debian.org, msuchanek@suse.de, gwalbon@linux.vnet.ibm.com Subject: Re: [PATCH] Fix wrong message when RFI Flush is disable Message-Id: <47DFxM5mVHz9sNT@ozlabs.org> Date: Thu, 14 Nov 2019 20:07:35 +1100 (AEDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2019-05-02 at 21:09:07 UTC, Gustavo Walbon wrote: > From: "Gustavo L. F. Walbon" > > The issue was showing "Mitigation" message via sysfs whatever the state of > "RFI Flush", but it should show "Vulnerable" when it is disabled. > > If you have "L1D private" feature enabled and not "RFI Flush" you are > vulnerable to meltdown attacks. > > "RFI Flush" is the key feature to mitigate the meltdown whatever the > "L1D private" state. > > SEC_FTR_L1D_THREAD_PRIV is a feature for Power9 only. > > So the message should be as the truth table shows. > CPU | L1D private | RFI Flush | sysfs | > ----| ----------- | --------- | ------------------------------------- | > P9 | False | False | Vulnerable > P9 | False | True | Mitigation: RFI Flush > P9 | True | False | Vulnerable: L1D private per thread > P9 | True | True | Mitigation: RFI Flush, L1D private per > | | | thread > P8 | False | False | Vulnerable > P8 | False | True | Mitigation: RFI Flush > > Output before this fix: > # cat /sys/devices/system/cpu/vulnerabilities/meltdown > Mitigation: RFI Flush, L1D private per thread > # echo 0 > /sys/kernel/debug/powerpc/rfi_flush > # cat /sys/devices/system/cpu/vulnerabilities/meltdown > Mitigation: L1D private per thread > > Output after fix: > # cat /sys/devices/system/cpu/vulnerabilities/meltdown > Mitigation: RFI Flush, L1D private per thread > # echo 0 > /sys/kernel/debug/powerpc/rfi_flush > # cat /sys/devices/system/cpu/vulnerabilities/meltdown > Vulnerable: L1D private per thread > > Link: https://github.com/linuxppc/issues/issues/243 > > Signed-off-by: Gustavo L. F. Walbon > Signed-off-by: Mauro S. M. Rodrigues Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/4e706af3cd8e1d0503c25332b30cad33c97ed442 cheers