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: <20240301035059.GA577965@dev-arch.thelio-3990X>
Date: Thu, 29 Feb 2024 20:50:59 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: kernel test robot <lkp@...el.com>
Cc: Florian Westphal <fw@...len.de>, llvm@...ts.linux.dev,
	oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Alexei Starovoitov <ast@...nel.org>
Subject: Re: net/netfilter/nf_bpf_link.c:186:33: warning: bitwise operation
 between different enumeration types ('enum bpf_reg_type' and 'enum
 bpf_type_flag')

Hi all,

On Fri, Mar 01, 2024 at 08:57:56AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   87adedeba51a822533649b143232418b9e26d08b
> commit: fd9c663b9ad67dedfc9a3fd3429ddd3e83782b4d bpf: minimal support for programs hooked into netfilter framework
> date:   10 months ago
> config: riscv-defconfig (https://download.01.org/0day-ci/archive/20240301/202403010842.hhJY5TFK-lkp@intel.com/config)
> compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project edd4aee4dd9b5b98b2576a6f783e4086173d902a)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240301/202403010842.hhJY5TFK-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/202403010842.hhJY5TFK-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):

<snip>

While this change may introduce an instance of this warning, it is
actually a change on the clang side that causes this and I am still
looking for input on what to do about it:

https://github.com/ClangBuiltLinux/linux/issues/2002

I think this report can just be ignored for now. The Intel folks may
want to consider sending -Wenum-enum-conversion and
-Wenum-compare-conditional reports to our mailing list only until we can
sort this out. Sorry for the noise.

Cheers,
Nathan

> >> net/netfilter/nf_bpf_link.c:186:33: warning: bitwise operation between different enumeration types ('enum bpf_reg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
>      186 |         info->reg_type = PTR_TO_BTF_ID | PTR_TRUSTED;
>          |                          ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~
>    22 warnings generated.
> 
> 
> vim +186 net/netfilter/nf_bpf_link.c
> 
>    170	
>    171	static bool nf_ptr_to_btf_id(struct bpf_insn_access_aux *info, const char *name)
>    172	{
>    173		struct btf *btf;
>    174		s32 type_id;
>    175	
>    176		btf = bpf_get_btf_vmlinux();
>    177		if (IS_ERR_OR_NULL(btf))
>    178			return false;
>    179	
>    180		type_id = btf_find_by_name_kind(btf, name, BTF_KIND_STRUCT);
>    181		if (WARN_ON_ONCE(type_id < 0))
>    182			return false;
>    183	
>    184		info->btf = btf;
>    185		info->btf_id = type_id;
>  > 186		info->reg_type = PTR_TO_BTF_ID | PTR_TRUSTED;
>    187		return true;
>    188	}
>    189	
> 
> -- 
> 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