]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit3aa5b3feb7433834bf4f82ff7a5446822c8acdf8
tree3359d4a96bb494e1a92c16f0ec44f86cc796a257
parent609a2ee88cd35bdef74eb0fce7c0e6641d89e24d
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