[PATCH stable 4.9 00/23] powerpc backports for 4.9

2018-06-02 Thread Michael Ellerman
Hi Greg, Please queue up this series of patches for 4.9 if you have no objections. The first one is not a backport but a fix for a previous backport. cheers Mauricio Faria de Oliveira (4): powerpc/rfi-flush: Differentiate enabled and patched flush types powerpc/pseries: Fix clearing of secu

[PATCH stable 4.9 01/23] powerpc/rfi-flush: Move out of HARDLOCKUP_DETECTOR #ifdef

2018-06-02 Thread Michael Ellerman
The backport of the RFI flush support, done by me, has a minor bug in that the code is inside an #ifdef CONFIG_HARDLOCKUP_DETECTOR, which is incorrect. This doesn't matter with common configs because we enable HARDLOCKUP_DETECTOR, but with future patches it will break the build. So fix it. Fixes:

[PATCH stable 4.9 02/23] powerpc/pseries: Support firmware disable of RFI flush

2018-06-02 Thread Michael Ellerman
commit 582605a429e20ae68fd0b041b2e840af296edd08 upstream. Some versions of firmware will have a setting that can be configured to disable the RFI flush, add support for it. Fixes: 8989d56878a7 ("powerpc/pseries: Query hypervisor for RFI flush settings") Signed-off-by: Michael Ellerman --- arch/

[PATCH stable 4.9 03/23] powerpc/powernv: Support firmware disable of RFI flush

2018-06-02 Thread Michael Ellerman
commit eb0a2d2620ae431c543963c8c7f08f597366fc60 upstream. Some versions of firmware will have a setting that can be configured to disable the RFI flush, add support for it. Fixes: 6e032b350cd1 ("powerpc/powernv: Check device-tree for RFI flush settings") Signed-off-by: Michael Ellerman --- arc

[PATCH stable 4.9 04/23] powerpc/rfi-flush: Move the logic to avoid a redo into the debugfs code

2018-06-02 Thread Michael Ellerman
commit 1e2a9fc7496955faacbbed49461d611b704a7505 upstream. rfi_flush_enable() includes a check to see if we're already enabled (or disabled), and in that case does nothing. But that means calling setup_rfi_flush() a 2nd time doesn't actually work, which is a bit confusing. Move that check into th

[PATCH stable 4.9 05/23] powerpc/rfi-flush: Make it possible to call setup_rfi_flush() again

2018-06-02 Thread Michael Ellerman
commit abf110f3e1cea40f5ea15e85f5d67c39c14568a7 upstream. For PowerVM migration we want to be able to call setup_rfi_flush() again after we've migrated the partition. To support that we need to check that we're not trying to allocate the fallback flush area after memblock has gone away (i.e., boo

[PATCH stable 4.9 06/23] powerpc/rfi-flush: Always enable fallback flush on pseries

2018-06-02 Thread Michael Ellerman
commit 84749a58b6e382f109abf1e734bc4dd43c2c25bb upstream. This ensures the fallback flush area is always allocated on pseries, so in case a LPAR is migrated from a patched to an unpatched system, it is possible to enable the fallback flush in the target system. Signed-off-by: Michael Ellerman Si

[PATCH stable 4.9 07/23] powerpc/rfi-flush: Differentiate enabled and patched flush types

2018-06-02 Thread Michael Ellerman
From: Mauricio Faria de Oliveira commit 0063d61ccfc011f379a31acaeba6de7c926fed2c upstream. Currently the rfi-flush messages print 'Using flush' for all enabled_flush_types, but that is not necessarily true -- as now the fallback flush is always enabled on pseries, but the fixup function overwri

[PATCH stable 4.9 08/23] powerpc/rfi-flush: Call setup_rfi_flush() after LPM migration

2018-06-02 Thread Michael Ellerman
commit 921bc6cf807ceb2ab8005319cf39f33494d6b100 upstream. We might have migrated to a machine that uses a different flush type, or doesn't need flushing at all. Signed-off-by: Michael Ellerman Signed-off-by: Mauricio Faria de Oliveira Signed-off-by: Michael Ellerman --- arch/powerpc/platforms

[PATCH stable 4.9 09/23] powerpc/pseries: Add new H_GET_CPU_CHARACTERISTICS flags

2018-06-02 Thread Michael Ellerman
commit c4bc36628d7f8b664657d8bd6ad1c44c177880b7 upstream. Add some additional values which have been defined for the H_GET_CPU_CHARACTERISTICS hypercall. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/hvcall.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/inc

[PATCH stable 4.9 10/23] powerpc: Add security feature flags for Spectre/Meltdown

2018-06-02 Thread Michael Ellerman
commit 9a868f634349e62922c226834aa23e3d1329ae7f upstream. This commit adds security feature flags to reflect the settings we receive from firmware regarding Spectre/Meltdown mitigations. The feature names reflect the names we are given by firmware on bare metal machines. See the hostboot source f

[PATCH stable 4.9 11/23] powerpc/pseries: Set or clear security feature flags

2018-06-02 Thread Michael Ellerman
commit f636c14790ead6cc22cf62279b1f8d7e11a67116 upstream. Now that we have feature flags for security related things, set or clear them based on what we receive from the hypercall. Signed-off-by: Michael Ellerman --- arch/powerpc/platforms/pseries/setup.c | 43 ++

[PATCH stable 4.9 12/23] powerpc/powernv: Set or clear security feature flags

2018-06-02 Thread Michael Ellerman
commit 77addf6e95c8689e478d607176b399a6242a777e upstream. Now that we have feature flags for security related things, set or clear them based on what we see in the device tree provided by firmware. Signed-off-by: Michael Ellerman --- arch/powerpc/platforms/powernv/setup.c | 56 +

[PATCH stable 4.9 13/23] powerpc/64s: Move cpu_show_meltdown()

2018-06-02 Thread Michael Ellerman
commit 8ad33041563a10b34988800c682ada14b2612533 upstream. This landed in setup_64.c for no good reason other than we had nowhere else to put it. Now that we have a security-related file, that is a better place for it so move it. [mpe: Add extern for rfi_flush to fix bisection break] Signed-off-by

[PATCH stable 4.9 14/23] powerpc/64s: Enhance the information in cpu_show_meltdown()

2018-06-02 Thread Michael Ellerman
commit ff348355e9c72493947be337bb4fae4fc1a41eba upstream. Now that we have the security feature flags we can make the information displayed in the "meltdown" file more informative. Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/security.c | 30 -- 1 file cha

[PATCH stable 4.9 15/23] powerpc/powernv: Use the security flags in pnv_setup_rfi_flush()

2018-06-02 Thread Michael Ellerman
commit 37c0bdd00d3ae83369ab60a6712c28e11e6458d5 upstream. Now that we have the security flags we can significantly simplify the code in pnv_setup_rfi_flush(), because we can use the flags instead of checking device tree properties and because the security flags have pessimistic defaults. Signed-o

[PATCH stable 4.9 16/23] powerpc/pseries: Use the security flags in pseries_setup_rfi_flush()

2018-06-02 Thread Michael Ellerman
commit 2e4a16161fcd324b1f9bf6cb6856529f7eaf0689 upstream. Now that we have the security flags we can simplify the code in pseries_setup_rfi_flush() because the security flags have pessimistic defaults. Signed-off-by: Michael Ellerman --- arch/powerpc/platforms/pseries/setup.c | 27 -

[PATCH stable 4.9 17/23] powerpc/64s: Wire up cpu_show_spectre_v1()

2018-06-02 Thread Michael Ellerman
commit 56986016cb8cd9050e601831fe89f332b4e3c46e upstream. Add a definition for cpu_show_spectre_v1() to override the generic version. Currently this just prints "Not affected" or "Vulnerable" based on the firmware flag. Although the kernel does have array_index_nospec() in a few places, we haven'

[PATCH stable 4.9 18/23] powerpc/64s: Wire up cpu_show_spectre_v2()

2018-06-02 Thread Michael Ellerman
commit d6fbe1c55c55c6937cbea3531af7da84ab7473c3 upstream. Add a definition for cpu_show_spectre_v2() to override the generic version. This has several permuations, though in practice some may not occur we cater for any combination. The most verbose is: Mitigation: Indirect branch serialisation

[PATCH stable 4.9 19/23] powerpc/pseries: Fix clearing of security feature flags

2018-06-02 Thread Michael Ellerman
From: Mauricio Faria de Oliveira commit 0f9bdfe3c77091e8704d2e510eb7c2c2c6cde524 upstream. The H_CPU_BEHAV_* flags should be checked for in the 'behaviour' field of 'struct h_cpu_char_result' -- 'character' is for H_CPU_CHAR_* flags. Found by playing around with QEMU's implementation of the hyp

[PATCH stable 4.9 20/23] powerpc: Move default security feature flags

2018-06-02 Thread Michael Ellerman
From: Mauricio Faria de Oliveira commit e7347a86830f38dc3e40c8f7e28c04412b12a2e7 upstream. This moves the definition of the default security feature flags (i.e., enabled by default) closer to the security feature flags. This can be used to restore current flags to the default flags. Signed-off

[PATCH stable 4.9 21/23] powerpc/pseries: Restore default security feature flags on setup

2018-06-02 Thread Michael Ellerman
From: Mauricio Faria de Oliveira commit 6232774f1599028a15418179d17f7df47ede770a upstream. After migration the security feature flags might have changed (e.g., destination system with unpatched firmware), but some flags are not set/clear again in init_cpu_char_feature_flags() because it assumes

[PATCH stable 4.9 22/23] powerpc/64s: Fix section mismatch warnings from setup_rfi_flush()

2018-06-02 Thread Michael Ellerman
commit 501a78cbc17c329fabf8e9750a1e9ab810c88a0e upstream. The recent LPM changes to setup_rfi_flush() are causing some section mismatch warnings because we removed the __init annotation on setup_rfi_flush(): The function setup_rfi_flush() references the function __init ppc64_bolted_size().

[PATCH stable 4.9 23/23] powerpc/64s: Add support for a store forwarding barrier at kernel entry/exit

2018-06-02 Thread Michael Ellerman
From: Nicholas Piggin commit a048a07d7f4535baa4cbad6bc024f175317ab938 upstream. On some CPUs we can prevent a vulnerability related to store-to-load forwarding by preventing store forwarding between privilege domains, by inserting a barrier in kernel entry and exit paths. This is known to be th

[RFC PATCH for 4.18 08/16] powerpc: Add support for restartable sequences

2018-06-02 Thread Mathieu Desnoyers
From: Boqun Feng Call the rseq_handle_notify_resume() function on return to userspace if TIF_NOTIFY_RESUME thread flag is set. Perform fixup on the pre-signal when a signal is delivered on top of a restartable sequence critical section. Signed-off-by: Boqun Feng Signed-off-by: Mathieu Desnoyer

[RFC PATCH for 4.18 09/16] powerpc: Add syscall detection for restartable sequences

2018-06-02 Thread Mathieu Desnoyers
From: Boqun Feng Syscalls are not allowed inside restartable sequences, so add a call to rseq_syscall() at the very beginning of system call exiting path for CONFIG_DEBUG_RSEQ=y kernel. This could help us to detect whether there is a syscall issued inside restartable sequences. [ Tested on 64-bi

[RFC PATCH for 4.18 10/16] powerpc: Wire up restartable sequences system call

2018-06-02 Thread Mathieu Desnoyers
From: Boqun Feng Wire up the rseq system call on powerpc. This provides an ABI improving the speed of a user-space getcpu operation on powerpc by skipping the getcpu system call on the fast path, as well as improving the speed of user-space operations on per-cpu data compared to using load-reser

Re: [PATCH 4.14 2/4] powerpc/mm/slice: create header files dedicated to slices

2018-06-02 Thread Greg Kroah-Hartman
On Thu, May 31, 2018 at 08:54:52AM +, Christophe Leroy wrote: > [ Upstream commit a3286f05bc5a5bc7fc73a9783ec89de78fcd07f8 ] > > In preparation for the following patch which will enhance 'slices' > for supporting PPC32 in order to fix an issue on hugepages on 8xx, > this patch takes out of pag

Re: [PATCH stable 4.9 00/23] powerpc backports for 4.9

2018-06-02 Thread Greg KH
On Sat, Jun 02, 2018 at 09:08:45PM +1000, Michael Ellerman wrote: > Hi Greg, > > Please queue up this series of patches for 4.9 if you have no objections. > > The first one is not a backport but a fix for a previous backport. Looks good, all now queued up, thanks. greg k-h

Patch "powerpc/64s: Enhance the information in cpu_show_meltdown()" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/64s: Enhance the information in cpu_show_meltdown() to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is:

Patch "powerpc/64s: Fix section mismatch warnings from setup_rfi_flush()" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/64s: Fix section mismatch warnings from setup_rfi_flush() to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patc

Patch "powerpc/64s: Move cpu_show_meltdown()" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/64s: Move cpu_show_meltdown() to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: powerpc-64s-move-

Patch "powerpc/64s: Wire up cpu_show_spectre_v1()" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/64s: Wire up cpu_show_spectre_v1() to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: powerpc-64s-

Patch "powerpc/64s: Wire up cpu_show_spectre_v2()" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/64s: Wire up cpu_show_spectre_v2() to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: powerpc-64s-

Patch "powerpc/64s: Add support for a store forwarding barrier at kernel entry/exit" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/64s: Add support for a store forwarding barrier at kernel entry/exit to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename

Patch "powerpc: Move default security feature flags" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc: Move default security feature flags to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: powerpc-mo

Patch "powerpc/powernv: Set or clear security feature flags" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/powernv: Set or clear security feature flags to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: po

Patch "powerpc/powernv: Support firmware disable of RFI flush" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/powernv: Support firmware disable of RFI flush to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is:

Patch "powerpc/powernv: Use the security flags in pnv_setup_rfi_flush()" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/powernv: Use the security flags in pnv_setup_rfi_flush() to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch

Patch "powerpc: Add security feature flags for Spectre/Meltdown" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc: Add security feature flags for Spectre/Meltdown to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is:

Patch "powerpc/pseries: Fix clearing of security feature flags" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/pseries: Fix clearing of security feature flags to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is:

Patch "powerpc/pseries: Restore default security feature flags on setup" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/pseries: Restore default security feature flags on setup to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch

Patch "powerpc/pseries: Set or clear security feature flags" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/pseries: Set or clear security feature flags to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: po

Patch "powerpc/pseries: Support firmware disable of RFI flush" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/pseries: Support firmware disable of RFI flush to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is:

Patch "powerpc/pseries: Add new H_GET_CPU_CHARACTERISTICS flags" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/pseries: Add new H_GET_CPU_CHARACTERISTICS flags to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is:

Patch "powerpc/rfi-flush: Always enable fallback flush on pseries" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/rfi-flush: Always enable fallback flush on pseries to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is:

Patch "powerpc/rfi-flush: Call setup_rfi_flush() after LPM migration" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/rfi-flush: Call setup_rfi_flush() after LPM migration to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is

Patch "powerpc/rfi-flush: Differentiate enabled and patched flush types" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/rfi-flush: Differentiate enabled and patched flush types to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch

Patch "powerpc/rfi-flush: Make it possible to call setup_rfi_flush() again" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/rfi-flush: Make it possible to call setup_rfi_flush() again to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the pa

Patch "powerpc/rfi-flush: Move out of HARDLOCKUP_DETECTOR #ifdef" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/rfi-flush: Move out of HARDLOCKUP_DETECTOR #ifdef to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is:

Patch "powerpc/pseries: Use the security flags in pseries_setup_rfi_flush()" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/pseries: Use the security flags in pseries_setup_rfi_flush() to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the p

Patch "powerpc/rfi-flush: Move the logic to avoid a redo into the debugfs code" has been added to the 4.9-stable tree

2018-06-02 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/rfi-flush: Move the logic to avoid a redo into the debugfs code to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of th