aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/layerscape/patches-4.14/820-sec-support-layerscape.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/layerscape/patches-4.14/820-sec-support-layerscape.patch')
-rw-r--r--target/linux/layerscape/patches-4.14/820-sec-support-layerscape.patch38
1 files changed, 19 insertions, 19 deletions
diff --git a/target/linux/layerscape/patches-4.14/820-sec-support-layerscape.patch b/target/linux/layerscape/patches-4.14/820-sec-support-layerscape.patch
index 95e6894b93..d79c34d2e1 100644
--- a/target/linux/layerscape/patches-4.14/820-sec-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.14/820-sec-support-layerscape.patch
@@ -1917,7 +1917,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
return 0;
}
-@@ -987,9 +1080,6 @@ static void init_aead_job(struct aead_re
+@@ -989,9 +1082,6 @@ static void init_aead_job(struct aead_re
append_seq_out_ptr(desc, dst_dma,
req->assoclen + req->cryptlen - authsize,
out_options);
@@ -1927,7 +1927,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
}
static void init_gcm_job(struct aead_request *req,
-@@ -1004,6 +1094,7 @@ static void init_gcm_job(struct aead_req
+@@ -1006,6 +1096,7 @@ static void init_gcm_job(struct aead_req
unsigned int last;
init_aead_job(req, edesc, all_contig, encrypt);
@@ -1935,7 +1935,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
/* BUG This should not be specific to generic GCM. */
last = 0;
-@@ -1021,6 +1112,40 @@ static void init_gcm_job(struct aead_req
+@@ -1023,6 +1114,40 @@ static void init_gcm_job(struct aead_req
/* End of blank commands */
}
@@ -1976,7 +1976,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
static void init_authenc_job(struct aead_request *req,
struct aead_edesc *edesc,
bool all_contig, bool encrypt)
-@@ -1030,6 +1155,7 @@ static void init_authenc_job(struct aead
+@@ -1032,6 +1157,7 @@ static void init_authenc_job(struct aead
struct caam_aead_alg, aead);
unsigned int ivsize = crypto_aead_ivsize(aead);
struct caam_ctx *ctx = crypto_aead_ctx(aead);
@@ -1984,7 +1984,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
const bool ctr_mode = ((ctx->cdata.algtype & OP_ALG_AAI_MASK) ==
OP_ALG_AAI_CTR_MOD128);
const bool is_rfc3686 = alg->caam.rfc3686;
-@@ -1053,6 +1179,15 @@ static void init_authenc_job(struct aead
+@@ -1055,6 +1181,15 @@ static void init_authenc_job(struct aead
init_aead_job(req, edesc, all_contig, encrypt);
@@ -2000,7 +2000,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
if (ivsize && ((is_rfc3686 && encrypt) || !alg->caam.geniv))
append_load_as_imm(desc, req->iv, ivsize,
LDST_CLASS_1_CCB |
-@@ -1225,8 +1360,16 @@ static struct aead_edesc *aead_edesc_all
+@@ -1227,8 +1362,16 @@ static struct aead_edesc *aead_edesc_all
}
}
@@ -2018,7 +2018,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
sec4_sg_bytes = sec4_sg_len * sizeof(struct sec4_sg_entry);
/* allocate space for base edesc and hw desc commands, link tables */
-@@ -1307,6 +1450,72 @@ static int gcm_encrypt(struct aead_reque
+@@ -1309,6 +1452,72 @@ static int gcm_encrypt(struct aead_reque
return ret;
}
@@ -2091,7 +2091,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
static int ipsec_gcm_encrypt(struct aead_request *req)
{
if (req->assoclen < 8)
-@@ -1494,7 +1703,25 @@ static struct ablkcipher_edesc *ablkciph
+@@ -1496,7 +1705,25 @@ static struct ablkcipher_edesc *ablkciph
sec4_sg_ents = 1 + mapped_src_nents;
dst_sg_idx = sec4_sg_ents;
@@ -2118,7 +2118,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
sec4_sg_bytes = sec4_sg_ents * sizeof(struct sec4_sg_entry);
/*
-@@ -3196,6 +3423,50 @@ static struct caam_aead_alg driver_aeads
+@@ -3199,6 +3426,50 @@ static struct caam_aead_alg driver_aeads
.geniv = true,
},
},
@@ -2169,7 +2169,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
};
struct caam_crypto_alg {
-@@ -3204,9 +3475,11 @@ struct caam_crypto_alg {
+@@ -3207,9 +3478,11 @@ struct caam_crypto_alg {
struct caam_alg_entry caam;
};
@@ -2182,7 +2182,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
ctx->jrdev = caam_jr_alloc();
if (IS_ERR(ctx->jrdev)) {
-@@ -3214,10 +3487,16 @@ static int caam_init_common(struct caam_
+@@ -3217,10 +3490,16 @@ static int caam_init_common(struct caam_
return PTR_ERR(ctx->jrdev);
}
@@ -2200,7 +2200,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
if (dma_mapping_error(ctx->jrdev, dma_addr)) {
dev_err(ctx->jrdev, "unable to map key, shared descriptors\n");
caam_jr_free(ctx->jrdev);
-@@ -3245,7 +3524,7 @@ static int caam_cra_init(struct crypto_t
+@@ -3248,7 +3527,7 @@ static int caam_cra_init(struct crypto_t
container_of(alg, struct caam_crypto_alg, crypto_alg);
struct caam_ctx *ctx = crypto_tfm_ctx(tfm);
@@ -2209,7 +2209,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
}
static int caam_aead_init(struct crypto_aead *tfm)
-@@ -3255,14 +3534,15 @@ static int caam_aead_init(struct crypto_
+@@ -3258,14 +3537,15 @@ static int caam_aead_init(struct crypto_
container_of(alg, struct caam_aead_alg, aead);
struct caam_ctx *ctx = crypto_aead_ctx(tfm);
@@ -2227,7 +2227,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
caam_jr_free(ctx->jrdev);
}
-@@ -3276,7 +3556,7 @@ static void caam_aead_exit(struct crypto
+@@ -3279,7 +3559,7 @@ static void caam_aead_exit(struct crypto
caam_exit_common(crypto_aead_ctx(tfm));
}
@@ -2236,7 +2236,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
{
struct caam_crypto_alg *t_alg, *n;
-@@ -3355,56 +3635,52 @@ static void caam_aead_alg_init(struct ca
+@@ -3358,56 +3638,52 @@ static void caam_aead_alg_init(struct ca
alg->exit = caam_aead_exit;
}
@@ -2326,7 +2326,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
md_limit = SHA256_DIGEST_SIZE;
for (i = 0; i < ARRAY_SIZE(driver_algs); i++) {
-@@ -3426,10 +3702,10 @@ static int __init caam_algapi_init(void)
+@@ -3429,10 +3705,10 @@ static int __init caam_algapi_init(void)
* Check support for AES modes not available
* on LP devices.
*/
@@ -2341,7 +2341,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
t_alg = caam_alg_alloc(alg);
if (IS_ERR(t_alg)) {
-@@ -3468,21 +3744,28 @@ static int __init caam_algapi_init(void)
+@@ -3471,21 +3747,28 @@ static int __init caam_algapi_init(void)
if (!aes_inst && (c1_alg_sel == OP_ALG_ALGSEL_AES))
continue;
@@ -2376,7 +2376,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
caam_aead_alg_init(t_alg);
-@@ -3502,10 +3785,3 @@ static int __init caam_algapi_init(void)
+@@ -3505,10 +3788,3 @@ static int __init caam_algapi_init(void)
return err;
}
@@ -15266,7 +15266,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
#endif /* __SG_SW_QM_H */
--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
-@@ -1241,6 +1241,14 @@ static int ipsec_esp(struct talitos_edes
+@@ -1247,6 +1247,14 @@ static int ipsec_esp(struct talitos_edes
ret = talitos_sg_map_ext(dev, areq->src, cryptlen, edesc, &desc->ptr[4],
sg_count, areq->assoclen, tbl_off, elen);