Re: [PATCH net-next] bpf: simplify verifier register state assignments

2016-04-10 Thread David Miller
From: Alexei Starovoitov Date: Wed, 6 Apr 2016 19:39:21 -0700 > verifier is using the following structure to track the state of registers: > struct reg_state { > enum bpf_reg_type type; > union { > int imm; > struct bpf_map *map_ptr; > }; > }; > and later on in states_

Re: [PATCH net-next] bpf: simplify verifier register state assignments

2016-04-07 Thread Daniel Borkmann
On 04/07/2016 04:39 AM, Alexei Starovoitov wrote: verifier is using the following structure to track the state of registers: struct reg_state { enum bpf_reg_type type; union { int imm; struct bpf_map *map_ptr; }; }; and later on in states_equal() does memcmp(&old-

[PATCH net-next] bpf: simplify verifier register state assignments

2016-04-06 Thread Alexei Starovoitov
verifier is using the following structure to track the state of registers: struct reg_state { enum bpf_reg_type type; union { int imm; struct bpf_map *map_ptr; }; }; and later on in states_equal() does memcmp(&old->regs[i], &cur->regs[i],..) to find equivalent states. Th