linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: asteinhauser@google.com, benh@kernel.crashing.org,
	paulus@samba.org, diana.craciun@nxp.com
Cc: linuxppc-dev@lists.ozlabs.org,
	Anthony Steinhauser <asteinhauser@google.com>
Subject: Re: [PATCH] L1TF support in PowerPC SYSFS.
Date: Sat, 02 Nov 2019 22:11:13 +1100	[thread overview]
Message-ID: <87zhhe1qjy.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20191029190759.84821-1-asteinhauser@google.com>

Hi Anthony,

Thanks for the patch.

asteinhauser@google.com writes:
> From: Anthony Steinhauser <asteinhauser@google.com>
>
> 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.

Can you include the details of which CPUs you tested?

> https://www.ibm.com/blogs/psirt/potential-impact-processors-power-family/
> https://github.com/google/safeside/pull/52
> Signed-off-by: Anthony Steinhauser <asteinhauser@google.com>
> ---

I don't usually retain links in the change log, because they bit rot, so
I'll drop those, but they will remain in the email archive.

> diff --git a/arch/powerpc/kernel/security.c b/arch/powerpc/kernel/security.c
> index 7cfcb294b11c..a1a5017c5170 100644
> --- a/arch/powerpc/kernel/security.c
> +++ b/arch/powerpc/kernel/security.c
> @@ -135,7 +135,8 @@ void setup_spectre_v2(void)
>  #endif /* CONFIG_PPC_FSL_BOOK3E */
>  
>  #ifdef CONFIG_PPC_BOOK3S_64
> -ssize_t cpu_show_meltdown(struct device *dev, struct device_attribute *attr, char *buf)
> +static ssize_t cpu_show_delayed_fault_common(

I guess that's an accurate name.

I probably would have just had cpu_show_l1tf() call cpu_show_meltdown(),
but I guess either approach is fine.

cheers


> @@ -167,6 +168,16 @@ 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_delayed_fault_common(dev, attr, buf);
> +}
> +
> +ssize_t cpu_show_meltdown(struct device *dev, struct device_attribute *attr, char *buf)
> +{
> +	return cpu_show_delayed_fault_common(dev, attr, buf);
> +}
>  #endif
>  
>  ssize_t cpu_show_spectre_v1(struct device *dev, struct device_attribute *attr, char *buf)
> -- 
> 2.24.0.rc0.303.g954a862665-goog

  reply	other threads:[~2019-11-02 11:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-29 19:07 [PATCH] L1TF support in PowerPC SYSFS asteinhauser
2019-11-02 11:11 ` Michael Ellerman [this message]
2019-11-04 10:28   ` Anthony Steinhauser
2019-11-14  9:08 ` Michael Ellerman

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=87zhhe1qjy.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=asteinhauser@google.com \
    --cc=benh@kernel.crashing.org \
    --cc=diana.craciun@nxp.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).