Commit 48a02848 authored by Tyler Hicks's avatar Tyler Hicks Committed by Kleber Sacilotto de Souza

Revert "bpf: prevent speculative execution in eBPF interpreter"

This reverts commit 81774d48 which was
part of an out-of-tree mitigation for CVE-2017-5753 (Spectre variant 1),
in the BPF subsystem, that was available at the time of the coordinated
release date. The Ubuntu kernel has since rebased on top of newer
linux-stable releases and picked up commit b2157399 ("bpf: prevent
out-of-bounds speculation") which is upstream's mitigation of Spectre
variant 1 in the BPF code.

CVE-2017-5753
Signed-off-by: default avatarTyler Hicks <tyhicks@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 avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent cb0321f0
......@@ -29,7 +29,6 @@
#include <linux/bpf.h>
#include <asm/unaligned.h>
#include <asm/barrier.h>
/* Registers */
#define BPF_R0 regs[BPF_REG_0]
......@@ -632,7 +631,6 @@ static unsigned int __bpf_prog_run(void *ctx, const struct bpf_insn *insn)
DST = IMM;
CONT;
LD_IMM_DW:
osb();
DST = (u64) (u32) insn[0].imm | ((u64) (u32) insn[1].imm) << 32;
insn++;
CONT;
......@@ -847,7 +845,6 @@ 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(); \
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