From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexei Starovoitov Subject: Re: [PATCH bpf-next] bpf: fix stacksafe exploration when comparing states Date: Sat, 23 Dec 2017 11:08:14 -0800 Message-ID: <20171223190812.bh4gvbijrhrsqf4q@ast-mbp> References: <20171223100955.7208-1-g.borello@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net To: Gianluca Borello Return-path: Received: from mail-pg0-f65.google.com ([74.125.83.65]:33360 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752767AbdLWTIS (ORCPT ); Sat, 23 Dec 2017 14:08:18 -0500 Received: by mail-pg0-f65.google.com with SMTP id g7so15704303pgs.0 for ; Sat, 23 Dec 2017 11:08:17 -0800 (PST) Content-Disposition: inline In-Reply-To: <20171223100955.7208-1-g.borello@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Sat, Dec 23, 2017 at 10:09:55AM +0000, 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/testing/selftests/bpf/test_verifier.c | 51 +++++++++++++++++++++++++++++ > 2 files changed, 52 insertions(+), 1 deletion(-) > > diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c > index 8b442ae125d0..93e1c77dae1d 100644 > --- a/kernel/bpf/verifier.c > +++ b/kernel/bpf/verifier.c > @@ -4107,7 +4107,7 @@ static bool stacksafe(struct bpf_func_state *old, > > if (!(old->stack[spi].spilled_ptr.live & REG_LIVE_READ)) > /* explored state didn't use this */ > - return true; > + continue; argh. Not sure what I was thinking. Applied, Thanks a lot Gianluca!