linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Documentation: Add powerpc options for spec_store_bypass_disable
@ 2018-07-10  2:08 Michael Ellerman
  2018-07-10  3:19 ` Kees Cook
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michael Ellerman @ 2018-07-10  2:08 UTC (permalink / raw)
  To: corbet; +Cc: keescook, tglx, konrad.wilk, linux-doc, linux-kernel, linuxppc-dev

Document the support for spec_store_bypass_disable that was added for
powerpc in commit a048a07d7f45 ("powerpc/64s: Add support for a store
forwarding barrier at kernel entry/exit").

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 Documentation/admin-guide/kernel-parameters.txt | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

I tried documenting the differences between the PPC options and X86 ones in one
section, but it got quite messy, so I went with this instead. Happy to take
advice on how better to structure it if anyone has opinions.

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index efc7aa7a0670..f320c7168b04 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -4060,6 +4060,8 @@
 			This parameter controls whether the Speculative Store
 			Bypass optimization is used.
 
+			On x86 the options are:
+
 			on      - Unconditionally disable Speculative Store Bypass
 			off     - Unconditionally enable Speculative Store Bypass
 			auto    - Kernel detects whether the CPU model contains an
@@ -4075,12 +4077,20 @@
 			seccomp - Same as "prctl" above, but all seccomp threads
 				  will disable SSB unless they explicitly opt out.
 
-			Not specifying this option is equivalent to
-			spec_store_bypass_disable=auto.
-
 			Default mitigations:
 			X86:	If CONFIG_SECCOMP=y "seccomp", otherwise "prctl"
 
+			On powerpc the options are:
+
+			on,auto - On Power8 and Power9 insert a store-forwarding
+				  barrier on kernel entry and exit. On Power7
+				  perform a software flush on kernel entry and
+				  exit.
+			off	- No action.
+
+			Not specifying this option is equivalent to
+			spec_store_bypass_disable=auto.
+
 	spia_io_base=	[HW,MTD]
 	spia_fio_base=
 	spia_pedr=
-- 
2.14.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Documentation: Add powerpc options for spec_store_bypass_disable
  2018-07-10  2:08 [PATCH] Documentation: Add powerpc options for spec_store_bypass_disable Michael Ellerman
@ 2018-07-10  3:19 ` Kees Cook
  2018-07-10  6:10 ` Thomas Gleixner
  2018-07-10 21:13 ` Jonathan Corbet
  2 siblings, 0 replies; 4+ messages in thread
From: Kees Cook @ 2018-07-10  3:19 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Jonathan Corbet, Thomas Gleixner, Konrad Rzeszutek Wilk,
	linux-doc, LKML, linuxppc-dev

On Mon, Jul 9, 2018 at 7:08 PM, Michael Ellerman <mpe@ellerman.id.au> wrote:
> Document the support for spec_store_bypass_disable that was added for
> powerpc in commit a048a07d7f45 ("powerpc/64s: Add support for a store
> forwarding barrier at kernel entry/exit").
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Reviewed-by: Kees Cook <keescook@chromium.org>

-Kees

> ---
>  Documentation/admin-guide/kernel-parameters.txt | 16 +++++++++++++---
>  1 file changed, 13 insertions(+), 3 deletions(-)
>
> I tried documenting the differences between the PPC options and X86 ones in one
> section, but it got quite messy, so I went with this instead. Happy to take
> advice on how better to structure it if anyone has opinions.
>
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index efc7aa7a0670..f320c7168b04 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -4060,6 +4060,8 @@
>                         This parameter controls whether the Speculative Store
>                         Bypass optimization is used.
>
> +                       On x86 the options are:
> +
>                         on      - Unconditionally disable Speculative Store Bypass
>                         off     - Unconditionally enable Speculative Store Bypass
>                         auto    - Kernel detects whether the CPU model contains an
> @@ -4075,12 +4077,20 @@
>                         seccomp - Same as "prctl" above, but all seccomp threads
>                                   will disable SSB unless they explicitly opt out.
>
> -                       Not specifying this option is equivalent to
> -                       spec_store_bypass_disable=auto.
> -
>                         Default mitigations:
>                         X86:    If CONFIG_SECCOMP=y "seccomp", otherwise "prctl"
>
> +                       On powerpc the options are:
> +
> +                       on,auto - On Power8 and Power9 insert a store-forwarding
> +                                 barrier on kernel entry and exit. On Power7
> +                                 perform a software flush on kernel entry and
> +                                 exit.
> +                       off     - No action.
> +
> +                       Not specifying this option is equivalent to
> +                       spec_store_bypass_disable=auto.
> +
>         spia_io_base=   [HW,MTD]
>         spia_fio_base=
>         spia_pedr=
> --
> 2.14.1
>



-- 
Kees Cook
Pixel Security

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Documentation: Add powerpc options for spec_store_bypass_disable
  2018-07-10  2:08 [PATCH] Documentation: Add powerpc options for spec_store_bypass_disable Michael Ellerman
  2018-07-10  3:19 ` Kees Cook
@ 2018-07-10  6:10 ` Thomas Gleixner
  2018-07-10 21:13 ` Jonathan Corbet
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Gleixner @ 2018-07-10  6:10 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: corbet, keescook, konrad.wilk, linux-doc, linux-kernel, linuxppc-dev

On Tue, 10 Jul 2018, Michael Ellerman wrote:

> Document the support for spec_store_bypass_disable that was added for
> powerpc in commit a048a07d7f45 ("powerpc/64s: Add support for a store
> forwarding barrier at kernel entry/exit").
> 
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
>  Documentation/admin-guide/kernel-parameters.txt | 16 +++++++++++++---
>  1 file changed, 13 insertions(+), 3 deletions(-)
> 
> I tried documenting the differences between the PPC options and X86 ones in one
> section, but it got quite messy, so I went with this instead. Happy to take
> advice on how better to structure it if anyone has opinions.

Looks good to me.

Acked-by: Thomas Gleixner <tglx@linutronix.de>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Documentation: Add powerpc options for spec_store_bypass_disable
  2018-07-10  2:08 [PATCH] Documentation: Add powerpc options for spec_store_bypass_disable Michael Ellerman
  2018-07-10  3:19 ` Kees Cook
  2018-07-10  6:10 ` Thomas Gleixner
@ 2018-07-10 21:13 ` Jonathan Corbet
  2 siblings, 0 replies; 4+ messages in thread
From: Jonathan Corbet @ 2018-07-10 21:13 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: keescook, tglx, konrad.wilk, linux-doc, linux-kernel, linuxppc-dev

On Tue, 10 Jul 2018 12:08:36 +1000
Michael Ellerman <mpe@ellerman.id.au> wrote:

> Document the support for spec_store_bypass_disable that was added for
> powerpc in commit a048a07d7f45 ("powerpc/64s: Add support for a store
> forwarding barrier at kernel entry/exit").
> 
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Applied, thanks.

jon

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-10 21:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-10  2:08 [PATCH] Documentation: Add powerpc options for spec_store_bypass_disable Michael Ellerman
2018-07-10  3:19 ` Kees Cook
2018-07-10  6:10 ` Thomas Gleixner
2018-07-10 21:13 ` Jonathan Corbet

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).