diff options
author | David S. Miller <davem@davemloft.net> | 2021-07-29 00:53:32 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-07-29 00:53:32 +0100 |
commit | fc16a5322ee6c30ea848818722eee5d352f8d127 (patch) | |
tree | 2f61fb372bf7a1c337fd0c1bd51a4096567e5d0c /arch/x86/net/bpf_jit_comp32.c | |
parent | 89fb62fde3b226f99b7015280cf132e2a7438edf (diff) | |
parent | 2039f26f3aca5b0e419b98f65dd36481337b86ee (diff) | |
download | linux-fc16a5322ee6c30ea848818722eee5d352f8d127.tar.bz2 |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Daniel Borkmann says:
====================
pull-request: bpf 2021-07-29
The following pull-request contains BPF updates for your *net* tree.
We've added 9 non-merge commits during the last 14 day(s) which contain
a total of 20 files changed, 446 insertions(+), 138 deletions(-).
The main changes are:
1) Fix UBSAN out-of-bounds splat for showing XDP link fdinfo, from Lorenz Bauer.
2) Fix insufficient Spectre v4 mitigation in BPF runtime, from Daniel Borkmann,
Piotr Krysiuk and Benedict Schlueter.
3) Batch of fixes for BPF sockmap found under stress testing, from John Fastabend.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/x86/net/bpf_jit_comp32.c')
-rw-r--r-- | arch/x86/net/bpf_jit_comp32.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/net/bpf_jit_comp32.c b/arch/x86/net/bpf_jit_comp32.c index 3da88ded6ee3..3bfda5f502cb 100644 --- a/arch/x86/net/bpf_jit_comp32.c +++ b/arch/x86/net/bpf_jit_comp32.c @@ -1886,6 +1886,12 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image, i++; break; } + /* speculation barrier */ + case BPF_ST | BPF_NOSPEC: + if (boot_cpu_has(X86_FEATURE_XMM2)) + /* Emit 'lfence' */ + EMIT3(0x0F, 0xAE, 0xE8); + break; /* ST: *(u8*)(dst_reg + off) = imm */ case BPF_ST | BPF_MEM | BPF_H: case BPF_ST | BPF_MEM | BPF_B: |