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: <202207261758.8q1ANb9m-lkp@intel.com>
Date:   Tue, 26 Jul 2022 17:50:09 +0800
From:   kernel test robot <lkp@...el.com>
To:     Alexander Lobakin <alexandr.lobakin@...el.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [alobakin:ip_tunnel 31/36] net/core/filter.c:4686:51: warning:
 passing argument 4 of 'ip_tunnel_info_opts_set' makes integer from pointer
 without a cast

tree:   https://github.com/alobakin/linux ip_tunnel
head:   71925b314523a5f0a53e12881bc7f717b4c7f356
commit: 9f7e5133116c2c5a6ae3a1a9fa2a059e7c197a5f [31/36] net, tunnels: convert __be16 tunnel flags to bitmaps
config: ia64-randconfig-r013-20220726
compiler: ia64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/alobakin/linux/commit/9f7e5133116c2c5a6ae3a1a9fa2a059e7c197a5f
        git remote add alobakin https://github.com/alobakin/linux
        git fetch --no-tags alobakin ip_tunnel
        git checkout 9f7e5133116c2c5a6ae3a1a9fa2a059e7c197a5f
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash net/core/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   In file included from arch/ia64/include/asm/pgtable.h:153,
                    from include/linux/pgtable.h:6,
                    from include/linux/mm.h:29,
                    from net/core/filter.c:23:
   arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
   arch/ia64/include/asm/mmu_context.h:127:48: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
     127 |         unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
         |                                                ^~~~~~~
   net/core/filter.c: In function '____bpf_skb_set_tunnel_opt':
>> net/core/filter.c:4686:51: warning: passing argument 4 of 'ip_tunnel_info_opts_set' makes integer from pointer without a cast [-Wint-conversion]
    4686 |         ip_tunnel_info_opts_set(info, from, size, present);
         |                                                   ^~~~~~~
         |                                                   |
         |                                                   long unsigned int *
   In file included from include/net/dst_metadata.h:6,
                    from net/core/filter.c:53:
   include/net/ip_tunnels.h:611:51: note: expected '__be16' {aka 'short unsigned int'} but argument is of type 'long unsigned int *'
     611 |                                            __be16 flags)
         |                                            ~~~~~~~^~~~~


vim +/ip_tunnel_info_opts_set +4686 net/core/filter.c

  4672	
  4673	BPF_CALL_3(bpf_skb_set_tunnel_opt, struct sk_buff *, skb,
  4674		   const u8 *, from, u32, size)
  4675	{
  4676		struct ip_tunnel_info *info = skb_tunnel_info(skb);
  4677		const struct metadata_dst *md = this_cpu_ptr(md_dst);
  4678		IP_TUNNEL_DECLARE_FLAGS(present) = { };
  4679	
  4680		if (unlikely(info != &md->u.tun_info || (size & (sizeof(u32) - 1))))
  4681			return -EINVAL;
  4682		if (unlikely(size > IP_TUNNEL_OPTS_MAX))
  4683			return -ENOMEM;
  4684	
  4685		ip_tunnel_set_options_present(present);
> 4686		ip_tunnel_info_opts_set(info, from, size, present);
  4687	
  4688		return 0;
  4689	}
  4690	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (128258 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ