kernel: bump 4.14 to 4.14.114
[openwrt/openwrt.git] / target / linux / apm821xx / patches-4.14 / 020-0012-crypto-crypto4xx-pointer-arithmetic-overhaul.patch
index ee7ee1191e0f60f7c71b5e882b6d0d5bde8ba76e..3d445f537bf248a904f8a83ad1aed9bfbe2eb50a 100644 (file)
@@ -25,9 +25,9 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
 -      sa = (struct dynamic_sa_ctl *) ctx->sa_in;
 +      sa = ctx->sa_in;
  
-       set_dynamic_sa_command_0(sa, SA_NOT_SAVE_HASH, SA_NOT_SAVE_IV,
-                                SA_LOAD_HASH_FROM_SA, SA_LOAD_IV_FROM_STATE,
-@@ -159,7 +159,7 @@ static int crypto4xx_setkey_aes(struct c
+       set_dynamic_sa_command_0(sa, SA_NOT_SAVE_HASH, (cm == CRYPTO_MODE_CBC ?
+                                SA_SAVE_IV : SA_NOT_SAVE_IV),
+@@ -160,7 +160,7 @@ static int crypto4xx_setkey_aes(struct c
        ctx->offset_to_sr_ptr = get_dynamic_sa_offset_state_ptr_field(sa);
  
        memcpy(ctx->sa_out, ctx->sa_in, ctx->sa_len * 4);
@@ -36,7 +36,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        sa->sa_command_0.bf.dir = DIR_OUTBOUND;
  
        return 0;
-@@ -248,8 +248,7 @@ static int crypto4xx_hash_alg_init(struc
+@@ -249,8 +249,7 @@ static int crypto4xx_hash_alg_init(struc
        struct crypto_alg *alg = tfm->__crt_alg;
        struct crypto4xx_alg *my_alg = crypto_alg_to_crypto4xx_alg(alg);
        struct crypto4xx_ctx *ctx = crypto_tfm_ctx(tfm);
@@ -46,7 +46,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        int rc;
  
        ctx->dev   = my_alg->dev;
-@@ -273,25 +272,24 @@ static int crypto4xx_hash_alg_init(struc
+@@ -274,25 +273,24 @@ static int crypto4xx_hash_alg_init(struc
  
        crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm),
                                 sizeof(struct crypto4xx_ctx));
@@ -80,7 +80,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  
        return 0;
  }
-@@ -302,7 +300,7 @@ int crypto4xx_hash_init(struct ahash_req
+@@ -303,7 +301,7 @@ int crypto4xx_hash_init(struct ahash_req
        int ds;
        struct dynamic_sa_ctl *sa;
  
@@ -206,7 +206,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                       SA_HASH_ALG_SHA1_DIGEST_SIZE);
        }
  
-@@ -607,11 +600,9 @@ static u32 crypto4xx_ahash_done(struct c
+@@ -616,11 +609,9 @@ static u32 crypto4xx_ahash_done(struct c
  
  static u32 crypto4xx_pd_done(struct crypto4xx_device *dev, u32 idx)
  {
@@ -220,7 +220,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        if (crypto_tfm_alg_type(pd_uinfo->async_req->tfm) ==
                        CRYPTO_ALG_TYPE_ABLKCIPHER)
                return crypto4xx_ablkcipher_done(dev, pd_uinfo, pd);
-@@ -712,7 +703,6 @@ u32 crypto4xx_build_pd(struct crypto_asy
+@@ -721,7 +712,6 @@ u32 crypto4xx_build_pd(struct crypto_asy
        unsigned long flags;
        struct pd_uinfo *pd_uinfo = NULL;
        unsigned int nbytes = datalen, idx;
@@ -228,7 +228,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        u32 gd_idx = 0;
  
        /* figure how many gd is needed */
-@@ -771,17 +761,15 @@ u32 crypto4xx_build_pd(struct crypto_asy
+@@ -780,17 +770,15 @@ u32 crypto4xx_build_pd(struct crypto_asy
        }
        spin_unlock_irqrestore(&dev->core_dev->lock, flags);
  
@@ -248,7 +248,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                if (ctx->direction == DIR_INBOUND)
                        memcpy(sa, ctx->sa_in, ctx->sa_len * 4);
                else
-@@ -791,14 +779,15 @@ u32 crypto4xx_build_pd(struct crypto_asy
+@@ -800,14 +788,15 @@ u32 crypto4xx_build_pd(struct crypto_asy
                        &pd_uinfo->sr_pa, 4);
  
                if (iv_len)
@@ -267,7 +267,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                }
        }
        pd->sa_len = ctx->sa_len;
-@@ -1006,9 +995,8 @@ static void crypto4xx_bh_tasklet_cb(unsi
+@@ -1015,9 +1004,8 @@ static void crypto4xx_bh_tasklet_cb(unsi
  
        while (core_dev->dev->pdr_head != core_dev->dev->pdr_tail) {
                tail = core_dev->dev->pdr_tail;