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-next>] [day] [month] [year] [list]
Date:   Sun, 3 Oct 2021 08:48:34 +0800
From:   kernel test robot <lkp@...el.com>
To:     Christophe Leroy <christophe.leroy@...roup.eu>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Michael Ellerman <mpe@...erman.id.au>
Subject: fs/buffer.c:2342:1: warning: the frame size of 2056 bytes is larger
 than 1024 bytes

Hi Christophe,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   02d5e016800d082058b3d3b7c3ede136cdc6ddcb
commit: 4eeef098b43242ed145c83fba9989d586d707589 powerpc/44x: Remove STDBINUTILS kconfig option
date:   8 months ago
config: powerpc64-randconfig-r033-20211003 (attached as .config)
compiler: powerpc-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/torvalds/linux.git/commit/?id=4eeef098b43242ed145c83fba9989d586d707589
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 4eeef098b43242ed145c83fba9989d586d707589
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=powerpc 

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

   fs/buffer.c: In function 'block_read_full_page':
>> fs/buffer.c:2342:1: warning: the frame size of 2056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
    2342 | }
         | ^
--
   In file included from arch/powerpc/include/asm/thread_info.h:13,
                    from include/linux/thread_info.h:56,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/powerpc/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/umh.h:4,
                    from include/linux/kmod.h:9,
                    from include/linux/module.h:16,
                    from drivers/net/vmxnet3/vmxnet3_drv.c:27:
   drivers/net/vmxnet3/vmxnet3_drv.c: In function 'vmxnet3_rq_init':
>> arch/powerpc/include/asm/page.h:24:33: warning: conversion from 'long unsigned int' to 'u16' {aka 'short unsigned int'} changes value from '262144' to '0' [-Woverflow]
      24 | #define PAGE_SIZE               (ASM_CONST(1) << PAGE_SHIFT)
         |                                 ^
   drivers/net/vmxnet3/vmxnet3_drv.c:1784:50: note: in expansion of macro 'PAGE_SIZE'
    1784 |                         rq->buf_info[0][i].len = PAGE_SIZE;
         |                                                  ^~~~~~~~~
>> arch/powerpc/include/asm/page.h:24:33: warning: conversion from 'long unsigned int' to 'u16' {aka 'short unsigned int'} changes value from '262144' to '0' [-Woverflow]
      24 | #define PAGE_SIZE               (ASM_CONST(1) << PAGE_SHIFT)
         |                                 ^
   drivers/net/vmxnet3/vmxnet3_drv.c:1789:42: note: in expansion of macro 'PAGE_SIZE'
    1789 |                 rq->buf_info[1][i].len = PAGE_SIZE;
         |                                          ^~~~~~~~~
--
   drivers/net/ethernet/socionext/netsec.c: In function 'netsec_alloc_rx_data':
>> drivers/net/ethernet/socionext/netsec.c:247:33: warning: conversion from 'long unsigned int' to 'u16' {aka 'short unsigned int'} changes value from '261630' to '65022' [-Woverflow]
     247 | #define NETSEC_RX_BUF_SIZE      (PAGE_SIZE - NETSEC_RX_BUF_NON_DATA)
         |                                 ^
   drivers/net/ethernet/socionext/netsec.c:750:21: note: in expansion of macro 'NETSEC_RX_BUF_SIZE'
     750 |         *desc_len = NETSEC_RX_BUF_SIZE;
         |                     ^~~~~~~~~~~~~~~~~~
--
   fs/ext4/move_extent.c: In function 'mext_page_mkuptodate':
>> fs/ext4/move_extent.c:227:1: warning: the frame size of 2064 bytes is larger than 1024 bytes [-Wframe-larger-than=]
     227 | }
         | ^
--
   fs/fat/dir.c: In function 'fat_add_new_entries':
>> fs/fat/dir.c:1279:1: warning: the frame size of 2096 bytes is larger than 1024 bytes [-Wframe-larger-than=]
    1279 | }
         | ^
   fs/fat/dir.c: In function 'fat_alloc_new_dir':
   fs/fat/dir.c:1195:1: warning: the frame size of 2064 bytes is larger than 1024 bytes [-Wframe-larger-than=]
    1195 | }
         | ^
--
   fs/fat/fatent.c: In function 'fat_free_clusters':
>> fs/fat/fatent.c:632:1: warning: the frame size of 2080 bytes is larger than 1024 bytes [-Wframe-larger-than=]
     632 | }
         | ^
   fs/fat/fatent.c: In function 'fat_alloc_clusters':
   fs/fat/fatent.c:550:1: warning: the frame size of 2128 bytes is larger than 1024 bytes [-Wframe-larger-than=]
     550 | }
         | ^


vim +2342 fs/buffer.c

8ab22b9abb5c55 Hisashi Hifumi     2008-07-28  2251  
^1da177e4c3f41 Linus Torvalds     2005-04-16  2252  /*
^1da177e4c3f41 Linus Torvalds     2005-04-16  2253   * Generic "read page" function for block devices that have the normal
^1da177e4c3f41 Linus Torvalds     2005-04-16  2254   * get_block functionality. This is most of the block device filesystems.
^1da177e4c3f41 Linus Torvalds     2005-04-16  2255   * Reads the page asynchronously --- the unlock_buffer() and
^1da177e4c3f41 Linus Torvalds     2005-04-16  2256   * set/clear_buffer_uptodate() functions propagate buffer state into the
^1da177e4c3f41 Linus Torvalds     2005-04-16  2257   * page struct once IO has completed.
^1da177e4c3f41 Linus Torvalds     2005-04-16  2258   */
^1da177e4c3f41 Linus Torvalds     2005-04-16  2259  int block_read_full_page(struct page *page, get_block_t *get_block)
^1da177e4c3f41 Linus Torvalds     2005-04-16  2260  {
^1da177e4c3f41 Linus Torvalds     2005-04-16  2261  	struct inode *inode = page->mapping->host;
^1da177e4c3f41 Linus Torvalds     2005-04-16  2262  	sector_t iblock, lblock;
^1da177e4c3f41 Linus Torvalds     2005-04-16  2263  	struct buffer_head *bh, *head, *arr[MAX_BUF_PER_PAGE];
45bce8f3e3436b Linus Torvalds     2012-11-29  2264  	unsigned int blocksize, bbits;
^1da177e4c3f41 Linus Torvalds     2005-04-16  2265  	int nr, i;
^1da177e4c3f41 Linus Torvalds     2005-04-16  2266  	int fully_mapped = 1;
^1da177e4c3f41 Linus Torvalds     2005-04-16  2267  
45bce8f3e3436b Linus Torvalds     2012-11-29  2268  	head = create_page_buffers(page, inode, 0);
45bce8f3e3436b Linus Torvalds     2012-11-29  2269  	blocksize = head->b_size;
45bce8f3e3436b Linus Torvalds     2012-11-29  2270  	bbits = block_size_bits(blocksize);
^1da177e4c3f41 Linus Torvalds     2005-04-16  2271  
09cbfeaf1a5a67 Kirill A. Shutemov 2016-04-01  2272  	iblock = (sector_t)page->index << (PAGE_SHIFT - bbits);
45bce8f3e3436b Linus Torvalds     2012-11-29  2273  	lblock = (i_size_read(inode)+blocksize-1) >> bbits;
^1da177e4c3f41 Linus Torvalds     2005-04-16  2274  	bh = head;
^1da177e4c3f41 Linus Torvalds     2005-04-16  2275  	nr = 0;
^1da177e4c3f41 Linus Torvalds     2005-04-16  2276  	i = 0;
^1da177e4c3f41 Linus Torvalds     2005-04-16  2277  
^1da177e4c3f41 Linus Torvalds     2005-04-16  2278  	do {
^1da177e4c3f41 Linus Torvalds     2005-04-16  2279  		if (buffer_uptodate(bh))
^1da177e4c3f41 Linus Torvalds     2005-04-16  2280  			continue;
^1da177e4c3f41 Linus Torvalds     2005-04-16  2281  
^1da177e4c3f41 Linus Torvalds     2005-04-16  2282  		if (!buffer_mapped(bh)) {
c64610ba585fab Andrew Morton      2005-05-16  2283  			int err = 0;
c64610ba585fab Andrew Morton      2005-05-16  2284  
^1da177e4c3f41 Linus Torvalds     2005-04-16  2285  			fully_mapped = 0;
^1da177e4c3f41 Linus Torvalds     2005-04-16  2286  			if (iblock < lblock) {
b0cf2321c65991 Badari Pulavarty   2006-03-26  2287  				WARN_ON(bh->b_size != blocksize);
c64610ba585fab Andrew Morton      2005-05-16  2288  				err = get_block(inode, iblock, bh, 0);
c64610ba585fab Andrew Morton      2005-05-16  2289  				if (err)
^1da177e4c3f41 Linus Torvalds     2005-04-16  2290  					SetPageError(page);
^1da177e4c3f41 Linus Torvalds     2005-04-16  2291  			}
^1da177e4c3f41 Linus Torvalds     2005-04-16  2292  			if (!buffer_mapped(bh)) {
eebd2aa355692a Christoph Lameter  2008-02-04  2293  				zero_user(page, i * blocksize, blocksize);
c64610ba585fab Andrew Morton      2005-05-16  2294  				if (!err)
^1da177e4c3f41 Linus Torvalds     2005-04-16  2295  					set_buffer_uptodate(bh);
^1da177e4c3f41 Linus Torvalds     2005-04-16  2296  				continue;
^1da177e4c3f41 Linus Torvalds     2005-04-16  2297  			}
^1da177e4c3f41 Linus Torvalds     2005-04-16  2298  			/*
^1da177e4c3f41 Linus Torvalds     2005-04-16  2299  			 * get_block() might have updated the buffer
^1da177e4c3f41 Linus Torvalds     2005-04-16  2300  			 * synchronously
^1da177e4c3f41 Linus Torvalds     2005-04-16  2301  			 */
^1da177e4c3f41 Linus Torvalds     2005-04-16  2302  			if (buffer_uptodate(bh))
^1da177e4c3f41 Linus Torvalds     2005-04-16  2303  				continue;
^1da177e4c3f41 Linus Torvalds     2005-04-16  2304  		}
^1da177e4c3f41 Linus Torvalds     2005-04-16  2305  		arr[nr++] = bh;
^1da177e4c3f41 Linus Torvalds     2005-04-16  2306  	} while (i++, iblock++, (bh = bh->b_this_page) != head);
^1da177e4c3f41 Linus Torvalds     2005-04-16  2307  
^1da177e4c3f41 Linus Torvalds     2005-04-16  2308  	if (fully_mapped)
^1da177e4c3f41 Linus Torvalds     2005-04-16  2309  		SetPageMappedToDisk(page);
^1da177e4c3f41 Linus Torvalds     2005-04-16  2310  
^1da177e4c3f41 Linus Torvalds     2005-04-16  2311  	if (!nr) {
^1da177e4c3f41 Linus Torvalds     2005-04-16  2312  		/*
^1da177e4c3f41 Linus Torvalds     2005-04-16  2313  		 * All buffers are uptodate - we can set the page uptodate
^1da177e4c3f41 Linus Torvalds     2005-04-16  2314  		 * as well. But not if get_block() returned an error.
^1da177e4c3f41 Linus Torvalds     2005-04-16  2315  		 */
^1da177e4c3f41 Linus Torvalds     2005-04-16  2316  		if (!PageError(page))
^1da177e4c3f41 Linus Torvalds     2005-04-16  2317  			SetPageUptodate(page);
^1da177e4c3f41 Linus Torvalds     2005-04-16  2318  		unlock_page(page);
^1da177e4c3f41 Linus Torvalds     2005-04-16  2319  		return 0;
^1da177e4c3f41 Linus Torvalds     2005-04-16  2320  	}
^1da177e4c3f41 Linus Torvalds     2005-04-16  2321  
^1da177e4c3f41 Linus Torvalds     2005-04-16  2322  	/* Stage two: lock the buffers */
^1da177e4c3f41 Linus Torvalds     2005-04-16  2323  	for (i = 0; i < nr; i++) {
^1da177e4c3f41 Linus Torvalds     2005-04-16  2324  		bh = arr[i];
^1da177e4c3f41 Linus Torvalds     2005-04-16  2325  		lock_buffer(bh);
^1da177e4c3f41 Linus Torvalds     2005-04-16  2326  		mark_buffer_async_read(bh);
^1da177e4c3f41 Linus Torvalds     2005-04-16  2327  	}
^1da177e4c3f41 Linus Torvalds     2005-04-16  2328  
^1da177e4c3f41 Linus Torvalds     2005-04-16  2329  	/*
^1da177e4c3f41 Linus Torvalds     2005-04-16  2330  	 * Stage 3: start the IO.  Check for uptodateness
^1da177e4c3f41 Linus Torvalds     2005-04-16  2331  	 * inside the buffer lock in case another process reading
^1da177e4c3f41 Linus Torvalds     2005-04-16  2332  	 * the underlying blockdev brought it uptodate (the sct fix).
^1da177e4c3f41 Linus Torvalds     2005-04-16  2333  	 */
^1da177e4c3f41 Linus Torvalds     2005-04-16  2334  	for (i = 0; i < nr; i++) {
^1da177e4c3f41 Linus Torvalds     2005-04-16  2335  		bh = arr[i];
^1da177e4c3f41 Linus Torvalds     2005-04-16  2336  		if (buffer_uptodate(bh))
^1da177e4c3f41 Linus Torvalds     2005-04-16  2337  			end_buffer_async_read(bh, 1);
^1da177e4c3f41 Linus Torvalds     2005-04-16  2338  		else
2a222ca992c35a Mike Christie      2016-06-05  2339  			submit_bh(REQ_OP_READ, 0, bh);
^1da177e4c3f41 Linus Torvalds     2005-04-16  2340  	}
^1da177e4c3f41 Linus Torvalds     2005-04-16  2341  	return 0;
^1da177e4c3f41 Linus Torvalds     2005-04-16 @2342  }
1fe72eaa0f46a0 H Hartley Sweeten  2009-09-22  2343  EXPORT_SYMBOL(block_read_full_page);
^1da177e4c3f41 Linus Torvalds     2005-04-16  2344  

:::::: The code at line 2342 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@...970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@...970.osdl.org>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ