In message: Re: [PATCH linux-yocto 2/2] bpf: Fix the indention issue in 
grow_stack_state()
on 23/08/2024 Bruce Ashfield wrote:

> In message: [PATCH linux-yocto 2/2] bpf: Fix the indention issue in 
> grow_stack_state()
> on 23/08/2024 Kevin Hao wrote:
> 
> > From: Kevin Hao <kexin....@windriver.com>
> > 
> > The commit 81c12119c23f ("bpf: Fix accesses to uninit stack slots") was
> > backported from upstream, but the indention of some codes were mangled
> > when doing the backport. Fix them to suppress the following build error
> > when CONFIG_WERROR is enabled:
> >   kernel/bpf/verifier.c:866:5: error: this ‘if’ clause does not guard... 
> > [-Werror=misleading-indentation]
> >     866 |     if (env->subprog_info[state->subprogno].stack_depth < size)
> >         |     ^~
> 
> Aha, I just replied to the patch from Liyin Zhang
> for the same issue on 5.15 .. I was looking for a
> better explanation of how this happened, when the
> original upstream commit looks correct.
> 
> Your explanation clarifies that for me.
> 
> I'll still wait for a v2 of the 5.15 patch, but

When i wrote that, i thought this was for 6.1 and
not 5.15.

I won't need a v2 of that other patch, since this
has been merged.

Bruce

> I've gone head and merged these two.
> 
> Bruce
> 
> > 
> > Signed-off-by: Kevin Hao <kexin....@windriver.com>
> > ---
> >  kernel/bpf/verifier.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> > index df30d7be19aa..c07e8b8dc8a3 100644
> > --- a/kernel/bpf/verifier.c
> > +++ b/kernel/bpf/verifier.c
> > @@ -862,9 +862,9 @@ static int grow_stack_state(struct bpf_verifier_env 
> > *env, struct bpf_func_state
> >  
> >     state->allocated_stack = size;
> >  
> > -    /* update known max for given subprogram */
> > -    if (env->subprog_info[state->subprogno].stack_depth < size)
> > -        env->subprog_info[state->subprogno].stack_depth = size;
> > +   /* update known max for given subprogram */
> > +   if (env->subprog_info[state->subprogno].stack_depth < size)
> > +           env->subprog_info[state->subprogno].stack_depth = size;
> >  
> >     return 0;
> >  }
> > 
> > -- 
> > 2.45.1
> > 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#14322): 
https://lists.yoctoproject.org/g/linux-yocto/message/14322
Mute This Topic: https://lists.yoctoproject.org/mt/108053271/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to