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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202205311853.M58G3t1Z-lkp@intel.com>
Date:   Tue, 31 May 2022 19:00:58 +0800
From:   kernel test robot <lkp@...el.com>
To:     Cong Wang <xiyou.wangcong@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [congwang:sch_bpf 3/5] net/core/skb_map.c:414:21: warning: cast to
 pointer from integer of different size

tree:   https://github.com/congwang/linux.git sch_bpf
head:   88a2f876b0736617600bfaa2301dbfdaaa139ddd
commit: 03e158bc84030847ce9f7bf91b1221079c194f3d [3/5] bpf: introduce skb map
config: i386-randconfig-a003 (https://download.01.org/0day-ci/archive/20220531/202205311853.M58G3t1Z-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/congwang/linux/commit/03e158bc84030847ce9f7bf91b1221079c194f3d
        git remote add congwang https://github.com/congwang/linux.git
        git fetch --no-tags congwang sch_bpf
        git checkout 03e158bc84030847ce9f7bf91b1221079c194f3d
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 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 >>):

   net/core/skb_map.c: In function '____bpf_flow_map_pop':
>> net/core/skb_map.c:414:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     414 |         u64 rank = *(u64 *) key;
         |                     ^
   net/core/skb_map.c: In function '____bpf_flow_map_push':
   net/core/skb_map.c:460:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     460 |         u64 rank = *(u64 *) key;
         |                     ^


vim +414 net/core/skb_map.c

   410	
   411	BPF_CALL_2(bpf_flow_map_pop, struct bpf_map *, map, u64, key)
   412	{
   413		struct bpf_skb_map *rb = bpf_skb_map(map);
 > 414		u64 rank = *(u64 *) key;
   415		struct bpf_map *target;
   416		unsigned long flags;
   417	
   418		raw_spin_lock_irqsave(&rb->lock, flags);
   419		target = map_rb_find(&rb->root, rank);
   420		if (!target) {
   421			raw_spin_unlock_irqrestore(&rb->lock, flags);
   422			return (unsigned long)NULL;
   423		}
   424		rb_erase(&bpf_skb_map(target)->node, &rb->root);
   425		raw_spin_unlock_irqrestore(&rb->lock, flags);
   426		atomic_dec(&rb->count);
   427		return (unsigned long)target;
   428	}
   429	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ