* [PATCH bpf-next] Fix incorrect integer literal used for marking scratched registers in verifier logs [not found] <202201060848.nagWejwv-lkp@intel.com> @ 2022-01-08 0:58 ` Christy Lee 2022-01-10 21:52 ` Song Liu 0 siblings, 1 reply; 6+ messages in thread From: Christy Lee @ 2022-01-08 0:58 UTC (permalink / raw) To: dan.carpenter Cc: ast, christylee, kbuild-all, kbuild, linux-mm, bpf, kernel-team, christyc.y.lee, kernel test robot env->scratched_stack_slots is a 64-bit value, we should use ULL instead of UL literal values. Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Christy Lee <christylee@fb.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 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 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH bpf-next] Fix incorrect integer literal used for marking scratched registers in verifier logs 2022-01-08 0:58 ` [PATCH bpf-next] Fix incorrect integer literal used for marking scratched registers in verifier logs Christy Lee @ 2022-01-10 21:52 ` Song Liu 2022-01-10 22:12 ` Christy Lee 0 siblings, 1 reply; 6+ messages in thread From: Song Liu @ 2022-01-10 21:52 UTC (permalink / raw) To: Christy Lee Cc: Dan Carpenter, Alexei Starovoitov, kbuild-all, kbuild, Linux-MM, bpf, Kernel Team, christyc.y.lee, kernel test robot On Fri, Jan 7, 2022 at 4:59 PM Christy Lee <christylee@fb.com> 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@intel.com> > Reported-by: Dan Carpenter <dan.carpenter@oracle.com> > Signed-off-by: Christy Lee <christylee@fb.com> The fix looks good to me. Thus: Acked-by: Song Liu <songliubraving@fb.com> However, the patch looks corrupted. Also, the subject is probably too long (./scripts/checkpatch.pl should complain about it). 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 > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH bpf-next] Fix incorrect integer literal used for marking scratched registers in verifier logs 2022-01-10 21:52 ` Song Liu @ 2022-01-10 22:12 ` Christy Lee 2022-01-10 22:25 ` Song Liu 2022-01-11 9:48 ` Dan Carpenter 0 siblings, 2 replies; 6+ messages in thread From: Christy Lee @ 2022-01-10 22:12 UTC (permalink / raw) To: Song Liu Cc: Christy Lee, Dan Carpenter, Alexei Starovoitov, kbuild-all, kbuild, Linux-MM, bpf, Kernel Team, kernel test robot On Mon, Jan 10, 2022 at 1:52 PM Song Liu <song@kernel.org> wrote: > > On Fri, Jan 7, 2022 at 4:59 PM Christy Lee <christylee@fb.com> 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@intel.com> > > Reported-by: Dan Carpenter <dan.carpenter@oracle.com> > > Signed-off-by: Christy Lee <christylee@fb.com> > > The fix looks good to me. Thus: > > Acked-by: Song Liu <songliubraving@fb.com> > > 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 > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH bpf-next] Fix incorrect integer literal used for marking scratched registers in verifier logs 2022-01-10 22:12 ` Christy Lee @ 2022-01-10 22:25 ` Song Liu 2022-01-11 9:48 ` Dan Carpenter 1 sibling, 0 replies; 6+ messages in thread From: Song Liu @ 2022-01-10 22:25 UTC (permalink / raw) To: Christy Lee Cc: Christy Lee, Dan Carpenter, Alexei Starovoitov, kbuild-all, kbuild, Linux-MM, bpf, Kernel Team, kernel test robot On Mon, Jan 10, 2022 at 2:13 PM Christy Lee <christyc.y.lee@gmail.com> wrote: > > On Mon, Jan 10, 2022 at 1:52 PM Song Liu <song@kernel.org> wrote: > > > > On Fri, Jan 7, 2022 at 4:59 PM Christy Lee <christylee@fb.com> 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@intel.com> > > > Reported-by: Dan Carpenter <dan.carpenter@oracle.com> > > > Signed-off-by: Christy Lee <christylee@fb.com> > > > > The fix looks good to me. Thus: > > > > Acked-by: Song Liu <songliubraving@fb.com> > > > > 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? Hmm.. you are right. I somehow thought there was a limit by checkpatch. I would personally limit it to 75 characters though. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH bpf-next] Fix incorrect integer literal used for marking scratched registers in verifier logs 2022-01-10 22:12 ` Christy Lee 2022-01-10 22:25 ` Song Liu @ 2022-01-11 9:48 ` Dan Carpenter 2022-01-11 17:56 ` Alexei Starovoitov 1 sibling, 1 reply; 6+ messages in thread From: Dan Carpenter @ 2022-01-11 9:48 UTC (permalink / raw) To: Christy Lee Cc: Song Liu, Christy Lee, Alexei Starovoitov, kbuild-all, kbuild, Linux-MM, bpf, Kernel Team, kernel test robot On Mon, Jan 10, 2022 at 02:12:58PM -0800, Christy Lee wrote: > On Mon, Jan 10, 2022 at 1:52 PM Song Liu <song@kernel.org> wrote: > > > > On Fri, Jan 7, 2022 at 4:59 PM Christy Lee <christylee@fb.com> 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@intel.com> > > > Reported-by: Dan Carpenter <dan.carpenter@oracle.com> > > > Signed-off-by: Christy Lee <christylee@fb.com> > > > > The fix looks good to me. Thus: > > > > Acked-by: Song Liu <songliubraving@fb.com> > > > > 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? > People say 50 characters but that just seems more aspirational than realistic. This patch needs a subsystem prefix as well. regards, dan carpenter ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH bpf-next] Fix incorrect integer literal used for marking scratched registers in verifier logs 2022-01-11 9:48 ` Dan Carpenter @ 2022-01-11 17:56 ` Alexei Starovoitov 0 siblings, 0 replies; 6+ messages in thread From: Alexei Starovoitov @ 2022-01-11 17:56 UTC (permalink / raw) To: Dan Carpenter Cc: Christy Lee, Song Liu, Christy Lee, Alexei Starovoitov, kbuild-all, kbuild, Linux-MM, bpf, Kernel Team, kernel test robot On Tue, Jan 11, 2022 at 1:49 AM Dan Carpenter <dan.carpenter@oracle.com> wrote: > > On Mon, Jan 10, 2022 at 02:12:58PM -0800, Christy Lee wrote: > > On Mon, Jan 10, 2022 at 1:52 PM Song Liu <song@kernel.org> wrote: > > > > > > On Fri, Jan 7, 2022 at 4:59 PM Christy Lee <christylee@fb.com> 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@intel.com> > > > > Reported-by: Dan Carpenter <dan.carpenter@oracle.com> > > > > Signed-off-by: Christy Lee <christylee@fb.com> > > > > > > The fix looks good to me. Thus: > > > > > > Acked-by: Song Liu <songliubraving@fb.com> > > > > > > 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? > > > > People say 50 characters but that just seems more aspirational than > realistic. This patch needs a subsystem prefix as well. I fixed patch subj and applied to bpf tree. Thanks everyone. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-01-11 17:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <202201060848.nagWejwv-lkp@intel.com>
2022-01-08 0:58 ` [PATCH bpf-next] Fix incorrect integer literal used for marking scratched registers in verifier logs Christy Lee
2022-01-10 21:52 ` Song Liu
2022-01-10 22:12 ` Christy Lee
2022-01-10 22:25 ` Song Liu
2022-01-11 9:48 ` Dan Carpenter
2022-01-11 17:56 ` Alexei Starovoitov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox