All of lore.kernel.org
 help / color / mirror / Atom feed
* on stack dynamic allocations
@ 2012-08-16 21:20 ` Kasatkin, Dmitry
  0 siblings, 0 replies; 6+ 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] 6+ messages in thread

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

Thread overview: 6+ 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:20 ` Kasatkin, Dmitry
2012-08-16 21:30 ` David Daney
2012-08-16 21:30   ` David Daney
2012-08-17  8:18   ` Jussi Kivilinna
2012-08-17  8:18     ` Jussi Kivilinna

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.