Commit 4134f19a authored by Mauricio Faria de Oliveira's avatar Mauricio Faria de Oliveira Committed by Juerg Haefliger

powerpc: Move default security feature flags

CVE-2018-3639 (powerpc)

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-by: default avatarMauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
(cherry picked from commit e7347a86)
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
parent e89cb4d7
...@@ -63,4 +63,12 @@ static inline bool security_ftr_enabled(unsigned long feature) ...@@ -63,4 +63,12 @@ static inline bool security_ftr_enabled(unsigned long feature)
// Firmware configuration indicates user favours security over performance // Firmware configuration indicates user favours security over performance
#define SEC_FTR_FAVOUR_SECURITY 0x0000000000000200ull #define SEC_FTR_FAVOUR_SECURITY 0x0000000000000200ull
// Features enabled by default
#define SEC_FTR_DEFAULT \
(SEC_FTR_L1D_FLUSH_HV | \
SEC_FTR_L1D_FLUSH_PR | \
SEC_FTR_BNDS_CHK_SPEC_BAR | \
SEC_FTR_FAVOUR_SECURITY)
#endif /* _ASM_POWERPC_SECURITY_FEATURES_H */ #endif /* _ASM_POWERPC_SECURITY_FEATURES_H */
...@@ -11,12 +11,7 @@ ...@@ -11,12 +11,7 @@
#include <asm/security_features.h> #include <asm/security_features.h>
unsigned long powerpc_security_features __read_mostly = \ unsigned long powerpc_security_features __read_mostly = SEC_FTR_DEFAULT;
SEC_FTR_L1D_FLUSH_HV | \
SEC_FTR_L1D_FLUSH_PR | \
SEC_FTR_BNDS_CHK_SPEC_BAR | \
SEC_FTR_FAVOUR_SECURITY;
ssize_t cpu_show_meltdown(struct device *dev, struct device_attribute *attr, char *buf) ssize_t cpu_show_meltdown(struct device *dev, struct device_attribute *attr, char *buf)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment