All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michal Suchánek" <msuchanek@suse.de>
To: Michael Ellerman <patch-notifications@ellerman.id.au>
Cc: Gustavo Walbon <gwalbon@linux.ibm.com>,
	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
Date: Thu, 14 Nov 2019 10:31:38 +0100	[thread overview]
Message-ID: <20191114093138.GF11661@kitsune.suse.cz> (raw)
In-Reply-To: <47DFxM5mVHz9sNT@ozlabs.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" <gwalbon@linux.ibm.com>
> > 
> > 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 <gwalbon@linux.ibm.com>
> > Signed-off-by: Mauro S. M. Rodrigues <maurosr@linux.vnet.ibm.com>
> 
> 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

WARNING: multiple messages have this Message-ID (diff)
From: "Michal Suchánek" <msuchanek@suse.de>
To: Michael Ellerman <patch-notifications@ellerman.id.au>
Cc: mikey@neuling.org, maurosr@linux.vnet.ibm.com,
	Gustavo Walbon <gwalbon@linux.ibm.com>,
	linux-kernel@vger.kernel.org, npiggin@gmail.com,
	diana.craciun@nxp.com, paulus@samba.org, stable@vger.kernel.org,
	leitao@debian.org, linuxppc-dev@lists.ozlabs.org,
	gwalbon@linux.vnet.ibm.com
Subject: Re: [PATCH] Fix wrong message when RFI Flush is disable
Date: Thu, 14 Nov 2019 10:31:38 +0100	[thread overview]
Message-ID: <20191114093138.GF11661@kitsune.suse.cz> (raw)
In-Reply-To: <47DFxM5mVHz9sNT@ozlabs.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" <gwalbon@linux.ibm.com>
> > 
> > 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 <gwalbon@linux.ibm.com>
> > Signed-off-by: Mauro S. M. Rodrigues <maurosr@linux.vnet.ibm.com>
> 
> 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

  reply	other threads:[~2019-11-14  9:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-02 21:09 [PATCH] Fix wrong message when RFI Flush is disable Gustavo Walbon
2019-05-02 21:09 ` Gustavo Walbon
2019-11-14  9:07 ` Michael Ellerman
2019-11-14  9:31   ` Michal Suchánek [this message]
2019-11-14  9:31     ` Michal Suchánek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191114093138.GF11661@kitsune.suse.cz \
    --to=msuchanek@suse.de \
    --cc=diana.craciun@nxp.com \
    --cc=gwalbon@linux.ibm.com \
    --cc=gwalbon@linux.vnet.ibm.com \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maurosr@linux.vnet.ibm.com \
    --cc=mikey@neuling.org \
    --cc=npiggin@gmail.com \
    --cc=patch-notifications@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.