Commit 5b9ee259 authored by Juerg Haefliger's avatar Juerg Haefliger Committed by Stefan Bader

UBUNTU: SAUCE: bpf: Use barrier_nospec() instead of osb()

BugLink: https://bugs.launchpad.net/bugs/1774181

With the rename of osb() in the previous commit, use barrier_nospec()
instead.
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
parent 3ec04c3a
......@@ -27,9 +27,9 @@
#include <linux/random.h>
#include <linux/moduleloader.h>
#include <linux/bpf.h>
#include <linux/nospec.h>
#include <asm/unaligned.h>
#include <asm/barrier.h>
/* Registers */
#define BPF_R0 regs[BPF_REG_0]
......@@ -632,7 +632,7 @@ static unsigned int __bpf_prog_run(void *ctx, const struct bpf_insn *insn)
DST = IMM;
CONT;
LD_IMM_DW:
osb();
barrier_nospec();
DST = (u64) (u32) insn[0].imm | ((u64) (u32) insn[1].imm) << 32;
insn++;
CONT;
......@@ -847,7 +847,7 @@ static unsigned int __bpf_prog_run(void *ctx, const struct bpf_insn *insn)
*(SIZE *)(unsigned long) (DST + insn->off) = IMM; \
CONT; \
LDX_MEM_##SIZEOP: \
osb(); \
barrier_nospec(); \
DST = *(SIZE *)(unsigned long) (SRC + insn->off); \
CONT;
......
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