Re: [PATCH bpf-next] Fix incorrect integer literal used for marking scratched registers in verifier logs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 10, 2022 at 1:52 PM Song Liu <song@xxxxxxxxxx> wrote:
>
> On Fri, Jan 7, 2022 at 4:59 PM Christy Lee <christylee@xxxxxx> wrote:
> >
> > env->scratched_stack_slots is a 64-bit value, we should use ULL
> > instead of UL literal values.
> >
> > Reported-by: kernel test robot <lkp@xxxxxxxxx>
> > Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> > Signed-off-by: Christy Lee <christylee@xxxxxx>
>
> The fix looks good to me. Thus:
>
> Acked-by: Song Liu <songliubraving@xxxxxx>
>
> However, the patch looks corrupted. Also, the subject is probably too
> long (./scripts/checkpatch.pl should complain about it).
>

I just checked that even with an absurdly long subject (more than 200
characters), ./scripts/checkpatch.pl doesn't complain. It only complains
when the commit message body has longer than 75 characters but not the
subject line.  What's the maximum subject line length?

Christy

> Thanks,
> Song
>
>
> > ---
> >  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 bfb45381fb3f..a8587210907d 100644
> > --- a/kernel/bpf/verifier.c
> > +++ b/kernel/bpf/verifier.c
> > @@ -616,7 +616,7 @@ static void mark_reg_scratched(struct bpf_verifier_env *env, u32 regno)
> >
> >  static void mark_stack_slot_scratched(struct bpf_verifier_env *env, u32 spi)
> >  {
> > -       env->scratched_stack_slots |= 1UL << spi;
> > +       env->scratched_stack_slots |= 1ULL << spi;
> >  }
> >
> >  static bool reg_scratched(const struct bpf_verifier_env *env, u32 regno)
> > @@ -637,14 +637,14 @@ static bool verifier_state_scratched(const struct bpf_verifier_env *env)
> >  static void mark_verifier_state_clean(struct bpf_verifier_env *env)
> >  {
> >         env->scratched_regs = 0U;
> > -       env->scratched_stack_slots = 0UL;
> > +       env->scratched_stack_slots = 0ULL;
> >  }
> >
> >  /* Used for printing the entire verifier state. */
> >  static void mark_verifier_state_scratched(struct bpf_verifier_env *env)
> >  {
> >         env->scratched_regs = ~0U;
> > -       env->scratched_stack_slots = ~0UL;
> > +       env->scratched_stack_slots = ~0ULL;
> >  }
> >
> >  /* The reg state of a pointer or a bounded scalar was saved when
> > --
> > 2.30.2
> >



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux