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: <202111262010.UBcefCrE-lkp@intel.com>
Date:   Fri, 26 Nov 2021 20:39:03 +0800
From:   kernel test robot <lkp@...el.com>
To:     Axel Rasmussen <axelrasmussen@...gle.com>
Cc:     llvm@...ts.linux.dev, 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: mm/khugepaged.c:2181:13: warning: stack frame size (3808) exceeds
 limit (2048) in 'khugepaged_do_scan'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   a4849f6000e29235a2707f22e39da6b897bb9543
commit: 2b5067a8143e34aa3fa57a20fb8a3c40d905f942 mm: mmap_lock: add tracepoints around lock acquisition
date:   12 months ago
config: mips-randconfig-r013-20211124 (https://download.01.org/0day-ci/archive/20211126/202111262010.UBcefCrE-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 67a1c45def8a75061203461ab0060c75c864df1c)
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
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2b5067a8143e34aa3fa57a20fb8a3c40d905f942
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 2b5067a8143e34aa3fa57a20fb8a3c40d905f942
        # save the config file to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=mips 

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

All warnings (new ones prefixed by >>):

>> mm/khugepaged.c:2181:13: warning: stack frame size (3808) exceeds limit (2048) in 'khugepaged_do_scan' [-Wframe-larger-than]
   static void khugepaged_do_scan(void)
               ^
   1 warning generated.
   Assembler messages:
   Warning: a different -march was already specified, is now octeon


vim +/khugepaged_do_scan +2181 mm/khugepaged.c

b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2180  
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 @2181  static void khugepaged_do_scan(void)
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2182  {
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2183  	struct page *hpage = NULL;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2184  	unsigned int progress = 0, pass_through_head = 0;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2185  	unsigned int pages = khugepaged_pages_to_scan;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2186  	bool wait = true;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2187  
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2188  	barrier(); /* write khugepaged_pages_to_scan to local stack */
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2189  
a980df33e9351e Kirill A. Shutemov 2020-06-03  2190  	lru_add_drain_all();
a980df33e9351e Kirill A. Shutemov 2020-06-03  2191  
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2192  	while (progress < pages) {
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2193  		if (!khugepaged_prealloc_page(&hpage, &wait))
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2194  			break;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2195  
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2196  		cond_resched();
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2197  
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2198  		if (unlikely(kthread_should_stop() || try_to_freeze()))
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2199  			break;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2200  
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2201  		spin_lock(&khugepaged_mm_lock);
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2202  		if (!khugepaged_scan.mm_slot)
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2203  			pass_through_head++;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2204  		if (khugepaged_has_work() &&
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2205  		    pass_through_head < 2)
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2206  			progress += khugepaged_scan_mm_slot(pages - progress,
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2207  							    &hpage);
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2208  		else
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2209  			progress = pages;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2210  		spin_unlock(&khugepaged_mm_lock);
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2211  	}
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2212  
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2213  	if (!IS_ERR_OR_NULL(hpage))
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2214  		put_page(hpage);
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2215  }
b46e756f5e4703 Kirill A. Shutemov 2016-07-26  2216  

:::::: The code at line 2181 was first introduced by commit
:::::: b46e756f5e47031c67658ff036e5ffe27062fa43 thp: extract khugepaged from mm/huge_memory.c

:::::: TO: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
:::::: CC: Linus Torvalds <torvalds@...ux-foundation.org>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ