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>] [day] [month] [year] [list]
Message-ID: <202405232036.Xqoc3b0J-lkp@intel.com>
Date: Thu, 23 May 2024 20:38:08 +0800
From: kernel test robot <lkp@...el.com>
To: Shahab Vahedi <shahab@...opsys.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	linux-snps-arc@...ts.infradead.org,
	Alexei Starovoitov <ast@...nel.org>
Subject: arch/arc/net/bpf_jit_core.c:170:47-52: WARNING: conversion to bool
 not needed here

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c760b3725e52403dc1b28644fb09c47a83cacea6
commit: f122668ddcce450c2585f0be4bf4478d6fd6176b ARC: Add eBPF JIT support
date:   11 days ago
config: arc-randconfig-r062-20240523 (https://download.01.org/0day-ci/archive/20240523/202405232036.Xqoc3b0J-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 13.2.0

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/202405232036.Xqoc3b0J-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> arch/arc/net/bpf_jit_core.c:170:47-52: WARNING: conversion to bool not needed here
--
>> arch/arc/net/bpf_jit_core.c:162:16-22: ERROR: application of sizeof to pointer
--
>> arch/arc/net/bpf_jit_core.c:586:5-8: Unneeded variable: "ret". Return "0" on line 638

vim +170 arch/arc/net/bpf_jit_core.c

   158	
   159	/* Initialise the context so there's no garbage. */
   160	static int jit_ctx_init(struct jit_context *ctx, struct bpf_prog *prog)
   161	{
 > 162		memset(ctx, 0, sizeof(ctx));
   163	
   164		ctx->orig_prog = prog;
   165	
   166		/* If constant blinding was requested but failed, scram. */
   167		ctx->prog = bpf_jit_blind_constants(prog);
   168		if (IS_ERR(ctx->prog))
   169			return PTR_ERR(ctx->prog);
 > 170		ctx->blinded = (ctx->prog == ctx->orig_prog ? false : true);
   171	
   172		/* If the verifier doesn't zero-extend, then we have to do it. */
   173		ctx->do_zext = !ctx->prog->aux->verifier_zext;
   174	
   175		ctx->is_extra_pass = ctx->prog->jited;
   176		ctx->user_bpf_prog = ctx->prog->is_func;
   177	
   178		return 0;
   179	}
   180	

-- 
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