Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d2456c66236c15d6462f1ac751cdbd48a34e9704
Commit:     d2456c66236c15d6462f1ac751cdbd48a34e9704
Parent:     9617d6ef6278edd04070ae404c871f65a466c6d2
Author:     Sebastian Siewior <[EMAIL PROTECTED]>
AuthorDate: Fri Nov 30 16:36:57 2007 +1100
Committer:  Herbert Xu <[EMAIL PROTECTED]>
CommitDate: Fri Jan 11 08:16:26 2008 +1100

    [CRYPTO] geode: do not copy the IV too often
    
    There is no reason to keep the IV in the private structre. Instead keep
    just a pointer to make the patch smaller :)
    This also remove a few memcpy()s
    
    Signed-off-by: Sebastian Siewior <[EMAIL PROTECTED]>
    Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
---
 drivers/crypto/geode-aes.c |    6 ++----
 drivers/crypto/geode-aes.h |    2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c
index 0ca92d4..68be7d0 100644
--- a/drivers/crypto/geode-aes.c
+++ b/drivers/crypto/geode-aes.c
@@ -315,7 +315,7 @@ geode_cbc_decrypt(struct blkcipher_desc *desc,
 
        blkcipher_walk_init(&walk, dst, src, nbytes);
        err = blkcipher_walk_virt(desc, &walk);
-       memcpy(op->iv, walk.iv, AES_IV_LENGTH);
+       op->iv = walk.iv;
 
        while((nbytes = walk.nbytes)) {
                op->src = walk.src.virt.addr,
@@ -330,7 +330,6 @@ geode_cbc_decrypt(struct blkcipher_desc *desc,
                err = blkcipher_walk_done(desc, &walk, nbytes);
        }
 
-       memcpy(walk.iv, op->iv, AES_IV_LENGTH);
        return err;
 }
 
@@ -348,7 +347,7 @@ geode_cbc_encrypt(struct blkcipher_desc *desc,
 
        blkcipher_walk_init(&walk, dst, src, nbytes);
        err = blkcipher_walk_virt(desc, &walk);
-       memcpy(op->iv, walk.iv, AES_IV_LENGTH);
+       op->iv = walk.iv;
 
        while((nbytes = walk.nbytes)) {
                op->src = walk.src.virt.addr,
@@ -362,7 +361,6 @@ geode_cbc_encrypt(struct blkcipher_desc *desc,
                err = blkcipher_walk_done(desc, &walk, nbytes);
        }
 
-       memcpy(walk.iv, op->iv, AES_IV_LENGTH);
        return err;
 }
 
diff --git a/drivers/crypto/geode-aes.h b/drivers/crypto/geode-aes.h
index 14cc763..f1855b5 100644
--- a/drivers/crypto/geode-aes.h
+++ b/drivers/crypto/geode-aes.h
@@ -65,7 +65,7 @@ struct geode_aes_op {
        int len;
 
        u8 key[AES_KEY_LENGTH];
-       u8 iv[AES_IV_LENGTH];
+       u8 *iv;
 
        union {
                struct crypto_blkcipher *blk;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to