lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202507100034.wXofj6VX-lkp@intel.com>
Date: Thu, 10 Jul 2025 01:19:26 +0800
From: kernel test robot <lkp@...el.com>
To: Chenghao Duan <duanchenghao@...inos.cn>, ast@...nel.org,
	daniel@...earbox.net, andrii@...nel.org, yangtiezhu@...ngson.cn,
	hengqi.chen@...il.com, chenhuacai@...nel.org
Cc: oe-kbuild-all@...ts.linux.dev, martin.lau@...ux.dev, eddyz87@...il.com,
	song@...nel.org, yonghong.song@...ux.dev, john.fastabend@...il.com,
	kpsingh@...nel.org, sdf@...ichev.me, haoluo@...gle.com,
	jolsa@...nel.org, kernel@...0n.name, linux-kernel@...r.kernel.org,
	loongarch@...ts.linux.dev, bpf@...r.kernel.org,
	guodongtai@...inos.cn, duanchenghao@...inos.cn,
	youling.tang@...ux.dev, jianghaoran@...inos.cn
Subject: Re: [PATCH v3 5/5] LoongArch: BPF: Add bpf trampoline support for
 Loongarch

Hi Chenghao,

kernel test robot noticed the following build warnings:

[auto build test WARNING on bpf-next/net]
[also build test WARNING on bpf-next/master bpf/master linus/master v6.16-rc5 next-20250709]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Chenghao-Duan/LoongArch-Add-the-function-to-generate-the-beq-and-bne-assembly-instructions/20250709-135350
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git net
patch link:    https://lore.kernel.org/r/20250709055029.723243-6-duanchenghao%40kylinos.cn
patch subject: [PATCH v3 5/5] LoongArch: BPF: Add bpf trampoline support for Loongarch
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20250710/202507100034.wXofj6VX-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 01c97b4953e87ae455bd4c41e3de3f0f0f29c61c)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250710/202507100034.wXofj6VX-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507100034.wXofj6VX-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> arch/loongarch/net/bpf_jit.c:1411:6: warning: variable 'ip' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
    1411 |         if (addr && ctx->image && ctx->ro_image)
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/loongarch/net/bpf_jit.c:1414:51: note: uninitialized use occurs here
    1414 |         return emit_jump_and_link(ctx, LOONGARCH_GPR_RA, ip, addr);
         |                                                          ^~
   arch/loongarch/net/bpf_jit.c:1411:2: note: remove the 'if' if its condition is always true
    1411 |         if (addr && ctx->image && ctx->ro_image)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1412 |                 ip = (u64)(ctx->image + ctx->idx);
>> arch/loongarch/net/bpf_jit.c:1411:6: warning: variable 'ip' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
    1411 |         if (addr && ctx->image && ctx->ro_image)
         |             ^~~~~~~~~~~~~~~~~~
   arch/loongarch/net/bpf_jit.c:1414:51: note: uninitialized use occurs here
    1414 |         return emit_jump_and_link(ctx, LOONGARCH_GPR_RA, ip, addr);
         |                                                          ^~
   arch/loongarch/net/bpf_jit.c:1411:6: note: remove the '&&' if its condition is always true
    1411 |         if (addr && ctx->image && ctx->ro_image)
         |             ^~~~~~~~~~~~~~~~~~~~~
>> arch/loongarch/net/bpf_jit.c:1411:6: warning: variable 'ip' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
    1411 |         if (addr && ctx->image && ctx->ro_image)
         |             ^~~~
   arch/loongarch/net/bpf_jit.c:1414:51: note: uninitialized use occurs here
    1414 |         return emit_jump_and_link(ctx, LOONGARCH_GPR_RA, ip, addr);
         |                                                          ^~
   arch/loongarch/net/bpf_jit.c:1411:6: note: remove the '&&' if its condition is always true
    1411 |         if (addr && ctx->image && ctx->ro_image)
         |             ^~~~~~~
   arch/loongarch/net/bpf_jit.c:1409:8: note: initialize the variable 'ip' to silence this warning
    1409 |         u64 ip;
         |               ^
         |                = 0
   3 warnings generated.


vim +1411 arch/loongarch/net/bpf_jit.c

  1406	
  1407	static int emit_call(struct jit_ctx *ctx, u64 addr)
  1408	{
  1409		u64 ip;
  1410	
> 1411		if (addr && ctx->image && ctx->ro_image)
  1412			ip = (u64)(ctx->image + ctx->idx);
  1413	
  1414		return emit_jump_and_link(ctx, LOONGARCH_GPR_RA, ip, addr);
  1415	}
  1416	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ