From: Diana Craciun Date: Wed, 12 Dec 2018 14:03:02 +0000 (+0200) Subject: powerpc/fsl: Fix spectre_v2 mitigations reporting X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7d8bad99ba5a22892f0cad6881289fdc3875a930;p=openwrt%2Fstaging%2Fblogic.git powerpc/fsl: Fix spectre_v2 mitigations reporting Currently for CONFIG_PPC_FSL_BOOK3E the spectre_v2 file is incorrect: $ cat /sys/devices/system/cpu/vulnerabilities/spectre_v2 "Mitigation: Software count cache flush" Which is wrong. Fix it to report vulnerable for now. Fixes: ee13cb249fab ("powerpc/64s: Add support for software count cache flush") Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman --- diff --git a/arch/powerpc/kernel/security.c b/arch/powerpc/kernel/security.c index 9703dce36307..9e5f949a7ed8 100644 --- a/arch/powerpc/kernel/security.c +++ b/arch/powerpc/kernel/security.c @@ -23,7 +23,7 @@ enum count_cache_flush_type { COUNT_CACHE_FLUSH_SW = 0x2, COUNT_CACHE_FLUSH_HW = 0x4, }; -static enum count_cache_flush_type count_cache_flush_type; +static enum count_cache_flush_type count_cache_flush_type = COUNT_CACHE_FLUSH_NONE; bool barrier_nospec_enabled; static bool no_nospec;