summaryrefslogtreecommitdiffstats
path: root/arch/x86/net
diff options
context:
space:
mode:
authorJie Meng <jmeng@fb.com>2022-10-05 19:00:39 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2022-10-07 16:22:07 +0200
commit2e30960097f6bc1a0dff89c0bcbc4138e3506d7c (patch)
treeb5a4f4c5853ca10e9695dfa45d6d6ead307a5c70 /arch/x86/net
parentselftests/bpf: Add missing bpf_iter_vma_offset__destroy call (diff)
downloadlinux-2e30960097f6bc1a0dff89c0bcbc4138e3506d7c.tar.xz
linux-2e30960097f6bc1a0dff89c0bcbc4138e3506d7c.zip
bpf, x64: Remove unnecessary check on existence of SSE2
SSE2 and hence lfence are architectural in x86-64 and no need to check whether they're supported in CPU. SSE2's CPUID flag is still set to maintain backward compatibility with older code or code shared with x86, but bpf_jit_comp.c is compiled under x86-64 exclusively so the check is redundant. Signed-off-by: Jie Meng <jmeng@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: KP Singh <kpsingh@kernel.org> Link: https://lore.kernel.org/bpf/20221005170039.3936894-1-jmeng@fb.com
Diffstat (limited to 'arch/x86/net')
-rw-r--r--arch/x86/net/bpf_jit_comp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
index 99620428ad78..0abd082786e7 100644
--- a/arch/x86/net/bpf_jit_comp.c
+++ b/arch/x86/net/bpf_jit_comp.c
@@ -1226,8 +1226,7 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image, u8 *rw_image
/* speculation barrier */
case BPF_ST | BPF_NOSPEC:
- if (boot_cpu_has(X86_FEATURE_XMM2))
- EMIT_LFENCE();
+ EMIT_LFENCE();
break;
/* ST: *(u8*)(dst_reg + off) = imm */