Skip to content

Commit

Permalink
kernel: bump 4.14 to 4.14.114
Browse files Browse the repository at this point in the history
Refreshed all patches.

Altered patches:
- 150-bridge_allow_receiption_on_disabled_port.patch
- 201-extra_optimization.patch

Remove upstreamed:
- 022-0006-crypto-crypto4xx-properly-set-IV-after-de-and-encryp.patch

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
  • Loading branch information
Koen Vandeputte committed May 2, 2019
1 parent 456f486 commit b765f4b
Show file tree
Hide file tree
Showing 38 changed files with 154 additions and 223 deletions.
4 changes: 2 additions & 2 deletions include/kernel-version.mk
Expand Up @@ -4,12 +4,12 @@ LINUX_RELEASE?=1

LINUX_VERSION-3.18 = .136
LINUX_VERSION-4.9 = .171
LINUX_VERSION-4.14 = .113
LINUX_VERSION-4.14 = .114
LINUX_VERSION-4.19 = .36

LINUX_KERNEL_HASH-3.18.136 = 48c8775013d23229462134f911bbb14c7935096fcccfb19ce28ecd5f7154f35c
LINUX_KERNEL_HASH-4.9.171 = 431cd992bf74da9851dd5938dbe45ff7577219b84b237ae5e30067d483b57f01
LINUX_KERNEL_HASH-4.14.113 = b24df2e37faaf2290999c507f9e29de98494f52429bcd35513c5b3e52eaddac2
LINUX_KERNEL_HASH-4.14.114 = b75e1dcfabc8d18051a07cbf9b60eaee8ac470a2311fed20447fd0d022c19e15
LINUX_KERNEL_HASH-4.19.36 = b808b508177f9d288d94a3b9df7b01d5eac9fcc1804a794c913b2144de63f2bc

remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
Expand Down
Expand Up @@ -39,25 +39,25 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
sa = (struct dynamic_sa_ctl *) ctx->sa_in;
- ctx->hash_final = 0;

set_dynamic_sa_command_0(sa, SA_NOT_SAVE_HASH, SA_NOT_SAVE_IV,
SA_LOAD_HASH_FROM_SA, SA_LOAD_IV_FROM_STATE,
@@ -191,7 +188,6 @@ static int crypto4xx_hash_alg_init(struc
set_dynamic_sa_command_0(sa, SA_NOT_SAVE_HASH, (cm == CRYPTO_MODE_CBC ?
SA_SAVE_IV : SA_NOT_SAVE_IV),
@@ -192,7 +189,6 @@ static int crypto4xx_hash_alg_init(struc

ctx->dev = my_alg->dev;
ctx->is_hash = 1;
- ctx->hash_final = 0;

/* Create SA */
if (ctx->sa_in_dma_addr || ctx->sa_out_dma_addr)
@@ -256,7 +252,6 @@ int crypto4xx_hash_update(struct ahash_r
@@ -257,7 +253,6 @@ int crypto4xx_hash_update(struct ahash_r
struct crypto4xx_ctx *ctx = crypto_tfm_ctx(req->base.tfm);

ctx->is_hash = 1;
- ctx->hash_final = 0;
ctx->pd_ctl = 0x11;
ctx->direction = DIR_INBOUND;

@@ -274,7 +269,6 @@ int crypto4xx_hash_digest(struct ahash_r
@@ -275,7 +270,6 @@ int crypto4xx_hash_digest(struct ahash_r
{
struct crypto4xx_ctx *ctx = crypto_tfm_ctx(req->base.tfm);

Expand All @@ -67,7 +67,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

--- a/drivers/crypto/amcc/crypto4xx_core.c
+++ b/drivers/crypto/amcc/crypto4xx_core.c
@@ -964,7 +964,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
@@ -973,7 +973,7 @@ u32 crypto4xx_build_pd(struct crypto_asy

sa->sa_command_1.bf.hash_crypto_offset = 0;
pd->pd_ctl.w = ctx->pd_ctl;
Expand Down
Expand Up @@ -18,7 +18,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

--- a/drivers/crypto/amcc/crypto4xx_core.c
+++ b/drivers/crypto/amcc/crypto4xx_core.c
@@ -1116,7 +1116,9 @@ struct crypto4xx_alg_common crypto4xx_al
@@ -1125,7 +1125,9 @@ struct crypto4xx_alg_common crypto4xx_al
.cra_name = "cbc(aes)",
.cra_driver_name = "cbc-aes-ppc4xx",
.cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
Expand Down
Expand Up @@ -14,7 +14,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

--- a/drivers/crypto/amcc/crypto4xx_core.c
+++ b/drivers/crypto/amcc/crypto4xx_core.c
@@ -1081,7 +1081,6 @@ static void crypto4xx_bh_tasklet_cb(unsi
@@ -1090,7 +1090,6 @@ static void crypto4xx_bh_tasklet_cb(unsi
pd->pd_ctl.bf.pe_done = 0;
crypto4xx_pd_done(core_dev->dev, tail);
crypto4xx_put_pd_to_pdr(core_dev->dev, tail);
Expand Down
Expand Up @@ -18,7 +18,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

--- a/drivers/crypto/amcc/crypto4xx_alg.c
+++ b/drivers/crypto/amcc/crypto4xx_alg.c
@@ -149,7 +149,7 @@ static int crypto4xx_setkey_aes(struct c
@@ -150,7 +150,7 @@ static int crypto4xx_setkey_aes(struct c
SA_NOT_COPY_HDR);
crypto4xx_memcpy_le(ctx->sa_in + get_dynamic_sa_offset_key_field(ctx),
key, keylen);
Expand All @@ -27,7 +27,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
sa->sa_command_1.bf.key_len = keylen >> 3;
ctx->is_hash = 0;
ctx->direction = DIR_INBOUND;
@@ -219,7 +219,7 @@ static int crypto4xx_hash_alg_init(struc
@@ -220,7 +220,7 @@ static int crypto4xx_hash_alg_init(struc
SA_NOT_COPY_PAD, SA_NOT_COPY_PAYLOAD,
SA_NOT_COPY_HDR);
ctx->direction = DIR_INBOUND;
Expand Down
Expand Up @@ -68,7 +68,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
}

/**
@@ -147,15 +147,15 @@ static int crypto4xx_setkey_aes(struct c
@@ -148,15 +148,15 @@ static int crypto4xx_setkey_aes(struct c
SA_SEQ_MASK_OFF, SA_MC_ENABLE,
SA_NOT_COPY_PAD, SA_NOT_COPY_PAYLOAD,
SA_NOT_COPY_HDR);
Expand All @@ -88,7 +88,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

memcpy(ctx->sa_out, ctx->sa_in, ctx->sa_len * 4);
sa = (struct dynamic_sa_ctl *) ctx->sa_out;
@@ -225,7 +225,7 @@ static int crypto4xx_hash_alg_init(struc
@@ -226,7 +226,7 @@ static int crypto4xx_hash_alg_init(struc
memset(sa_in->inner_digest, 0, sizeof(sa_in->inner_digest));
memset(sa_in->outer_digest, 0, sizeof(sa_in->outer_digest));
sa_in->state_ptr = ctx->state_record_dma_addr;
Expand Down
Expand Up @@ -27,7 +27,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
#include "crypto4xx_reg_def.h"
#include "crypto4xx_core.h"
#include "crypto4xx_sa.h"
@@ -171,6 +172,71 @@ int crypto4xx_setkey_aes_cbc(struct cryp
@@ -172,6 +173,71 @@ int crypto4xx_setkey_aes_cbc(struct cryp
CRYPTO_FEEDBACK_MODE_NO_FB);
}

Expand Down Expand Up @@ -109,7 +109,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
#include <crypto/sha.h>
#include "crypto4xx_reg_def.h"
#include "crypto4xx_core.h"
@@ -1135,6 +1136,103 @@ struct crypto4xx_alg_common crypto4xx_al
@@ -1144,6 +1145,103 @@ struct crypto4xx_alg_common crypto4xx_al
}
}
}},
Expand Down
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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));
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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)
{
Expand All @@ -220,15 +220,15 @@ 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;
- unsigned int ivlen = 0;
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);

Expand All @@ -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)
Expand All @@ -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;
Expand Down
Expand Up @@ -38,7 +38,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

--- a/drivers/crypto/amcc/crypto4xx_core.c
+++ b/drivers/crypto/amcc/crypto4xx_core.c
@@ -1148,7 +1148,7 @@ struct crypto4xx_alg_common crypto4xx_al
@@ -1157,7 +1157,7 @@ struct crypto4xx_alg_common crypto4xx_al
.min_keysize = AES_MIN_KEY_SIZE,
.max_keysize = AES_MAX_KEY_SIZE,
.ivsize = AES_IV_SIZE,
Expand Down
Expand Up @@ -56,9 +56,9 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
#include "crypto4xx_reg_def.h"
#include "crypto4xx_core.h"
#include "crypto4xx_sa.h"
@@ -573,8 +574,10 @@ static u32 crypto4xx_ablkcipher_done(str
dst->offset, dst->length, DMA_FROM_DEVICE);
@@ -582,8 +583,10 @@ static u32 crypto4xx_ablkcipher_done(str
}

crypto4xx_ret_sg_desc(dev, pd_uinfo);
- if (ablk_req->base.complete != NULL)
- ablk_req->base.complete(&ablk_req->base, 0);
Expand All @@ -69,7 +69,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

return 0;
}
@@ -591,9 +594,10 @@ static u32 crypto4xx_ahash_done(struct c
@@ -600,9 +603,10 @@ static u32 crypto4xx_ahash_done(struct c
crypto4xx_copy_digest_to_dst(pd_uinfo,
crypto_tfm_ctx(ahash_req->base.tfm));
crypto4xx_ret_sg_desc(dev, pd_uinfo);
Expand All @@ -83,15 +83,15 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

return 0;
}
@@ -704,6 +708,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
@@ -713,6 +717,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
struct pd_uinfo *pd_uinfo = NULL;
unsigned int nbytes = datalen, idx;
u32 gd_idx = 0;
+ bool is_busy;

/* figure how many gd is needed */
num_gd = sg_nents_for_len(src, datalen);
@@ -734,6 +739,31 @@ u32 crypto4xx_build_pd(struct crypto_asy
@@ -743,6 +748,31 @@ u32 crypto4xx_build_pd(struct crypto_asy
* already got must be return the original place.
*/
spin_lock_irqsave(&dev->core_dev->lock, flags);
Expand Down Expand Up @@ -123,7 +123,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
if (num_gd) {
fst_gd = crypto4xx_get_n_gd(dev, num_gd);
if (fst_gd == ERING_WAS_FULL) {
@@ -888,11 +918,12 @@ u32 crypto4xx_build_pd(struct crypto_asy
@@ -897,11 +927,12 @@ u32 crypto4xx_build_pd(struct crypto_asy
sa->sa_command_1.bf.hash_crypto_offset = 0;
pd->pd_ctl.w = ctx->pd_ctl;
pd->pd_ctl_len.w = 0x00400000 | datalen;
Expand All @@ -138,7 +138,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
}

/**
@@ -997,7 +1028,7 @@ static void crypto4xx_bh_tasklet_cb(unsi
@@ -1006,7 +1037,7 @@ static void crypto4xx_bh_tasklet_cb(unsi
tail = core_dev->dev->pdr_tail;
pd_uinfo = &core_dev->dev->pdr_uinfo[tail];
pd = &core_dev->dev->pdr[tail];
Expand Down
Expand Up @@ -32,7 +32,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

--- a/drivers/crypto/amcc/crypto4xx_alg.c
+++ b/drivers/crypto/amcc/crypto4xx_alg.c
@@ -149,8 +149,8 @@ static int crypto4xx_setkey_aes(struct c
@@ -150,8 +150,8 @@ static int crypto4xx_setkey_aes(struct c
SA_SEQ_MASK_OFF, SA_MC_ENABLE,
SA_NOT_COPY_PAD, SA_NOT_COPY_PAYLOAD,
SA_NOT_COPY_HDR);
Expand All @@ -45,7 +45,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
ctx->is_hash = 0;
--- a/drivers/crypto/amcc/crypto4xx_core.c
+++ b/drivers/crypto/amcc/crypto4xx_core.c
@@ -614,42 +614,6 @@ static u32 crypto4xx_pd_done(struct cryp
@@ -623,42 +623,6 @@ static u32 crypto4xx_pd_done(struct cryp
return crypto4xx_ahash_done(dev, pd_uinfo);
}

Expand Down Expand Up @@ -88,7 +88,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
static void crypto4xx_stop_all(struct crypto4xx_core_device *core_dev)
{
crypto4xx_destroy_pdr(core_dev->dev);
@@ -809,8 +773,8 @@ u32 crypto4xx_build_pd(struct crypto_asy
@@ -818,8 +782,8 @@ u32 crypto4xx_build_pd(struct crypto_asy
&pd_uinfo->sr_pa, 4);

if (iv_len)
Expand Down

0 comments on commit b765f4b

Please sign in to comment.