Commit 06c867e7 authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Kleber Sacilotto de Souza

UBUNTU: SAUCE: FIX: x86, bpf, jit: prevent speculative execution when JIT is enabled

CVE-2017-5753 (Spectre v1 Intel)
Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 3cc56bbb
...@@ -539,8 +539,10 @@ static inline bool bpf_jit_fence_present(void) ...@@ -539,8 +539,10 @@ static inline bool bpf_jit_fence_present(void)
{ {
/* Check if lfence is present on CPU /* Check if lfence is present on CPU
*/ */
#ifdef CONFIG_X86
if (boot_cpu_has(X86_FEATURE_LFENCE_RDTSC)) if (boot_cpu_has(X86_FEATURE_LFENCE_RDTSC))
return true; return true;
#endif
return false; return false;
} }
#else #else
......
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