[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202210051742.p1o10Y5y-lkp@intel.com>
Date: Wed, 5 Oct 2022 17:11:29 +0800
From: kernel test robot <lkp@...el.com>
To: Eric Biggers <ebiggers@...gle.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [ebiggers:wip-fsverity 6/8] fs/buffer.c:2280:5: warning: stack frame
size (2128) exceeds limit (1024) in '__block_read_full_folio'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git wip-fsverity
head: 06702850f2f281bdd6165c4783a0a15685efbcfd
commit: dbcfaa162251f84f78105036633f71e91dc3bb8b [6/8] fs/buffer.c: introduce __block_read_full_folio() for ext4
config: hexagon-randconfig-r041-20221003
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
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/ebiggers/linux.git/commit/?id=dbcfaa162251f84f78105036633f71e91dc3bb8b
git remote add ebiggers https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git
git fetch --no-tags ebiggers wip-fsverity
git checkout dbcfaa162251f84f78105036633f71e91dc3bb8b
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> fs/buffer.c:2280:5: warning: stack frame size (2128) exceeds limit (1024) in '__block_read_full_folio' [-Wframe-larger-than]
int __block_read_full_folio(struct folio *folio, loff_t limit,
^
1 warning generated.
vim +/__block_read_full_folio +2280 fs/buffer.c
2279
> 2280 int __block_read_full_folio(struct folio *folio, loff_t limit,
2281 get_block_t *get_block)
2282 {
2283 struct inode *inode = folio->mapping->host;
2284 sector_t iblock, lblock;
2285 struct buffer_head *bh, *head, *arr[MAX_BUF_PER_PAGE];
2286 unsigned int blocksize, bbits;
2287 int nr, i;
2288 int fully_mapped = 1;
2289 bool page_error = false;
2290
2291 VM_BUG_ON_FOLIO(folio_test_large(folio), folio);
2292
2293 head = create_page_buffers(&folio->page, inode, 0);
2294 blocksize = head->b_size;
2295 bbits = block_size_bits(blocksize);
2296
2297 iblock = (sector_t)folio->index << (PAGE_SHIFT - bbits);
2298 lblock = (limit+blocksize-1) >> bbits;
2299 bh = head;
2300 nr = 0;
2301 i = 0;
2302
2303 do {
2304 if (buffer_uptodate(bh))
2305 continue;
2306
2307 if (!buffer_mapped(bh)) {
2308 int err = 0;
2309
2310 fully_mapped = 0;
2311 if (iblock < lblock) {
2312 WARN_ON(bh->b_size != blocksize);
2313 err = get_block(inode, iblock, bh, 0);
2314 if (err) {
2315 folio_set_error(folio);
2316 page_error = true;
2317 }
2318 }
2319 if (!buffer_mapped(bh)) {
2320 folio_zero_range(folio, i * blocksize,
2321 blocksize);
2322 if (!err)
2323 set_buffer_uptodate(bh);
2324 continue;
2325 }
2326 /*
2327 * get_block() might have updated the buffer
2328 * synchronously
2329 */
2330 if (buffer_uptodate(bh))
2331 continue;
2332 }
2333 arr[nr++] = bh;
2334 } while (i++, iblock++, (bh = bh->b_this_page) != head);
2335
2336 if (fully_mapped)
2337 folio_set_mappedtodisk(folio);
2338
2339 if (!nr) {
2340 /*
2341 * All buffers are uptodate - we can set the folio uptodate
2342 * as well. But not if get_block() returned an error.
2343 */
2344 if (!page_error)
2345 folio_mark_uptodate(folio);
2346 folio_unlock(folio);
2347 return 0;
2348 }
2349
2350 /* Stage two: lock the buffers */
2351 for (i = 0; i < nr; i++) {
2352 bh = arr[i];
2353 lock_buffer(bh);
2354 mark_buffer_async_read(bh);
2355 }
2356
2357 /*
2358 * Stage 3: start the IO. Check for uptodateness
2359 * inside the buffer lock in case another process reading
2360 * the underlying blockdev brought it uptodate (the sct fix).
2361 */
2362 for (i = 0; i < nr; i++) {
2363 bh = arr[i];
2364 if (buffer_uptodate(bh))
2365 end_buffer_async_read(bh, 1);
2366 else
2367 submit_bh(REQ_OP_READ, bh);
2368 }
2369 return 0;
2370 }
2371 EXPORT_SYMBOL(__block_read_full_folio);
2372
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (112820 bytes)
Powered by blists - more mailing lists