nfp: bpf: reject program on instructions unknown to the JIT compiler
authorQuentin Monnet <quentin.monnet@netronome.com>
Tue, 16 Jan 2018 23:51:50 +0000 (15:51 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 17 Jan 2018 00:15:06 +0000 (01:15 +0100)
commit74801e50d5b89329e6c02b8bd924a41234f76316
treeeffbbab7241a7b203f123449f858517ba09bdb22
parent7dfa4d87cfc48f3d4171f4a1b886bbbe4faf5c07
nfp: bpf: reject program on instructions unknown to the JIT compiler

If an eBPF instruction is unknown to the driver JIT compiler, we can
reject the program at verification time.

Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Jiong Wang <jiong.wang@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
drivers/net/ethernet/netronome/nfp/bpf/jit.c
drivers/net/ethernet/netronome/nfp/bpf/main.h
drivers/net/ethernet/netronome/nfp/bpf/verifier.c