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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 20 May 2020 08:57:33 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Mike Rapoport <rppt@...ux.ibm.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux Memory Management List <linux-mm@...ck.org>
Subject: arch/sparc/mm/srmmu.c:300:9: error: variable 'pud' set but not used

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   642b151f45dd54809ea00ecd3976a56c1ec9b53d
commit: 7235db268a2777bc380b99b7db49ff7b19c8fb76 sparc32: use pgtable-nopud instead of 4level-fixup
config: sparc-defconfig (attached as .config)
compiler: sparc-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 7235db268a2777bc380b99b7db49ff7b19c8fb76
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc

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

All errors (new ones prefixed by >>, old ones prefixed by <<):

arch/sparc/mm/srmmu.c: In function 'srmmu_nocache_init':
>> arch/sparc/mm/srmmu.c:300:9: error: variable 'pud' set but not used [-Werror=unused-but-set-variable]
300 |  pud_t *pud;
|         ^~~
arch/sparc/mm/srmmu.c: In function 'poke_hypersparc':
arch/sparc/mm/srmmu.c:1128:25: error: variable 'clear' set but not used [-Werror=unused-but-set-variable]
1128 |  volatile unsigned long clear;
|                         ^~~~~
cc1: all warnings being treated as errors

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7235db268a2777bc380b99b7db49ff7b19c8fb76
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 7235db268a2777bc380b99b7db49ff7b19c8fb76
vim +/pud +300 arch/sparc/mm/srmmu.c

^1da177e4c3f41 Linus Torvalds  2005-04-16  293  
50215d6511265d Adrian Bunk     2008-06-05  294  static void __init srmmu_nocache_init(void)
^1da177e4c3f41 Linus Torvalds  2005-04-16  295  {
e8c29c839b5c9f Sam Ravnborg    2014-04-21  296  	void *srmmu_nocache_bitmap;
^1da177e4c3f41 Linus Torvalds  2005-04-16  297  	unsigned int bitmap_bits;
^1da177e4c3f41 Linus Torvalds  2005-04-16  298  	pgd_t *pgd;
7235db268a2777 Mike Rapoport   2019-12-04  299  	p4d_t *p4d;
7235db268a2777 Mike Rapoport   2019-12-04 @300  	pud_t *pud;
^1da177e4c3f41 Linus Torvalds  2005-04-16  301  	pmd_t *pmd;
^1da177e4c3f41 Linus Torvalds  2005-04-16  302  	pte_t *pte;
^1da177e4c3f41 Linus Torvalds  2005-04-16  303  	unsigned long paddr, vaddr;
^1da177e4c3f41 Linus Torvalds  2005-04-16  304  	unsigned long pteval;
^1da177e4c3f41 Linus Torvalds  2005-04-16  305  
^1da177e4c3f41 Linus Torvalds  2005-04-16  306  	bitmap_bits = srmmu_nocache_size >> SRMMU_NOCACHE_BITMAP_SHIFT;
^1da177e4c3f41 Linus Torvalds  2005-04-16  307  
9415673e3e19f7 Mike Rapoport   2019-03-11  308  	srmmu_nocache_pool = memblock_alloc(srmmu_nocache_size,
9415673e3e19f7 Mike Rapoport   2019-03-11  309  					    SRMMU_NOCACHE_ALIGN_MAX);
b1e1c869ffd1d8 Mike Rapoport   2019-03-11  310  	if (!srmmu_nocache_pool)
b1e1c869ffd1d8 Mike Rapoport   2019-03-11  311  		panic("%s: Failed to allocate %lu bytes align=0x%x\n",
b1e1c869ffd1d8 Mike Rapoport   2019-03-11  312  		      __func__, srmmu_nocache_size, SRMMU_NOCACHE_ALIGN_MAX);
^1da177e4c3f41 Linus Torvalds  2005-04-16  313  	memset(srmmu_nocache_pool, 0, srmmu_nocache_size);
^1da177e4c3f41 Linus Torvalds  2005-04-16  314  
54df2db36c93bb Akinobu Mita    2013-03-29  315  	srmmu_nocache_bitmap =
9415673e3e19f7 Mike Rapoport   2019-03-11  316  		memblock_alloc(BITS_TO_LONGS(bitmap_bits) * sizeof(long),
9415673e3e19f7 Mike Rapoport   2019-03-11  317  			       SMP_CACHE_BYTES);
b1e1c869ffd1d8 Mike Rapoport   2019-03-11  318  	if (!srmmu_nocache_bitmap)
b1e1c869ffd1d8 Mike Rapoport   2019-03-11  319  		panic("%s: Failed to allocate %zu bytes\n", __func__,
b1e1c869ffd1d8 Mike Rapoport   2019-03-11  320  		      BITS_TO_LONGS(bitmap_bits) * sizeof(long));
^1da177e4c3f41 Linus Torvalds  2005-04-16  321  	bit_map_init(&srmmu_nocache_map, srmmu_nocache_bitmap, bitmap_bits);
^1da177e4c3f41 Linus Torvalds  2005-04-16  322  
f71a2aacc63e31 Sam Ravnborg    2012-07-26  323  	srmmu_swapper_pg_dir = __srmmu_get_nocache(SRMMU_PGD_TABLE_SIZE, SRMMU_PGD_TABLE_SIZE);
^1da177e4c3f41 Linus Torvalds  2005-04-16  324  	memset(__nocache_fix(srmmu_swapper_pg_dir), 0, SRMMU_PGD_TABLE_SIZE);
^1da177e4c3f41 Linus Torvalds  2005-04-16  325  	init_mm.pgd = srmmu_swapper_pg_dir;
^1da177e4c3f41 Linus Torvalds  2005-04-16  326  
^1da177e4c3f41 Linus Torvalds  2005-04-16  327  	srmmu_early_allocate_ptable_skeleton(SRMMU_NOCACHE_VADDR, srmmu_nocache_end);
^1da177e4c3f41 Linus Torvalds  2005-04-16  328  
^1da177e4c3f41 Linus Torvalds  2005-04-16  329  	paddr = __pa((unsigned long)srmmu_nocache_pool);
^1da177e4c3f41 Linus Torvalds  2005-04-16  330  	vaddr = SRMMU_NOCACHE_VADDR;
^1da177e4c3f41 Linus Torvalds  2005-04-16  331  
^1da177e4c3f41 Linus Torvalds  2005-04-16  332  	while (vaddr < srmmu_nocache_end) {
^1da177e4c3f41 Linus Torvalds  2005-04-16  333  		pgd = pgd_offset_k(vaddr);
7235db268a2777 Mike Rapoport   2019-12-04  334  		p4d = p4d_offset(__nocache_fix(pgd), vaddr);
7235db268a2777 Mike Rapoport   2019-12-04  335  		pud = pud_offset(__nocache_fix(p4d), vaddr);
9701b264d3267b Sam Ravnborg    2012-05-13  336  		pmd = pmd_offset(__nocache_fix(pgd), vaddr);
9701b264d3267b Sam Ravnborg    2012-05-13  337  		pte = pte_offset_kernel(__nocache_fix(pmd), vaddr);
^1da177e4c3f41 Linus Torvalds  2005-04-16  338  
^1da177e4c3f41 Linus Torvalds  2005-04-16  339  		pteval = ((paddr >> 4) | SRMMU_ET_PTE | SRMMU_PRIV);
^1da177e4c3f41 Linus Torvalds  2005-04-16  340  
^1da177e4c3f41 Linus Torvalds  2005-04-16  341  		if (srmmu_cache_pagetables)
^1da177e4c3f41 Linus Torvalds  2005-04-16  342  			pteval |= SRMMU_CACHE;
^1da177e4c3f41 Linus Torvalds  2005-04-16  343  
62875cff73fbb7 David S. Miller 2012-05-12  344  		set_pte(__nocache_fix(pte), __pte(pteval));
^1da177e4c3f41 Linus Torvalds  2005-04-16  345  
^1da177e4c3f41 Linus Torvalds  2005-04-16  346  		vaddr += PAGE_SIZE;
^1da177e4c3f41 Linus Torvalds  2005-04-16  347  		paddr += PAGE_SIZE;
^1da177e4c3f41 Linus Torvalds  2005-04-16  348  	}
^1da177e4c3f41 Linus Torvalds  2005-04-16  349  
^1da177e4c3f41 Linus Torvalds  2005-04-16  350  	flush_cache_all();
^1da177e4c3f41 Linus Torvalds  2005-04-16  351  	flush_tlb_all();
^1da177e4c3f41 Linus Torvalds  2005-04-16  352  }
^1da177e4c3f41 Linus Torvalds  2005-04-16  353  

---
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" (12853 bytes)

Powered by blists - more mailing lists