OSDN Git Service

Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[tomoyo/tomoyo-test1.git] / drivers / crypto / ccp / ccp-crypto-aes.c
index ea3d6de..58c6ddd 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * AMD Cryptographic Coprocessor (CCP) AES crypto API support
  *
- * Copyright (C) 2013,2016 Advanced Micro Devices, Inc.
+ * Copyright (C) 2013-2019 Advanced Micro Devices, Inc.
  *
  * Author: Tom Lendacky <thomas.lendacky@amd.com>
  */
@@ -76,8 +76,7 @@ static int ccp_aes_crypt(struct ablkcipher_request *req, bool encrypt)
                return -EINVAL;
 
        if (((ctx->u.aes.mode == CCP_AES_MODE_ECB) ||
-            (ctx->u.aes.mode == CCP_AES_MODE_CBC) ||
-            (ctx->u.aes.mode == CCP_AES_MODE_CFB)) &&
+            (ctx->u.aes.mode == CCP_AES_MODE_CBC)) &&
            (req->nbytes & (AES_BLOCK_SIZE - 1)))
                return -EINVAL;
 
@@ -288,7 +287,7 @@ static struct ccp_aes_def aes_algs[] = {
                .version        = CCP_VERSION(3, 0),
                .name           = "cfb(aes)",
                .driver_name    = "cfb-aes-ccp",
-               .blocksize      = AES_BLOCK_SIZE,
+               .blocksize      = 1,
                .ivsize         = AES_BLOCK_SIZE,
                .alg_defaults   = &ccp_aes_defaults,
        },