]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
UBUNTU: SAUCE: FIX: x86, bpf, jit: prevent speculative execution when JIT is enabled
authorAndy Whitcroft <apw@canonical.com>
Wed, 31 Jan 2018 13:23:49 +0000 (13:23 +0000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 5 Feb 2018 15:45:35 +0000 (16:45 +0100)
CVE-2017-5753 (Spectre v1 Intel)

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
include/linux/filter.h

index 5da1fb4df8cec4759aa698b77d4b39663b82ef41..e5640ce90d15d8ba05cda9fb9219024395bec0d3 100644 (file)
@@ -539,8 +539,10 @@ static inline bool bpf_jit_fence_present(void)
 {
        /* Check if lfence is present on CPU
         */
+#ifdef CONFIG_X86
        if (boot_cpu_has(X86_FEATURE_LFENCE_RDTSC))
                return true;
+#endif
        return false;
 }
 #else