]> git.hungrycats.org Git - linux/commit
powerpc: Add security feature flags for Spectre/Meltdown
authorMichael Ellerman <mpe@ellerman.id.au>
Tue, 22 May 2018 14:41:13 +0000 (00:41 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 May 2018 14:46:04 +0000 (16:46 +0200)
commitfb02c77649f0c29dec656048b87c9f23b3d082b7
tree8678dabafe2f595654debb041247ab60a016007c
parent2a7130afada05f4a3997e64daacf0c966c514a81
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]