bpf: verifier: teach the verifier to reason about the BPF_JSET instruction
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 20 Dec 2018 06:13:04 +0000 (22:13 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 20 Dec 2018 16:28:28 +0000 (17:28 +0100)
commit960ea056561a08e2b837b2f02d22c53226414a84
tree3359d4a96bb494e1a92c16f0ec44f86cc796a257
parent5a8d5209ac0228c9cf8f335dfdfffa71c54b3201
bpf: verifier: teach the verifier to reason about the BPF_JSET instruction

Some JITs (nfp) try to optimize code on their own.  It could make
sense in case of BPF_JSET instruction which is currently not interpreted
by the verifier, meaning for instance that dead could would not be
detected if it was under BPF_JSET branch.

Teach the verifier basics of BPF_JSET, JIT optimizations will be
removed shortly.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Jiong Wang <jiong.wang@netronome.com>
Acked-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
kernel/bpf/verifier.c