From: Diana Craciun <diana.craciun@nxp.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: mpe@ellerman.id.au, oss@buserror.net, leoyang.li@nxp.com,
bharat.bhushan@nxp.com, Diana Craciun <diana.craciun@nxp.com>
Subject: [PATCH v2 1/3] powerpc/fsl: Disable the speculation barrier from the command line
Date: Mon, 11 Jun 2018 15:53:26 +0300 [thread overview]
Message-ID: <1528721608-15443-2-git-send-email-diana.craciun@nxp.com> (raw)
In-Reply-To: <1528721608-15443-1-git-send-email-diana.craciun@nxp.com>
The speculation barrier can be disabled from the command line
with the parameter: "nospectre_v1".
Signed-off-by: Diana Craciun <diana.craciun@nxp.com>
---
arch/powerpc/kernel/security.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/security.c b/arch/powerpc/kernel/security.c
index 3eb9c45..c55e102 100644
--- a/arch/powerpc/kernel/security.c
+++ b/arch/powerpc/kernel/security.c
@@ -16,6 +16,7 @@
unsigned long powerpc_security_features __read_mostly = SEC_FTR_DEFAULT;
bool barrier_nospec_enabled;
+static bool no_nospec;
static void enable_barrier_nospec(bool enable)
{
@@ -42,9 +43,18 @@ void setup_barrier_nospec(void)
enable = security_ftr_enabled(SEC_FTR_FAVOUR_SECURITY) &&
security_ftr_enabled(SEC_FTR_BNDS_CHK_SPEC_BAR);
- enable_barrier_nospec(enable);
+ if (!no_nospec)
+ enable_barrier_nospec(enable);
}
+static int __init handle_nospectre_v1(char *p)
+{
+ no_nospec = true;
+
+ return 0;
+}
+early_param("nospectre_v1", handle_nospectre_v1);
+
#ifdef CONFIG_DEBUG_FS
static int barrier_nospec_set(void *data, u64 val)
{
--
2.5.5
next prev parent reply other threads:[~2018-06-11 12:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-11 12:53 [PATCH v2 0/3] powerpc/fsl: Speculation barrier for NXP PowerPC Book3E Diana Craciun
2018-06-11 12:53 ` Diana Craciun [this message]
2018-07-03 7:25 ` [PATCH v2 1/3] powerpc/fsl: Disable the speculation barrier from the command line Michael Ellerman
2018-06-11 12:53 ` [PATCH v2 2/3] powerpc/fsl: Add barrier_nospec implementation for NXP PowerPC Book3E Diana Craciun
2018-07-03 7:26 ` Michael Ellerman
2018-07-05 13:21 ` Diana Madalina Craciun
2018-06-11 12:53 ` [PATCH v2 3/3] powerpc/fsl: Implement cpu_show_spectre_v1/v2 " Diana Craciun
2018-06-12 2:59 ` Bharat Bhushan
2018-06-12 10:07 ` Michal Suchánek
2018-07-03 7:26 ` Michael Ellerman
2018-07-05 13:26 ` Diana Madalina Craciun
2018-06-29 14:34 ` [PATCH v2 0/3] powerpc/fsl: Speculation barrier " Diana Madalina Craciun
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=1528721608-15443-2-git-send-email-diana.craciun@nxp.com \
--to=diana.craciun@nxp.com \
--cc=bharat.bhushan@nxp.com \
--cc=leoyang.li@nxp.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=oss@buserror.net \
/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.