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:   Mon, 1 Feb 2021 12:08:35 +0800
From:   kernel test robot <lkp@...el.com>
To:     Vitor Massaru Iha <vitor@...saru.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Shuah Khan <skhan@...uxfoundation.org>,
        Brendan Higgins <brendanhiggins@...gle.com>
Subject: lib/bitfield_kunit.c:93:1: warning: the frame size of 7424 bytes is
 larger than 2048 bytes

Hi Vitor,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1048ba83fb1c00cd24172e23e8263972f6b5d9ac
commit: d2585f5164c298aaaed14c2c8d313cbe7bd5b253 lib: kunit: add bitfield test conversion to KUnit
date:   4 months ago
config: mips-randconfig-r016-20210201 (attached as .config)
compiler: mips64el-linux-gcc (GCC) 9.3.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=d2585f5164c298aaaed14c2c8d313cbe7bd5b253
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout d2585f5164c298aaaed14c2c8d313cbe7bd5b253
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 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 >>):

   lib/bitfield_kunit.c: In function 'test_bitfields_compile':
   lib/bitfield_kunit.c:136:21: warning: unsigned conversion from 'int' to 'u16' {aka 'short unsigned int'} changes value from '393216' to '0' [-Woverflow]
     136 |  u16_encode_bits(0, 0x60000);
         |                     ^~~~~~~
   At top level:
   lib/bitfield_kunit.c:129:20: warning: 'test_bitfields_compile' defined but not used [-Wunused-function]
     129 | static void __init test_bitfields_compile(struct kunit *context)
         |                    ^~~~~~~~~~~~~~~~~~~~~~
   lib/bitfield_kunit.c: In function 'test_bitfields_constants':
>> lib/bitfield_kunit.c:93:1: warning: the frame size of 7424 bytes is larger than 2048 bytes [-Wframe-larger-than=]
      93 | }
         | ^


vim +93 lib/bitfield_kunit.c

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

:::::: The code at line 93 was first introduced by commit
:::::: 0e2dc70e3d0d503b0cc9c5f74db3eb6db52c9e22 bitfield: add tests

:::::: TO: Johannes Berg <johannes@...solutions.net>
:::::: CC: Kalle Valo <kvalo@...eaurora.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" (27870 bytes)

Powered by blists - more mailing lists