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: <202111070918.sn3oMhm2-lkp@intel.com>
Date:   Sun, 7 Nov 2021 09:30:30 +0800
From:   kernel test robot <lkp@...el.com>
To:     Vlastimil Babka <vbabka@...e.cz>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [vbabka:slab-struct_slab-v1r8 33/33] mm/slub.c:5274:49: error:
 'struct slab' has no member named 'slabs'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/linux.git slab-struct_slab-v1r8
head:   1992ba7f38390cfa8290baf300243b7cf3bb6b44
commit: 1992ba7f38390cfa8290baf300243b7cf3bb6b44 [33/33] mm/sl*b: Differentiate struct slab fields by sl*b implementations
config: nds32-defconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/vbabka/linux.git/commit/?id=1992ba7f38390cfa8290baf300243b7cf3bb6b44
        git remote add vbabka https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/linux.git
        git fetch --no-tags vbabka slab-struct_slab-v1r8
        git checkout 1992ba7f38390cfa8290baf300243b7cf3bb6b44
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nds32 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   mm/slub.c: In function 'show_slab_objects':
>> mm/slub.c:5274:49: error: 'struct slab' has no member named 'slabs'
    5274 |                                         x = slab->slabs;
         |                                                 ^~
   mm/slub.c: In function 'slabs_cpu_partial_show':
   mm/slub.c:5481:38: error: 'struct slab' has no member named 'slabs'
    5481 |                         slabs += slab->slabs;
         |                                      ^~
>> mm/slub.c:5482:42: error: 'struct slab' has no member named 'pobjects'; did you mean 'objects'?
    5482 |                         objects += slab->pobjects;
         |                                          ^~~~~~~~
         |                                          objects


vim +5274 mm/slub.c

81819f0fc8285a Christoph Lameter 2007-05-06  5230  
62e5c4b4d63517 Cyrill Gorcunov   2008-03-02  5231  static ssize_t show_slab_objects(struct kmem_cache *s,
81819f0fc8285a Christoph Lameter 2007-05-06  5232  				 char *buf, unsigned long flags)
81819f0fc8285a Christoph Lameter 2007-05-06  5233  {
81819f0fc8285a Christoph Lameter 2007-05-06  5234  	unsigned long total = 0;
81819f0fc8285a Christoph Lameter 2007-05-06  5235  	int node;
81819f0fc8285a Christoph Lameter 2007-05-06  5236  	int x;
81819f0fc8285a Christoph Lameter 2007-05-06  5237  	unsigned long *nodes;
bf16d19aabd8f5 Joe Perches       2020-12-14  5238  	int len = 0;
81819f0fc8285a Christoph Lameter 2007-05-06  5239  
6396bb221514d2 Kees Cook         2018-06-12  5240  	nodes = kcalloc(nr_node_ids, sizeof(unsigned long), GFP_KERNEL);
62e5c4b4d63517 Cyrill Gorcunov   2008-03-02  5241  	if (!nodes)
62e5c4b4d63517 Cyrill Gorcunov   2008-03-02  5242  		return -ENOMEM;
81819f0fc8285a Christoph Lameter 2007-05-06  5243  
205ab99dd103e3 Christoph Lameter 2008-04-14  5244  	if (flags & SO_CPU) {
205ab99dd103e3 Christoph Lameter 2008-04-14  5245  		int cpu;
205ab99dd103e3 Christoph Lameter 2008-04-14  5246  
81819f0fc8285a Christoph Lameter 2007-05-06  5247  		for_each_possible_cpu(cpu) {
d0e0ac9772f8ec Chen Gang         2013-07-15  5248  			struct kmem_cache_cpu *c = per_cpu_ptr(s->cpu_slab,
d0e0ac9772f8ec Chen Gang         2013-07-15  5249  							       cpu);
ec3ab083a7a004 Christoph Lameter 2012-05-09  5250  			int node;
184d9494c1a4f5 Vlastimil Babka   2021-11-03  5251  			struct slab *slab;slab = READ_ONCE(c->slab);
184d9494c1a4f5 Vlastimil Babka   2021-11-03  5252  			if (!slab)
ec3ab083a7a004 Christoph Lameter 2012-05-09  5253  				continue;
ec3ab083a7a004 Christoph Lameter 2012-05-09  5254  
184d9494c1a4f5 Vlastimil Babka   2021-11-03  5255  			node = slab_nid(slab);
205ab99dd103e3 Christoph Lameter 2008-04-14  5256  			if (flags & SO_TOTAL)
184d9494c1a4f5 Vlastimil Babka   2021-11-03  5257  				x = slab->objects;
205ab99dd103e3 Christoph Lameter 2008-04-14  5258  			else if (flags & SO_OBJECTS)
184d9494c1a4f5 Vlastimil Babka   2021-11-03  5259  				x = slab->inuse;
81819f0fc8285a Christoph Lameter 2007-05-06  5260  			else
81819f0fc8285a Christoph Lameter 2007-05-06  5261  				x = 1;
205ab99dd103e3 Christoph Lameter 2008-04-14  5262  
81819f0fc8285a Christoph Lameter 2007-05-06  5263  			total += x;
bc6697d8a506de Eric Dumazet      2011-11-22  5264  			nodes[node] += x;
49e2258586b423 Christoph Lameter 2011-08-09  5265  
184d9494c1a4f5 Vlastimil Babka   2021-11-03  5266  			slab = slub_percpu_partial_read_once(c);
184d9494c1a4f5 Vlastimil Babka   2021-11-03  5267  			if (slab) {
184d9494c1a4f5 Vlastimil Babka   2021-11-03  5268  				node = slab_nid(slab);
8afb1474db4701 Li Zefan          2013-09-10  5269  				if (flags & SO_TOTAL)
8afb1474db4701 Li Zefan          2013-09-10  5270  					WARN_ON_ONCE(1);
8afb1474db4701 Li Zefan          2013-09-10  5271  				else if (flags & SO_OBJECTS)
8afb1474db4701 Li Zefan          2013-09-10  5272  					WARN_ON_ONCE(1);
8afb1474db4701 Li Zefan          2013-09-10  5273  				else
184d9494c1a4f5 Vlastimil Babka   2021-11-03 @5274  					x = slab->slabs;
49e2258586b423 Christoph Lameter 2011-08-09  5275  				total += x;
bc6697d8a506de Eric Dumazet      2011-11-22  5276  				nodes[node] += x;
49e2258586b423 Christoph Lameter 2011-08-09  5277  			}
81819f0fc8285a Christoph Lameter 2007-05-06  5278  		}
81819f0fc8285a Christoph Lameter 2007-05-06  5279  	}
81819f0fc8285a Christoph Lameter 2007-05-06  5280  
e4f8e513c3d353 Qian Cai          2019-10-14  5281  	/*
e4f8e513c3d353 Qian Cai          2019-10-14  5282  	 * It is impossible to take "mem_hotplug_lock" here with "kernfs_mutex"
e4f8e513c3d353 Qian Cai          2019-10-14  5283  	 * already held which will conflict with an existing lock order:
e4f8e513c3d353 Qian Cai          2019-10-14  5284  	 *
e4f8e513c3d353 Qian Cai          2019-10-14  5285  	 * mem_hotplug_lock->slab_mutex->kernfs_mutex
e4f8e513c3d353 Qian Cai          2019-10-14  5286  	 *
e4f8e513c3d353 Qian Cai          2019-10-14  5287  	 * We don't really need mem_hotplug_lock (to hold off
e4f8e513c3d353 Qian Cai          2019-10-14  5288  	 * slab_mem_going_offline_callback) here because slab's memory hot
e4f8e513c3d353 Qian Cai          2019-10-14  5289  	 * unplug code doesn't destroy the kmem_cache->node[] data.
e4f8e513c3d353 Qian Cai          2019-10-14  5290  	 */
e4f8e513c3d353 Qian Cai          2019-10-14  5291  

:::::: The code at line 5274 was first introduced by commit
:::::: 184d9494c1a4f53fc10a008317b03911a85597c3 mm/slub: mass conversion of struct page to struct slab by spatch

:::::: TO: Vlastimil Babka <vbabka@...e.cz>
:::::: CC: Vlastimil Babka <vbabka@...e.cz>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (11032 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ