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]
Date:   Sun, 14 Nov 2021 11:13:01 +0800
From:   kernel test robot <lkp@...el.com>
To:     Walter Wu <walter-zh.wu@...iatek.com>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org,
        Nathan Chancellor <natechancellor@...il.com>,
        Andrey Konovalov <andreyknvl@...gle.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux Memory Management List <linux-mm@...ck.org>
Subject: lib/bitfield_kunit.c:60:20: warning: stack frame size (11256)
 exceeds limit (8192) in 'test_bitfields_constants'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   ccfff0a2bd2a30de130b5623d242ddecd0272bc2
commit: 02c587733c8161355a43e6e110c2e29bd0acff72 kasan: remove redundant config option
date:   7 months ago
config: x86_64-randconfig-r035-20211114 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
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=02c587733c8161355a43e6e110c2e29bd0acff72
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 02c587733c8161355a43e6e110c2e29bd0acff72
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 

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

>> lib/bitfield_kunit.c:60:20: warning: stack frame size (11256) exceeds limit (8192) in 'test_bitfields_constants' [-Wframe-larger-than]
   static void __init test_bitfields_constants(struct kunit *context)
                      ^
   1 warning generated.


vim +/test_bitfields_constants +60 lib/bitfield_kunit.c

0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  10  
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  11  #define CHECK_ENC_GET_U(tp, v, field, res) do {				\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  12  		{							\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  13  			u##tp _res;					\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  14  									\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  15  			_res = u##tp##_encode_bits(v, field);		\
d2585f5164c298a lib/bitfield_kunit.c Vitor Massaru Iha 2020-07-29  16  			KUNIT_ASSERT_FALSE_MSG(context, _res != res,	\
d2585f5164c298a lib/bitfield_kunit.c Vitor Massaru Iha 2020-07-29  17  				       "u" #tp "_encode_bits(" #v ", " #field ") is 0x%llx != " #res "\n",	\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  18  				       (u64)_res);			\
d2585f5164c298a lib/bitfield_kunit.c Vitor Massaru Iha 2020-07-29  19  			KUNIT_ASSERT_FALSE(context,			\
d2585f5164c298a lib/bitfield_kunit.c Vitor Massaru Iha 2020-07-29  20  				   u##tp##_get_bits(_res, field) != v);	\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  21  		}							\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  22  	} while (0)
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  23  
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  24  #define CHECK_ENC_GET_LE(tp, v, field, res) do {			\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  25  		{							\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  26  			__le##tp _res;					\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  27  									\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  28  			_res = le##tp##_encode_bits(v, field);		\
d2585f5164c298a lib/bitfield_kunit.c Vitor Massaru Iha 2020-07-29  29  			KUNIT_ASSERT_FALSE_MSG(context,			\
d2585f5164c298a lib/bitfield_kunit.c Vitor Massaru Iha 2020-07-29  30  				       _res != cpu_to_le##tp(res),	\
d2585f5164c298a lib/bitfield_kunit.c Vitor Massaru Iha 2020-07-29  31  				       "le" #tp "_encode_bits(" #v ", " #field ") is 0x%llx != 0x%llx",\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  32  				       (u64)le##tp##_to_cpu(_res),	\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  33  				       (u64)(res));			\
d2585f5164c298a lib/bitfield_kunit.c Vitor Massaru Iha 2020-07-29  34  			KUNIT_ASSERT_FALSE(context,			\
d2585f5164c298a lib/bitfield_kunit.c Vitor Massaru Iha 2020-07-29  35  				   le##tp##_get_bits(_res, field) != v);\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  36  		}							\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  37  	} while (0)
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  38  
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  39  #define CHECK_ENC_GET_BE(tp, v, field, res) do {			\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  40  		{							\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  41  			__be##tp _res;					\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  42  									\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  43  			_res = be##tp##_encode_bits(v, field);		\
d2585f5164c298a lib/bitfield_kunit.c Vitor Massaru Iha 2020-07-29  44  			KUNIT_ASSERT_FALSE_MSG(context,			\
d2585f5164c298a lib/bitfield_kunit.c Vitor Massaru Iha 2020-07-29  45  				       _res != cpu_to_be##tp(res),	\
d2585f5164c298a lib/bitfield_kunit.c Vitor Massaru Iha 2020-07-29  46  				       "be" #tp "_encode_bits(" #v ", " #field ") is 0x%llx != 0x%llx",	\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  47  				       (u64)be##tp##_to_cpu(_res),	\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  48  				       (u64)(res));			\
d2585f5164c298a lib/bitfield_kunit.c Vitor Massaru Iha 2020-07-29  49  			KUNIT_ASSERT_FALSE(context,			\
d2585f5164c298a lib/bitfield_kunit.c Vitor Massaru Iha 2020-07-29  50  				   be##tp##_get_bits(_res, field) != v);\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  51  		}							\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  52  	} while (0)
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  53  
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  54  #define CHECK_ENC_GET(tp, v, field, res) do {				\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  55  		CHECK_ENC_GET_U(tp, v, field, res);			\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  56  		CHECK_ENC_GET_LE(tp, v, field, res);			\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  57  		CHECK_ENC_GET_BE(tp, v, field, res);			\
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  58  	} while (0)
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  59  
d2585f5164c298a lib/bitfield_kunit.c Vitor Massaru Iha 2020-07-29 @60  static void __init test_bitfields_constants(struct kunit *context)
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  61  {
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  62  	/*
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  63  	 * NOTE
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  64  	 * This whole function compiles (or at least should, if everything
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  65  	 * is going according to plan) to nothing after optimisation.
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  66  	 */
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  67  
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  68  	CHECK_ENC_GET(16,  1, 0x000f, 0x0001);
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  69  	CHECK_ENC_GET(16,  3, 0x00f0, 0x0030);
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  70  	CHECK_ENC_GET(16,  5, 0x0f00, 0x0500);
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  71  	CHECK_ENC_GET(16,  7, 0xf000, 0x7000);
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  72  	CHECK_ENC_GET(16, 14, 0x000f, 0x000e);
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  73  	CHECK_ENC_GET(16, 15, 0x00f0, 0x00f0);
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  74  
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  75  	CHECK_ENC_GET_U(8,  1, 0x0f, 0x01);
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  76  	CHECK_ENC_GET_U(8,  3, 0xf0, 0x30);
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  77  	CHECK_ENC_GET_U(8, 14, 0x0f, 0x0e);
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  78  	CHECK_ENC_GET_U(8, 15, 0xf0, 0xf0);
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  79  
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  80  	CHECK_ENC_GET(32,  1, 0x00000f00, 0x00000100);
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  81  	CHECK_ENC_GET(32,  3, 0x0000f000, 0x00003000);
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  82  	CHECK_ENC_GET(32,  5, 0x000f0000, 0x00050000);
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  83  	CHECK_ENC_GET(32,  7, 0x00f00000, 0x00700000);
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  84  	CHECK_ENC_GET(32, 14, 0x0f000000, 0x0e000000);
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  85  	CHECK_ENC_GET(32, 15, 0xf0000000, 0xf0000000);
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  86  
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  87  	CHECK_ENC_GET(64,  1, 0x00000f0000000000ull, 0x0000010000000000ull);
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  88  	CHECK_ENC_GET(64,  3, 0x0000f00000000000ull, 0x0000300000000000ull);
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  89  	CHECK_ENC_GET(64,  5, 0x000f000000000000ull, 0x0005000000000000ull);
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  90  	CHECK_ENC_GET(64,  7, 0x00f0000000000000ull, 0x0070000000000000ull);
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  91  	CHECK_ENC_GET(64, 14, 0x0f00000000000000ull, 0x0e00000000000000ull);
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  92  	CHECK_ENC_GET(64, 15, 0xf000000000000000ull, 0xf000000000000000ull);
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  93  }
0e2dc70e3d0d503 lib/test_bitfield.c  Johannes Berg     2018-06-20  94  

:::::: The code at line 60 was first introduced by commit
:::::: d2585f5164c298aaaed14c2c8d313cbe7bd5b253 lib: kunit: add bitfield test conversion to KUnit

:::::: TO: Vitor Massaru Iha <vitor@...saru.org>
:::::: CC: Shuah Khan <skhan@...uxfoundation.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" (38391 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ