bpf: don't check spilled reg state for non-STACK_SPILLed type slots
authorDaniel Borkmann <daniel@iogearbox.net>
Sat, 10 Jun 2017 22:50:41 +0000 (00:50 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 10 Jun 2017 23:05:45 +0000 (19:05 -0400)
commitd25da6caa2a1d6644360c40d7c5fd7c057551360
tree4a44563771a6f4cd9704d34d840f8c02c86c22da
parent20b9d7ac48526ce9a14106241e76e8382d126a60
bpf: don't check spilled reg state for non-STACK_SPILLed type slots

spilled_regs[] state is only used for stack slots of type STACK_SPILL,
never for STACK_MISC. Right now, in states_equal(), even if we have
old and current stack state of type STACK_MISC, we compare spilled_regs[]
for that particular offset. Just skip these like we do everywhere else.

Signed-off-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