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: <202012200619.nIgOi9On-lkp@intel.com>
Date:   Sun, 20 Dec 2020 06:18:27 +0800
From:   kernel test robot <lkp@...el.com>
To:     Kees Cook <keescook@...omium.org>
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux Memory Management List <linux-mm@...ck.org>
Subject: crypto/blake2b_generic.c:98:13: warning: stack frame size of 9520
 bytes in function 'blake2b_compress'

Hi Kees,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   467f8165a2b0e6accf3d0dd9c8089b1dbde29f7f
commit: d0a3ac549f389c1511a4df0d7638536305205d20 ubsan: enable for all*config builds
date:   4 days ago
config: powerpc-randconfig-r021-20201219 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project cee1e7d14f4628d6174b33640d502bff3b54ae45)
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 powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d0a3ac549f389c1511a4df0d7638536305205d20
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout d0a3ac549f389c1511a4df0d7638536305205d20
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 >>):

>> crypto/blake2b_generic.c:98:13: warning: stack frame size of 9520 bytes in function 'blake2b_compress' [-Wframe-larger-than=]
   static void blake2b_compress(struct blake2b_state *S,
               ^
   1 warning generated.
--
>> drivers/net/ethernet/intel/e1000/e1000_main.c:3590:6: warning: stack frame size of 1088 bytes in function 'e1000_update_stats' [-Wframe-larger-than=]
   void e1000_update_stats(struct e1000_adapter *adapter)
        ^
   1 warning generated.
--
>> drivers/net/ethernet/intel/igb/igb_main.c:6551:6: warning: stack frame size of 1408 bytes in function 'igb_update_stats' [-Wframe-larger-than=]
   void igb_update_stats(struct igb_adapter *adapter)
        ^
   1 warning generated.
--
>> drivers/net/ethernet/intel/igc/igc_main.c:3608:6: warning: stack frame size of 1184 bytes in function 'igc_update_stats' [-Wframe-larger-than=]
   void igc_update_stats(struct igc_adapter *adapter)
        ^
   1 warning generated.
--
>> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:7022:6: warning: stack frame size of 1456 bytes in function 'ixgbe_update_stats' [-Wframe-larger-than=]
   void ixgbe_update_stats(struct ixgbe_adapter *adapter)
        ^
   1 warning generated.


vim +/blake2b_compress +98 crypto/blake2b_generic.c

91d689337fe8b77 David Sterba  2019-10-24   73  
91d689337fe8b77 David Sterba  2019-10-24   74  #define G(r,i,a,b,c,d)                                  \
91d689337fe8b77 David Sterba  2019-10-24   75  	do {                                            \
91d689337fe8b77 David Sterba  2019-10-24   76  		a = a + b + m[blake2b_sigma[r][2*i+0]]; \
91d689337fe8b77 David Sterba  2019-10-24   77  		d = ror64(d ^ a, 32);                   \
91d689337fe8b77 David Sterba  2019-10-24   78  		c = c + d;                              \
91d689337fe8b77 David Sterba  2019-10-24   79  		b = ror64(b ^ c, 24);                   \
91d689337fe8b77 David Sterba  2019-10-24   80  		a = a + b + m[blake2b_sigma[r][2*i+1]]; \
91d689337fe8b77 David Sterba  2019-10-24   81  		d = ror64(d ^ a, 16);                   \
91d689337fe8b77 David Sterba  2019-10-24   82  		c = c + d;                              \
91d689337fe8b77 David Sterba  2019-10-24   83  		b = ror64(b ^ c, 63);                   \
91d689337fe8b77 David Sterba  2019-10-24   84  	} while (0)
91d689337fe8b77 David Sterba  2019-10-24   85  
91d689337fe8b77 David Sterba  2019-10-24   86  #define ROUND(r)                                \
91d689337fe8b77 David Sterba  2019-10-24   87  	do {                                    \
91d689337fe8b77 David Sterba  2019-10-24   88  		G(r,0,v[ 0],v[ 4],v[ 8],v[12]); \
91d689337fe8b77 David Sterba  2019-10-24   89  		G(r,1,v[ 1],v[ 5],v[ 9],v[13]); \
91d689337fe8b77 David Sterba  2019-10-24   90  		G(r,2,v[ 2],v[ 6],v[10],v[14]); \
91d689337fe8b77 David Sterba  2019-10-24   91  		G(r,3,v[ 3],v[ 7],v[11],v[15]); \
91d689337fe8b77 David Sterba  2019-10-24   92  		G(r,4,v[ 0],v[ 5],v[10],v[15]); \
91d689337fe8b77 David Sterba  2019-10-24   93  		G(r,5,v[ 1],v[ 6],v[11],v[12]); \
91d689337fe8b77 David Sterba  2019-10-24   94  		G(r,6,v[ 2],v[ 7],v[ 8],v[13]); \
91d689337fe8b77 David Sterba  2019-10-24   95  		G(r,7,v[ 3],v[ 4],v[ 9],v[14]); \
91d689337fe8b77 David Sterba  2019-10-24   96  	} while (0)
91d689337fe8b77 David Sterba  2019-10-24   97  
91d689337fe8b77 David Sterba  2019-10-24  @98  static void blake2b_compress(struct blake2b_state *S,
91d689337fe8b77 David Sterba  2019-10-24   99  			     const u8 block[BLAKE2B_BLOCKBYTES])
91d689337fe8b77 David Sterba  2019-10-24  100  {
91d689337fe8b77 David Sterba  2019-10-24  101  	u64 m[16];
91d689337fe8b77 David Sterba  2019-10-24  102  	u64 v[16];
91d689337fe8b77 David Sterba  2019-10-24  103  	size_t i;
91d689337fe8b77 David Sterba  2019-10-24  104  
91d689337fe8b77 David Sterba  2019-10-24  105  	for (i = 0; i < 16; ++i)
91d689337fe8b77 David Sterba  2019-10-24  106  		m[i] = get_unaligned_le64(block + i * sizeof(m[i]));
91d689337fe8b77 David Sterba  2019-10-24  107  
91d689337fe8b77 David Sterba  2019-10-24  108  	for (i = 0; i < 8; ++i)
91d689337fe8b77 David Sterba  2019-10-24  109  		v[i] = S->h[i];
91d689337fe8b77 David Sterba  2019-10-24  110  
91d689337fe8b77 David Sterba  2019-10-24  111  	v[ 8] = blake2b_IV[0];
91d689337fe8b77 David Sterba  2019-10-24  112  	v[ 9] = blake2b_IV[1];
91d689337fe8b77 David Sterba  2019-10-24  113  	v[10] = blake2b_IV[2];
91d689337fe8b77 David Sterba  2019-10-24  114  	v[11] = blake2b_IV[3];
91d689337fe8b77 David Sterba  2019-10-24  115  	v[12] = blake2b_IV[4] ^ S->t[0];
91d689337fe8b77 David Sterba  2019-10-24  116  	v[13] = blake2b_IV[5] ^ S->t[1];
91d689337fe8b77 David Sterba  2019-10-24  117  	v[14] = blake2b_IV[6] ^ S->f[0];
91d689337fe8b77 David Sterba  2019-10-24  118  	v[15] = blake2b_IV[7] ^ S->f[1];
91d689337fe8b77 David Sterba  2019-10-24  119  
91d689337fe8b77 David Sterba  2019-10-24  120  	ROUND(0);
91d689337fe8b77 David Sterba  2019-10-24  121  	ROUND(1);
91d689337fe8b77 David Sterba  2019-10-24  122  	ROUND(2);
91d689337fe8b77 David Sterba  2019-10-24  123  	ROUND(3);
91d689337fe8b77 David Sterba  2019-10-24  124  	ROUND(4);
91d689337fe8b77 David Sterba  2019-10-24  125  	ROUND(5);
91d689337fe8b77 David Sterba  2019-10-24  126  	ROUND(6);
91d689337fe8b77 David Sterba  2019-10-24  127  	ROUND(7);
91d689337fe8b77 David Sterba  2019-10-24  128  	ROUND(8);
91d689337fe8b77 David Sterba  2019-10-24  129  	ROUND(9);
91d689337fe8b77 David Sterba  2019-10-24  130  	ROUND(10);
91d689337fe8b77 David Sterba  2019-10-24  131  	ROUND(11);
0c0408e86dbe8f4 Arnd Bergmann 2020-05-05  132  #ifdef CONFIG_CC_IS_CLANG
0c0408e86dbe8f4 Arnd Bergmann 2020-05-05  133  #pragma nounroll /* https://bugs.llvm.org/show_bug.cgi?id=45803 */
0c0408e86dbe8f4 Arnd Bergmann 2020-05-05  134  #endif
91d689337fe8b77 David Sterba  2019-10-24  135  	for (i = 0; i < 8; ++i)
91d689337fe8b77 David Sterba  2019-10-24  136  		S->h[i] = S->h[i] ^ v[i] ^ v[i + 8];
91d689337fe8b77 David Sterba  2019-10-24  137  }
91d689337fe8b77 David Sterba  2019-10-24  138  

:::::: The code at line 98 was first introduced by commit
:::::: 91d689337fe8b7703608a2ec39aae700b99f3933 crypto: blake2b - add blake2b generic implementation

:::::: TO: David Sterba <dsterba@...e.com>
:::::: CC: Herbert Xu <herbert@...dor.apana.org.au>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ