powerpc/64s: Patch barrier_nospec in modules

Note that unlike RFI which is patched only in kernel the nospec state
reflects settings at the time the module was loaded.

Iterating all modules and re-patching every time the settings change
is not implemented.

Based on lwsync patching.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Michal Suchanek
2018-04-24 14:15:56 +10:00
committed by Michael Ellerman
parent 2eea7f067f
commit 815069ca57
4 changed files with 27 additions and 4 deletions
+1 -1
View File
@@ -14,7 +14,7 @@
unsigned long powerpc_security_features __read_mostly = SEC_FTR_DEFAULT;
static bool barrier_nospec_enabled;
bool barrier_nospec_enabled;
static void enable_barrier_nospec(bool enable)
{