public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* on stack dynamic allocations
@ 2012-08-16 21:20 Kasatkin, Dmitry
  2012-08-16 21:30 ` David Daney
  0 siblings, 1 reply; 3+ messages in thread
From: Kasatkin, Dmitry @ 2012-08-16 21:20 UTC (permalink / raw)
  To: herbert; +Cc: linux-crypto, LKML, linux-security-module

Hello,

Some places in the code uses variable-size allocation on stack..
For example from hmac_setkey():

	struct {
		struct shash_desc shash;
		char ctx[crypto_shash_descsize(hash)];
	} desc;


sparse complains

CHECK   crypto/hmac.c
crypto/hmac.c:57:47: error: bad constant expression

I like it instead of kmalloc..

But what is position of kernel community about it?

- Dmitry

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

end of thread, other threads:[~2012-08-17  8:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-16 21:20 on stack dynamic allocations Kasatkin, Dmitry
2012-08-16 21:30 ` David Daney
2012-08-17  8:18   ` Jussi Kivilinna

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox