* [PATCH] crypto: do not attempt to write to readonly variable
@ 2011-02-21 14:27 David Sterba
2011-03-04 7:29 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: David Sterba @ 2011-02-21 14:27 UTC (permalink / raw)
To: linux-crypto; +Cc: linux-kernel, David Sterba, Herbert Xu
Commit da7f033ddc9fdeb (”crypto: cryptomgr - Add test infrastructure”) added a
const to variable which is later used as target buffer of memcpy.
crypto/tcrypt.c:217:12: warning: passing 'const char (*)[128]' to parameter of type 'void *' discards qualifiers
memset(&iv, 0xff, iv_len);
crypto/tcrypt.c:test_cipher_speed()
- unsigned char *key, iv[128];
+ const char *key, iv[128];
...
memset(&iv, 0xff, iv_len);
CC: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David Sterba <dsterba@suse.cz>
---
crypto/tcrypt.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index 9aac5e5..e912ea5 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -146,7 +146,8 @@ static void test_cipher_speed(const char *algo, int enc, unsigned int sec,
unsigned int tcount, u8 *keysize)
{
unsigned int ret, i, j, iv_len;
- const char *key, iv[128];
+ const char *key;
+ char iv[128];
struct crypto_blkcipher *tfm;
struct blkcipher_desc desc;
const char *e;
--
1.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: do not attempt to write to readonly variable
2011-02-21 14:27 [PATCH] crypto: do not attempt to write to readonly variable David Sterba
@ 2011-03-04 7:29 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2011-03-04 7:29 UTC (permalink / raw)
To: David Sterba; +Cc: linux-crypto, linux-kernel
On Mon, Feb 21, 2011 at 03:27:22PM +0100, David Sterba wrote:
> Commit da7f033ddc9fdeb (”crypto: cryptomgr - Add test infrastructure”) added a
> const to variable which is later used as target buffer of memcpy.
Patch applied. Thanks!
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-04 7:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-21 14:27 [PATCH] crypto: do not attempt to write to readonly variable David Sterba
2011-03-04 7:29 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®