linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* crypto/blake2b_generic.c:245:1: warning: the frame size of 1220 bytes is larger than 1024 bytes
@ 2019-11-30 21:54 kbuild test robot
  2019-12-03 13:16 ` David Sterba
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2019-11-30 21:54 UTC (permalink / raw)
  To: David Sterba; +Cc: kbuild-all, linux-kernel, Herbert Xu

[-- Attachment #1: Type: text/plain, Size: 3210 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   32ef9553635ab1236c33951a8bd9b5af1c3b1646
commit: 91d689337fe8b7703608a2ec39aae700b99f3933 crypto: blake2b - add blake2b generic implementation
date:   4 weeks ago
config: arc-randconfig-a0031-20191201 (attached as .config)
compiler: arc-elf-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 91d689337fe8b7703608a2ec39aae700b99f3933
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=arc 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   crypto/blake2b_generic.c: In function 'blake2b_compress':
>> crypto/blake2b_generic.c:245:1: warning: the frame size of 1220 bytes is larger than 1024 bytes [-Wframe-larger-than=]
    }
    ^

vim +245 crypto/blake2b_generic.c

   183	
   184	#define G(r,i,a,b,c,d)                                  \
   185		do {                                            \
   186			a = a + b + m[blake2b_sigma[r][2*i+0]]; \
   187			d = ror64(d ^ a, 32);                   \
   188			c = c + d;                              \
   189			b = ror64(b ^ c, 24);                   \
   190			a = a + b + m[blake2b_sigma[r][2*i+1]]; \
   191			d = ror64(d ^ a, 16);                   \
   192			c = c + d;                              \
   193			b = ror64(b ^ c, 63);                   \
   194		} while (0)
   195	
   196	#define ROUND(r)                                \
   197		do {                                    \
   198			G(r,0,v[ 0],v[ 4],v[ 8],v[12]); \
   199			G(r,1,v[ 1],v[ 5],v[ 9],v[13]); \
   200			G(r,2,v[ 2],v[ 6],v[10],v[14]); \
   201			G(r,3,v[ 3],v[ 7],v[11],v[15]); \
   202			G(r,4,v[ 0],v[ 5],v[10],v[15]); \
   203			G(r,5,v[ 1],v[ 6],v[11],v[12]); \
   204			G(r,6,v[ 2],v[ 7],v[ 8],v[13]); \
   205			G(r,7,v[ 3],v[ 4],v[ 9],v[14]); \
   206		} while (0)
   207	
   208	static void blake2b_compress(struct blake2b_state *S,
   209				     const u8 block[BLAKE2B_BLOCKBYTES])
   210	{
   211		u64 m[16];
   212		u64 v[16];
   213		size_t i;
   214	
   215		for (i = 0; i < 16; ++i)
   216			m[i] = get_unaligned_le64(block + i * sizeof(m[i]));
   217	
   218		for (i = 0; i < 8; ++i)
   219			v[i] = S->h[i];
   220	
   221		v[ 8] = blake2b_IV[0];
   222		v[ 9] = blake2b_IV[1];
   223		v[10] = blake2b_IV[2];
   224		v[11] = blake2b_IV[3];
   225		v[12] = blake2b_IV[4] ^ S->t[0];
   226		v[13] = blake2b_IV[5] ^ S->t[1];
   227		v[14] = blake2b_IV[6] ^ S->f[0];
   228		v[15] = blake2b_IV[7] ^ S->f[1];
   229	
   230		ROUND(0);
   231		ROUND(1);
   232		ROUND(2);
   233		ROUND(3);
   234		ROUND(4);
   235		ROUND(5);
   236		ROUND(6);
   237		ROUND(7);
   238		ROUND(8);
   239		ROUND(9);
   240		ROUND(10);
   241		ROUND(11);
   242	
   243		for (i = 0; i < 8; ++i)
   244			S->h[i] = S->h[i] ^ v[i] ^ v[i + 8];
 > 245	}
   246	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 23568 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: crypto/blake2b_generic.c:245:1: warning: the frame size of 1220 bytes is larger than 1024 bytes
  2019-11-30 21:54 crypto/blake2b_generic.c:245:1: warning: the frame size of 1220 bytes is larger than 1024 bytes kbuild test robot
@ 2019-12-03 13:16 ` David Sterba
  0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2019-12-03 13:16 UTC (permalink / raw)
  To: kbuild test robot
  Cc: David Sterba, kbuild-all, linux-kernel, Herbert Xu, linux-crypto

On Sun, Dec 01, 2019 at 05:54:53AM +0800, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   32ef9553635ab1236c33951a8bd9b5af1c3b1646
> commit: 91d689337fe8b7703608a2ec39aae700b99f3933 crypto: blake2b - add blake2b generic implementation
> date:   4 weeks ago
> config: arc-randconfig-a0031-20191201 (attached as .config)
> compiler: arc-elf-gcc (GCC) 7.4.0
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git checkout 91d689337fe8b7703608a2ec39aae700b99f3933
>         # save the attached .config to linux build tree
>         GCC_VERSION=7.4.0 make.cross ARCH=arc 

So this is for ARC.

> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
>    crypto/blake2b_generic.c: In function 'blake2b_compress':
> >> crypto/blake2b_generic.c:245:1: warning: the frame size of 1220 bytes is larger than 1024 bytes [-Wframe-larger-than=]

1220 looks like a lot, the x86_64 asks for 288 bytes for
blake2b_compress, this roughly matches the declarations and effects of
inlining (2 x 16 x sizeof(u64) is 256).

I'm not familiar with ARC limitations regarding eg. 64 bit types so this
would be my first guess that this requires more temporary stack space
than other arches that can handle u64 just fine.

>     }
>     ^
> 
> vim +245 crypto/blake2b_generic.c
> 
>    183	
>    184	#define G(r,i,a,b,c,d)                                  \
>    185		do {                                            \
>    186			a = a + b + m[blake2b_sigma[r][2*i+0]]; \
>    187			d = ror64(d ^ a, 32);                   \
>    188			c = c + d;                              \
>    189			b = ror64(b ^ c, 24);                   \
>    190			a = a + b + m[blake2b_sigma[r][2*i+1]]; \
>    191			d = ror64(d ^ a, 16);                   \
>    192			c = c + d;                              \
>    193			b = ror64(b ^ c, 63);                   \
>    194		} while (0)
>    195	
>    196	#define ROUND(r)                                \
>    197		do {                                    \
>    198			G(r,0,v[ 0],v[ 4],v[ 8],v[12]); \
>    199			G(r,1,v[ 1],v[ 5],v[ 9],v[13]); \
>    200			G(r,2,v[ 2],v[ 6],v[10],v[14]); \
>    201			G(r,3,v[ 3],v[ 7],v[11],v[15]); \
>    202			G(r,4,v[ 0],v[ 5],v[10],v[15]); \
>    203			G(r,5,v[ 1],v[ 6],v[11],v[12]); \
>    204			G(r,6,v[ 2],v[ 7],v[ 8],v[13]); \
>    205			G(r,7,v[ 3],v[ 4],v[ 9],v[14]); \
>    206		} while (0)
>    207	
>    208	static void blake2b_compress(struct blake2b_state *S,
>    209				     const u8 block[BLAKE2B_BLOCKBYTES])
>    210	{
>    211		u64 m[16];
>    212		u64 v[16];
>    213		size_t i;
>    214	
>    215		for (i = 0; i < 16; ++i)
>    216			m[i] = get_unaligned_le64(block + i * sizeof(m[i]));
>    217	
>    218		for (i = 0; i < 8; ++i)
>    219			v[i] = S->h[i];
>    220	
>    221		v[ 8] = blake2b_IV[0];
>    222		v[ 9] = blake2b_IV[1];
>    223		v[10] = blake2b_IV[2];
>    224		v[11] = blake2b_IV[3];
>    225		v[12] = blake2b_IV[4] ^ S->t[0];
>    226		v[13] = blake2b_IV[5] ^ S->t[1];
>    227		v[14] = blake2b_IV[6] ^ S->f[0];
>    228		v[15] = blake2b_IV[7] ^ S->f[1];
>    229	
>    230		ROUND(0);
>    231		ROUND(1);
>    232		ROUND(2);
>    233		ROUND(3);
>    234		ROUND(4);
>    235		ROUND(5);
>    236		ROUND(6);
>    237		ROUND(7);
>    238		ROUND(8);
>    239		ROUND(9);
>    240		ROUND(10);
>    241		ROUND(11);
>    242	
>    243		for (i = 0; i < 8; ++i)
>    244			S->h[i] = S->h[i] ^ v[i] ^ v[i + 8];
>  > 245	}

(rest of mail kept for reference)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-03 13:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-30 21:54 crypto/blake2b_generic.c:245:1: warning: the frame size of 1220 bytes is larger than 1024 bytes kbuild test robot
2019-12-03 13:16 ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).