]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: recognize 64bit immediate loads as consts
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 21 Sep 2016 10:43:59 +0000 (11:43 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Sep 2016 23:50:02 +0000 (19:50 -0400)
commit6e2c2cb23bd3c9e85e856e918bcc780e0927334c
tree7aca8f20e9bb67b803f70ae60cda1f53b397d325
parentcaa9f30435df54d706ab6f8bd0bb1d8906aa1ca6
bpf: recognize 64bit immediate loads as consts

When running as parser interpret BPF_LD | BPF_IMM | BPF_DW
instructions as loading CONST_IMM with the value stored
in imm.  The verifier will continue not recognizing those
due to concerns about search space/program complexity
increase.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/bpf/verifier.c