Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2951657ybc; Thu, 14 Nov 2019 01:33:00 -0800 (PST) X-Google-Smtp-Source: APXvYqy3gio1fyVuK9iDfvwX9x1WkK6O3fHoR82+PrrCs9msknn2CVo1Lk0RPB8jtvLyP1MgVakc X-Received: by 2002:a50:d80c:: with SMTP id o12mr23416edj.251.1573723980347; Thu, 14 Nov 2019 01:33:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573723980; cv=none; d=google.com; s=arc-20160816; b=dYtFZqyNcQYxbJX3kCGGLg0ER6txKL99+4xz8jrHA6YAWr0YuTD7awDrH0PGYvjiPi TgOhA4qkBzMbRafDmg9QyoMFAdtDBawyyaqnq1HJU7xsWko3r5b8SjWdDCKWBXQtyGN7 +kl2U9GMdIJMJfuHFS/hItiXYZwTi5SKhmQPgWaHyk1jBiU0SV1q9lyrU+os9m3DSP97 c5KQ6sAc/ynn95c+8fTottQHxsacIg+bLweAZt/0bIkg2FHyatnqOCjeBLKiJz5QDCdt YiSb6Weu2zB7Kx8L6iP2huu29EVoTJSRbsgDQDEWDcN5J9lVbGTfs3LSoBBUaaeIDw2M NS+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=HJVUE1n9laOsp1+2ps5j2V4vBaF8cmYyfQfDjD9TA7U=; b=oyaC9QZbdkF9zi5jBRub2asTqu2IMWnbEeQqNl9xh4kNL1B44TqXkFRqIB4L65Tj0p YHYiFkx7XiPPimGMtlrF3IFh6dofQ15VngDFIWGrY55r3Pop4o1/N8tO/PBGQDHhcLr+ p5LbRd9RFwISTym2y71iS6VPKIqOAEx7uZEVm3Lfm74FpZYMKpnEG39G6JyBMP2WLc8Y XTlVPK+kHlKkNkIfHeTtrcaxW8AbB7XlmaTobYjjquw/lcnRZlWNOvmiBlgpPzL1khl/ 2hYS6OzLscRLSRfQwPoeieZpom7xagX8jljC2SCmMCunYhpCboCX3SUzUIwyiVEPqBle +TRA== 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 va6si2847759ejb.73.2019.11.14.01.32.35; Thu, 14 Nov 2019 01:33:00 -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 S1726254AbfKNJbm (ORCPT + 99 others); Thu, 14 Nov 2019 04:31:42 -0500 Received: from mx2.suse.de ([195.135.220.15]:56578 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725977AbfKNJbl (ORCPT ); Thu, 14 Nov 2019 04:31:41 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 012FDAD2B; Thu, 14 Nov 2019 09:31:39 +0000 (UTC) Date: Thu, 14 Nov 2019 10:31:38 +0100 From: Michal =?iso-8859-1?Q?Such=E1nek?= To: Michael Ellerman Cc: Gustavo Walbon , linuxppc-dev@lists.ozlabs.org, 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, gwalbon@linux.vnet.ibm.com, stable@vger.kernel.org Subject: Re: [PATCH] Fix wrong message when RFI Flush is disable Message-ID: <20191114093138.GF11661@kitsune.suse.cz> References: <20190502210907.42375-1-gwalbon@linux.ibm.com> <47DFxM5mVHz9sNT@ozlabs.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47DFxM5mVHz9sNT@ozlabs.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 14, 2019 at 08:07:35PM +1100, Michael Ellerman wrote: > 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 Fixes: ff348355e9c7 ("powerpc/64s: Enhance the information in cpu_show_meltdown()") Thanks Michal