mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anthony Steinhauser <asteinhauser@google.com>
To: linux-kernel@vger.kernel.org
Cc: Michael Ellerman <mpe@ellerman.id.au>,
	Anthony Steinhauser <asteinhauser@google.com>
Subject: [PATCH] SYSFS reporting of L1TF on PowerPC.
Date: Wed, 23 Oct 2019 16:04:26 -0700	[thread overview]
Message-ID: <20191023230426.200068-1-asteinhauser@google.com> (raw)

L1TF affects PowerPC of the same range as Meltdown-US.
I tested it personally:
https://github.com/google/safeside/pull/52
and it is also admitted in the IBM report:
https://www.ibm.com/blogs/psirt/potential-impact-processors-power-family/
Similarly to Meltdown it is effectively mitigated by the rfi_flush.

Signed-off-by: Anthony Steinhauser <asteinhauser@google.com>
---
 arch/powerpc/kernel/security.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/powerpc/kernel/security.c b/arch/powerpc/kernel/security.c
index 7cfcb294b11c..410232e79371 100644
--- a/arch/powerpc/kernel/security.c
+++ b/arch/powerpc/kernel/security.c
@@ -167,6 +167,18 @@ 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)
+{
+	if (rfi_flush)
+		return sprintf(buf, "Mitigation: RFI Flush");
+
+	if (!security_ftr_enabled(SEC_FTR_L1D_FLUSH_HV) &&
+	    !security_ftr_enabled(SEC_FTR_L1D_FLUSH_PR))
+		return sprintf(buf, "Not affected\n");
+
+	return sprintf(buf, "Vulnerable\n");
+}
 #endif
 
 ssize_t cpu_show_spectre_v1(struct device *dev, struct device_attribute *attr, char *buf)
-- 
2.23.0.866.gb869b98d4c-goog


                 reply	other threads:[~2019-10-23 23:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20191023230426.200068-1-asteinhauser@google.com \
    --to=asteinhauser@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpe@ellerman.id.au \
    /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

all inboxes | Powered by JetHome®