Re: [PATCH bpf-next] bpf: fix stacksafe exploration when comparing states

2017-12-23 Thread Alexei Starovoitov
On Sat, Dec 23, 2017 at 10:09:55AM +, Gianluca Borello wrote: ... > Fixes: cc2b14d51053 ("bpf: teach verifier to recognize zero initialized > stack") > Signed-off-by: Gianluca Borello > Acked-by: Alexei Starovoitov > --- > kernel/bpf/verifier.c | 2 +- > tools/testin

[PATCH bpf-next] bpf: fix stacksafe exploration when comparing states

2017-12-23 Thread Gianluca Borello
Commit cc2b14d51053 ("bpf: teach verifier to recognize zero initialized stack") introduced a very relaxed check when comparing stacks of different states, effectively returning a positive result in many cases where it shouldn't. This can create problems in cases such as this following C pseudocode