[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALLzPKYzc5FwPFTn5Ztg58vfkMO2EZ8P-MLEmVXRqdBE+CkkSg@mail.gmail.com>
Date: Fri, 17 Aug 2012 00:20:53 +0300
From: "Kasatkin, Dmitry" <dmitry.kasatkin@...el.com>
To: herbert@...dor.apana.org.au
Cc: linux-crypto <linux-crypto@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
linux-security-module <linux-security-module@...r.kernel.org>
Subject: on stack dynamic allocations
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists