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: <202512150115.bjHX4WCe-lkp@intel.com>
Date: Mon, 15 Dec 2025 01:49:07 +0800
From: kernel test robot <lkp@...el.com>
To: "Liam R. Howlett" <Liam.Howlett@...cle.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Vlastimil Babka <vbabka@...e.cz>,
	Suren Baghdasaryan <surenb@...gle.com>
Subject: lib/maple_tree.c:6261:30: sparse: sparse: incorrect type in
 assignment (different address spaces)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8f0b4cce4481fb22653697cced8d0d04027cb1e8
commit: 719a42e563bb087758500e43e67a57b27f303c4c maple_tree: Convert forking to use the sheaf interface
date:   3 months ago
config: arc-randconfig-r132-20251214 (https://download.01.org/0day-ci/archive/20251215/202512150115.bjHX4WCe-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 9.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251215/202512150115.bjHX4WCe-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/202512150115.bjHX4WCe-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> lib/maple_tree.c:6261:30: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] __rcu * @@     got struct maple_node * @@
   lib/maple_tree.c:6261:30: sparse:     expected void [noderef] __rcu *
   lib/maple_tree.c:6261:30: sparse:     got struct maple_node *
>> lib/maple_tree.c:6261:30: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] __rcu * @@     got struct maple_node * @@
   lib/maple_tree.c:6261:30: sparse:     expected void [noderef] __rcu *
   lib/maple_tree.c:6261:30: sparse:     got struct maple_node *

vim +6261 lib/maple_tree.c

  6228	
  6229	/*
  6230	 * mas_dup_alloc() - Allocate child nodes for a maple node.
  6231	 * @mas: The maple state of source tree.
  6232	 * @new_mas: The maple state of new tree.
  6233	 * @gfp: The GFP_FLAGS to use for allocations.
  6234	 *
  6235	 * This function allocates child nodes for @new_mas->node during the duplication
  6236	 * process. If memory allocation fails, @mas is set to -ENOMEM.
  6237	 */
  6238	static inline void mas_dup_alloc(struct ma_state *mas, struct ma_state *new_mas,
  6239			gfp_t gfp)
  6240	{
  6241		struct maple_node *node = mte_to_node(mas->node);
  6242		struct maple_node *new_node = mte_to_node(new_mas->node);
  6243		enum maple_type type;
  6244		unsigned char count, i;
  6245		void __rcu **slots;
  6246		void __rcu **new_slots;
  6247		unsigned long val;
  6248	
  6249		/* Allocate memory for child nodes. */
  6250		type = mte_node_type(mas->node);
  6251		new_slots = ma_slots(new_node, type);
  6252		count = mas->node_request = mas_data_end(mas) + 1;
  6253		mas_alloc_nodes(mas, gfp);
  6254		if (unlikely(mas_is_err(mas)))
  6255			return;
  6256	
  6257		slots = ma_slots(node, type);
  6258		for (i = 0; i < count; i++) {
  6259			val = (unsigned long)mt_slot_locked(mas->tree, slots, i);
  6260			val &= MAPLE_NODE_MASK;
> 6261			new_slots[i] = ma_mnode_ptr((unsigned long)mas_pop_node(mas) |
  6262						    val);
  6263		}
  6264	}
  6265	

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