Re: fix u32 printf specifier

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

 



On Wed, Jun 02, 2021 at 05:23:19PM +0200, Benedict Schlueter wrote:
> Hi,
> 
> I assume its clear what this patch does.
> 
> 
> From 9618e4475b812651c3fe481af885757675fc4ae2 Mon Sep 17 00:00:00 2001
> From: Benedict Schlueter <benedict.schlueter@xxxxxx>
> Date: Wed, 2 Jun 2021 17:16:13 +0200
> Subject: use correct format string specifier for unsigned 32 Bit
>  bounds print statements
> 
> Signed-off-by: Benedict Schlueter <benedict.schlueter@xxxxxx>
> ---
>  kernel/bpf/verifier.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> index 1de4b8c6ee42..e107996c7220 100644
> --- a/kernel/bpf/verifier.c
> +++ b/kernel/bpf/verifier.c
> @@ -690,11 +690,11 @@ static void print_verifier_state(struct
> bpf_verifier_env *env,
>                          (int)(reg->s32_max_value));
>                  if (reg->u32_min_value != reg->umin_value &&
>                      reg->u32_min_value != U32_MIN)
> -                    verbose(env, ",u32_min_value=%d",
> +                    verbose(env, ",u32_min_value=%u",
>                          (int)(reg->u32_min_value));
"%u" and (int) cast don't make sense.

It needs a proper commit message to explain why the change is needed
and also a Fixes tag.  Please refer to Documentation/bpf/bpf_devel_QA.rst.



[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