Commit 88948f5a authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Kleber Sacilotto de Souza

Revert "bpf: prevent speculative execution in eBPF interpreter"

CVE-2017-5753 (revert embargoed)
CVE-2017-5715 (revert embargoed)

This reverts commit ac92d827.
Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 543389c8
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <linux/bpf.h> #include <linux/bpf.h>
#include <asm/unaligned.h> #include <asm/unaligned.h>
#include <asm/barrier.h>
/* Registers */ /* Registers */
#define BPF_R0 regs[BPF_REG_0] #define BPF_R0 regs[BPF_REG_0]
...@@ -631,7 +630,6 @@ static unsigned int __bpf_prog_run(void *ctx, const struct bpf_insn *insn) ...@@ -631,7 +630,6 @@ static unsigned int __bpf_prog_run(void *ctx, const struct bpf_insn *insn)
DST = IMM; DST = IMM;
CONT; CONT;
LD_IMM_DW: LD_IMM_DW:
gmb();
DST = (u64) (u32) insn[0].imm | ((u64) (u32) insn[1].imm) << 32; DST = (u64) (u32) insn[0].imm | ((u64) (u32) insn[1].imm) << 32;
insn++; insn++;
CONT; CONT;
...@@ -846,7 +844,6 @@ static unsigned int __bpf_prog_run(void *ctx, const struct bpf_insn *insn) ...@@ -846,7 +844,6 @@ static unsigned int __bpf_prog_run(void *ctx, const struct bpf_insn *insn)
*(SIZE *)(unsigned long) (DST + insn->off) = IMM; \ *(SIZE *)(unsigned long) (DST + insn->off) = IMM; \
CONT; \ CONT; \
LDX_MEM_##SIZEOP: \ LDX_MEM_##SIZEOP: \
gmb(); \
DST = *(SIZE *)(unsigned long) (SRC + insn->off); \ DST = *(SIZE *)(unsigned long) (SRC + insn->off); \
CONT; 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