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] [day] [month] [year] [list]
Message-ID: <202507161722.3vSVtA6S-lkp@intel.com>
Date: Wed, 16 Jul 2025 17:17:12 +0800
From: kernel test robot <lkp@...el.com>
To: David Wilder <wilder@...ibm.com>, netdev@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, jv@...sburgh.net, wilder@...ibm.com,
	pradeeps@...ux.vnet.ibm.com, pradeep@...ibm.com, i.maximets@....org,
	amorenoz@...hat.com, haliu@...hat.com
Subject: Re: [PATCH net-next v5 6/7] bonding: Update for extended
 arp_ip_target format.

Hi David,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/David-Wilder/bonding-Adding-struct-bond_arp_target/20250715-065747
base:   net-next/main
patch link:    https://lore.kernel.org/r/20250714225533.1490032-7-wilder%40us.ibm.com
patch subject: [PATCH net-next v5 6/7] bonding: Update for extended arp_ip_target format.
config: i386-randconfig-063-20250716 (https://download.01.org/0day-ci/archive/20250716/202507161722.3vSVtA6S-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250716/202507161722.3vSVtA6S-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/202507161722.3vSVtA6S-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/net/bonding/bond_netlink.c:712:35: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] addr @@     got restricted __be32 [usertype] target_ip @@
   drivers/net/bonding/bond_netlink.c:712:35: sparse:     expected unsigned int [usertype] addr
   drivers/net/bonding/bond_netlink.c:712:35: sparse:     got restricted __be32 [usertype] target_ip

vim +712 drivers/net/bonding/bond_netlink.c

   660	
   661	static int bond_fill_info(struct sk_buff *skb,
   662				  const struct net_device *bond_dev)
   663	{
   664		struct bonding *bond = netdev_priv(bond_dev);
   665		unsigned int packets_per_slave;
   666		int ifindex, i, targets_added;
   667		struct nlattr *targets;
   668		struct slave *primary;
   669	
   670		if (nla_put_u8(skb, IFLA_BOND_MODE, BOND_MODE(bond)))
   671			goto nla_put_failure;
   672	
   673		ifindex = bond_option_active_slave_get_ifindex(bond);
   674		if (ifindex && nla_put_u32(skb, IFLA_BOND_ACTIVE_SLAVE, ifindex))
   675			goto nla_put_failure;
   676	
   677		if (nla_put_u32(skb, IFLA_BOND_MIIMON, bond->params.miimon))
   678			goto nla_put_failure;
   679	
   680		if (nla_put_u32(skb, IFLA_BOND_UPDELAY,
   681				bond->params.updelay * bond->params.miimon))
   682			goto nla_put_failure;
   683	
   684		if (nla_put_u32(skb, IFLA_BOND_DOWNDELAY,
   685				bond->params.downdelay * bond->params.miimon))
   686			goto nla_put_failure;
   687	
   688		if (nla_put_u32(skb, IFLA_BOND_PEER_NOTIF_DELAY,
   689				bond->params.peer_notif_delay * bond->params.miimon))
   690			goto nla_put_failure;
   691	
   692		if (nla_put_u8(skb, IFLA_BOND_USE_CARRIER, bond->params.use_carrier))
   693			goto nla_put_failure;
   694	
   695		if (nla_put_u32(skb, IFLA_BOND_ARP_INTERVAL, bond->params.arp_interval))
   696			goto nla_put_failure;
   697	
   698		targets = nla_nest_start_noflag(skb, IFLA_BOND_ARP_IP_TARGET);
   699		if (!targets)
   700			goto nla_put_failure;
   701	
   702		targets_added = 0;
   703		for (i = 0; i < BOND_MAX_ARP_TARGETS; i++) {
   704			struct bond_arp_target *target = &bond->params.arp_targets[i];
   705			struct Data {
   706				__u32 addr;
   707				struct bond_vlan_tag vlans[BOND_MAX_VLAN_TAGS + 1];
   708			} data;
   709			int size = 0;
   710	
   711			if (target->target_ip) {
 > 712				data.addr = target->target_ip;
   713				size = sizeof(target->target_ip);
   714			}
   715	
   716			for (int level = 0; target->flags & BOND_TARGET_USERTAGS && target->tags; level++) {
   717				if (level > BOND_MAX_VLAN_TAGS)
   718					goto nla_put_failure;
   719	
   720				memcpy(&data.vlans[level], &target->tags[level],
   721				       sizeof(struct bond_vlan_tag));
   722				size = size + sizeof(struct bond_vlan_tag);
   723	
   724				if (target->tags[level].vlan_proto == BOND_VLAN_PROTO_NONE)
   725					break;
   726			}
   727	
   728			if (size) {
   729				if (nla_put(skb, i, size, &data))
   730					goto nla_put_failure;
   731				targets_added = 1;
   732			}
   733		}
   734	
   735		if (targets_added)
   736			nla_nest_end(skb, targets);
   737		else
   738			nla_nest_cancel(skb, targets);
   739	
   740		if (nla_put_u32(skb, IFLA_BOND_ARP_VALIDATE, bond->params.arp_validate))
   741			goto nla_put_failure;
   742	
   743		if (nla_put_u32(skb, IFLA_BOND_ARP_ALL_TARGETS,
   744				bond->params.arp_all_targets))
   745			goto nla_put_failure;
   746	

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