powerpc: Add security feature flags for Spectre/Meltdown
authorMichael Ellerman <mpe@ellerman.id.au>
Sat, 26 May 2018 04:27:36 +0000 (14:27 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:51:51 +0000 (07:51 +0200)
commite2ba26dba5307d01fb9dd2ab813ee3b10f424cb0
treeec8b1647c0ecd9492f509a3ccb5a220a55730c70
parent4c5463a5a374c119a17a62f39ac3d1e2f8b7ea8d
powerpc: Add security feature flags for Spectre/Meltdown

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 for details.

Arguably these could be firmware features, but that then requires them
to be read early in boot so they're available prior to asm feature
patching, but we don't actually want to use them for patching. We may
also want to dynamically update them in future, which would be
incompatible with the way firmware features work (at the moment at
least). So for now just make them separate flags.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/include/asm/security_features.h [new file with mode: 0644]
arch/powerpc/kernel/Makefile
arch/powerpc/kernel/security.c [new file with mode: 0644]