LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: Diana Madalina Craciun <diana.craciun@nxp.com> To: Michal Suchanek <msuchanek@suse.de>, "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org> Cc: "Kate Stewart" <kstewart@linuxfoundation.org>, "Madhavan Srinivasan" <maddy@linux.vnet.ibm.com>, "Mahesh Salgaonkar" <mahesh@linux.vnet.ibm.com>, "Al Viro" <viro@zeniv.linux.org.uk>, "Paul Mackerras" <paulus@samba.org>, "Michael Neuling" <mikey@neuling.org>, "Bryant G. Ly" <bryantly@linux.vnet.ibm.com>, "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>, "Daniel Axtens" <dja@axtens.net>, "Nicholas Piggin" <npiggin@gmail.com>, "Cédric Le Goater" <clg@kaod.org>, "David Gibson" <david@gibson.dropbear.id.au>, "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "Sergey Senozhatsky" <sergey.senozhatsky@gmail.com>, "Masami Hiramatsu" <mhiramat@kernel.org>, "Andrew Donnellan" <andrew.donnellan@au1.ibm.com>, "Philippe Ombredanne" <pombredanne@nexb.com>, "Joe Perches" <joe@perches.com>, "Oliver O'Halloran" <oohall@gmail.com>, "Andrew Morton" <akpm@linux-foundation.org>, "Tobin C. Harding" <me@tobin.cc> Subject: Re: [PATCH RFC rebase 9/9] powerpc/64: barrier_nospec: Add commandline trigger Date: Fri, 23 Mar 2018 15:59:50 +0000 [thread overview] Message-ID: <HE1PR0401MB2634FE1189DA2E7B8C405FECFFA80@HE1PR0401MB2634.eurprd04.prod.outlook.com> (raw) In-Reply-To: 1dcf7403042daddcdb8109f6b852b9bb9d768f89.1521141122.git.msuchanek@suse.de On 3/15/2018 9:34 PM, Michal Suchanek wrote: > Add commandline options spectre_v2 and nospectre_v2 > > These are named same as similar x86 options regardless of actual effect > to not require platform-specific configuration. > > Supported options: > nospectre_v2 or spectre_v2=off - speculation barrier not used > spectre_v2=on or spectre_v2=auto - speculation barrier used Why the barrier is enabled only for spectre variant 2 mitigations? It can be used as well for variant 1 mitigations. In fact I am not sure that the places where it is used fall under spectre 2 at all. > > Changing the settings after boot is not supported and VM migration may > change requirements so auto is same as on. > > Based on s390 implementation > > Signed-off-by: Michal Suchanek <msuchanek@suse.de> > --- > arch/powerpc/kernel/setup_64.c | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c > index f6678a7b6114..c74e656265df 100644 > --- a/arch/powerpc/kernel/setup_64.c > +++ b/arch/powerpc/kernel/setup_64.c > @@ -840,6 +840,28 @@ static int __init handle_no_pti(char *p) > } > early_param("nopti", handle_no_pti); > > +static int __init nospectre_v2_setup_early(char *str) > +{ > + no_nospec = true; > + return 0; > +} > +early_param("nospectre_v2", nospectre_v2_setup_early); > + > +static int __init spectre_v2_setup_early(char *str) > +{ > + if (str && !strncmp(str, "on", 2)) > + no_nospec = false; > + > + if (str && !strncmp(str, "off", 3)) > + no_nospec = true; > + > + if (str && !strncmp(str, "auto", 4)) > + no_nospec = false; > + > + return 0; > +} > +early_param("spectre_v2", spectre_v2_setup_early); > + > static void do_nothing(void *unused) > { > /* Thanks, Diana
next prev parent reply other threads:[~2018-03-23 15:59 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-03-13 18:32 [PATCH RFC 0/8] powerpc barrier_nospec Michal Suchanek 2018-03-13 18:32 ` [PATCH RFC 1/8] powerpc: Add barrier_nospec Michal Suchanek 2018-03-13 20:01 ` Peter Zijlstra 2018-03-15 19:15 ` [PATCH RFC rebase 0/9] powerpc barrier_nospec Michal Suchanek 2018-03-15 19:15 ` [PATCH RFC rebase 1/9] powerpc: Add barrier_nospec Michal Suchanek 2018-03-15 19:15 ` [PATCH RFC rebase 2/9] powerpc: Use barrier_nospec in copy_from_user Michal Suchanek 2018-03-15 21:37 ` Linus Torvalds 2018-03-16 13:22 ` Michael Ellerman 2018-03-15 19:15 ` [PATCH RFC rebase 3/9] powerpc/64: Use barrier_nospec in syscall entry Michal Suchanek 2018-03-16 5:18 ` Nicholas Piggin 2018-03-16 9:15 ` Michal Suchánek 2018-03-16 10:46 ` Nicholas Piggin 2018-03-16 13:28 ` Michael Ellerman 2018-03-16 17:08 ` Linus Torvalds 2018-03-15 19:15 ` [PATCH RFC rebase 4/9] powerpc/64s: Use barrier_nospec in RFI_FLUSH_SLOT Michal Suchanek 2018-03-15 19:15 ` [PATCH RFC rebase 5/9] powerpc/64s: Add support for ori barrier_nospec patching Michal Suchanek 2018-03-15 19:15 ` [PATCH RFC rebase 6/9] powerpc/64: Patch barrier_nospec in modules Michal Suchanek 2018-03-15 19:15 ` [PATCH RFC rebase 7/9] powerpc/64: barrier_nospec: Add debugfs trigger Michal Suchanek 2018-03-15 19:15 ` [PATCH RFC rebase 8/9] powerpc/64s: barrier_nospec: Add hcall triggerr Michal Suchanek 2018-03-15 19:15 ` [PATCH RFC rebase 9/9] powerpc/64: barrier_nospec: Add commandline trigger Michal Suchanek 2018-03-23 15:59 ` Diana Madalina Craciun [this message] 2018-03-16 8:08 ` [PATCH RFC rebase 0/9] powerpc barrier_nospec Greg Kroah-Hartman 2018-03-16 9:31 ` Michal Suchánek 2018-03-13 18:33 ` [PATCH RFC 2/8] powerpc: Use barrier_nospec in copy_from_user Michal Suchanek 2018-03-13 18:33 ` [PATCH RFC 3/8] powerpc/64: Use barrier_nospec in syscall entry Michal Suchanek 2018-03-13 18:33 ` [PATCH RFC 4/8] powerpc/64s: Add support for ori barrier_nospec Michal Suchanek 2018-03-13 18:33 ` [PATCH RFC 5/8] powerpc/64: Patch barrier_nospec in modules Michal Suchanek 2018-03-13 18:33 ` [PATCH RFC 6/8] powerpc/64: barrier_nospec: Add debugfs trigger Michal Suchanek 2018-03-13 18:33 ` [PATCH RFC 7/8] powerpc/64s: barrier_nospec: Add hcall triggerr Michal Suchanek 2018-03-13 18:33 ` [PATCH RFC 8/8] powerpc/64: barrier_nospec: Add commandline trigger Michal Suchanek
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=HE1PR0401MB2634FE1189DA2E7B8C405FECFFA80@HE1PR0401MB2634.eurprd04.prod.outlook.com \ --to=diana.craciun@nxp.com \ --cc=akpm@linux-foundation.org \ --cc=andrew.donnellan@au1.ibm.com \ --cc=bryantly@linux.vnet.ibm.com \ --cc=clg@kaod.org \ --cc=david@gibson.dropbear.id.au \ --cc=dja@axtens.net \ --cc=gregkh@linuxfoundation.org \ --cc=joe@perches.com \ --cc=kstewart@linuxfoundation.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linuxppc-dev@lists.ozlabs.org \ --cc=maddy@linux.vnet.ibm.com \ --cc=mahesh@linux.vnet.ibm.com \ --cc=me@tobin.cc \ --cc=mhiramat@kernel.org \ --cc=mikey@neuling.org \ --cc=msuchanek@suse.de \ --cc=naveen.n.rao@linux.vnet.ibm.com \ --cc=npiggin@gmail.com \ --cc=oohall@gmail.com \ --cc=paulus@samba.org \ --cc=pombredanne@nexb.com \ --cc=sergey.senozhatsky@gmail.com \ --cc=viro@zeniv.linux.org.uk \ /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: linkBe 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).