]> git.baikalelectronics.ru Git - kernel.git/commit
bpf, verifier: add additional patterns to evaluate_reg_imm_alu
authorJohn Fastabend <john.fastabend@gmail.com>
Sun, 2 Jul 2017 00:13:30 +0000 (02:13 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Jul 2017 09:22:52 +0000 (02:22 -0700)
commit93dfe0b1ef937b4c8abf54b85f63f08178c5c37e
tree5628949d11bd28e33bfcf8e22b5dbd1548ad8322
parentf40f0ecf84928e301643a5a1a76acd8ed126436e
bpf, verifier: add additional patterns to evaluate_reg_imm_alu

Currently the verifier does not track imm across alu operations when
the source register is of unknown type. This adds additional pattern
matching to catch this and track imm. We've seen LLVM generating this
pattern while working on cilium.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/bpf/verifier.c