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: <202309251904.eSN2jHxq-lkp@intel.com>
Date: Mon, 25 Sep 2023 19:35:22 +0800
From: kernel test robot <lkp@...el.com>
To: Miquel Raynal <miquel.raynal@...tlin.com>,
	Alexander Aring <alex.aring@...il.com>,
	Stefan Schmidt <stefan@...enfreihafen.org>,
	linux-wpan@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>, Eric Dumazet <edumazet@...gle.com>,
	netdev@...r.kernel.org, David Girault <david.girault@...vo.com>,
	Romuald Despres <romuald.despres@...vo.com>,
	Frederic Blain <frederic.blain@...vo.com>,
	Nicolas Schodet <nico@...fr.eu.org>,
	Guilhem Imberton <guilhem.imberton@...vo.com>,
	Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
	Miquel Raynal <miquel.raynal@...tlin.com>
Subject: Re: [PATCH wpan-next v4 04/11] mac802154: Handle associating

Hi Miquel,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]
[also build test WARNING on net/main linus/master v6.6-rc3 next-20230925]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Miquel-Raynal/ieee802154-Let-PAN-IDs-be-reset/20230923-000250
base:   net-next/main
patch link:    https://lore.kernel.org/r/20230922155029.592018-5-miquel.raynal%40bootlin.com
patch subject: [PATCH wpan-next v4 04/11] mac802154: Handle associating
config: i386-randconfig-061-20230925 (https://download.01.org/0day-ci/archive/20230925/202309251904.eSN2jHxq-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230925/202309251904.eSN2jHxq-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/202309251904.eSN2jHxq-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> net/mac802154/cfg.c:379:39: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted __le16 [usertype] pan_id @@     got int @@
   net/mac802154/cfg.c:379:39: sparse:     expected restricted __le16 [usertype] pan_id
   net/mac802154/cfg.c:379:39: sparse:     got int

vim +379 net/mac802154/cfg.c

   317	
   318	static int mac802154_associate(struct wpan_phy *wpan_phy,
   319				       struct wpan_dev *wpan_dev,
   320				       struct ieee802154_addr *coord)
   321	{
   322		struct ieee802154_local *local = wpan_phy_priv(wpan_phy);
   323		u64 ceaddr = swab64((__force u64)coord->extended_addr);
   324		struct ieee802154_sub_if_data *sdata;
   325		struct ieee802154_pan_device *parent;
   326		__le16 short_addr;
   327		int ret;
   328	
   329		ASSERT_RTNL();
   330	
   331		sdata = IEEE802154_WPAN_DEV_TO_SUB_IF(wpan_dev);
   332	
   333		if (wpan_dev->parent) {
   334			dev_err(&sdata->dev->dev,
   335				"Device %8phC is already associated\n", &ceaddr);
   336			return -EPERM;
   337		}
   338	
   339		if (coord->mode == IEEE802154_SHORT_ADDRESSING)
   340			return -EINVAL;
   341	
   342		parent = kzalloc(sizeof(*parent), GFP_KERNEL);
   343		if (!parent)
   344			return -ENOMEM;
   345	
   346		parent->pan_id = coord->pan_id;
   347		parent->mode = coord->mode;
   348		parent->extended_addr = coord->extended_addr;
   349		parent->short_addr = cpu_to_le16(IEEE802154_ADDR_SHORT_BROADCAST);
   350	
   351		/* Set the PAN ID hardware address filter beforehand to avoid dropping
   352		 * the association response with a destination PAN ID field set to the
   353		 * "new" PAN ID.
   354		 */
   355		if (local->hw.flags & IEEE802154_HW_AFILT) {
   356			ret = drv_set_pan_id(local, coord->pan_id);
   357			if (ret < 0)
   358				goto free_parent;
   359		}
   360	
   361		ret = mac802154_perform_association(sdata, parent, &short_addr);
   362		if (ret)
   363			goto reset_panid;
   364	
   365		if (local->hw.flags & IEEE802154_HW_AFILT) {
   366			ret = drv_set_short_addr(local, short_addr);
   367			if (ret < 0)
   368				goto reset_panid;
   369		}
   370	
   371		wpan_dev->pan_id = coord->pan_id;
   372		wpan_dev->short_addr = short_addr;
   373		wpan_dev->parent = parent;
   374	
   375		return 0;
   376	
   377	reset_panid:
   378		if (local->hw.flags & IEEE802154_HW_AFILT)
 > 379			drv_set_pan_id(local, IEEE802154_PAN_ID_BROADCAST);
   380	
   381	free_parent:
   382		kfree(parent);
   383		return ret;
   384	}
   385	

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