Skip to content

Commit 90bc52c

Browse files
committed
Merge tag 'v6.2-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu: "This fixes a CFI crash in arm64/sm4 as well as a regression in the caam driver" * tag 'v6.2-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: arm64/sm4 - fix possible crash with CFI enabled crypto: caam - fix CAAM io mem access in blob_gen
2 parents 1f5abbd + 736f886 commit 90bc52c

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

arch/arm64/crypto/sm4-ce-ccm-core.S

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99

1010
#include <linux/linkage.h>
11+
#include <linux/cfi_types.h>
1112
#include <asm/assembler.h>
1213
#include "sm4-ce-asm.h"
1314

@@ -104,7 +105,7 @@ SYM_FUNC_START(sm4_ce_ccm_final)
104105
SYM_FUNC_END(sm4_ce_ccm_final)
105106

106107
.align 3
107-
SYM_FUNC_START(sm4_ce_ccm_enc)
108+
SYM_TYPED_FUNC_START(sm4_ce_ccm_enc)
108109
/* input:
109110
* x0: round key array, CTX
110111
* x1: dst
@@ -216,7 +217,7 @@ SYM_FUNC_START(sm4_ce_ccm_enc)
216217
SYM_FUNC_END(sm4_ce_ccm_enc)
217218

218219
.align 3
219-
SYM_FUNC_START(sm4_ce_ccm_dec)
220+
SYM_TYPED_FUNC_START(sm4_ce_ccm_dec)
220221
/* input:
221222
* x0: round key array, CTX
222223
* x1: dst

arch/arm64/crypto/sm4-ce-gcm-core.S

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
#include <linux/linkage.h>
12+
#include <linux/cfi_types.h>
1213
#include <asm/assembler.h>
1314
#include "sm4-ce-asm.h"
1415

@@ -370,7 +371,7 @@ SYM_FUNC_START(pmull_ghash_update)
370371
SYM_FUNC_END(pmull_ghash_update)
371372

372373
.align 3
373-
SYM_FUNC_START(sm4_ce_pmull_gcm_enc)
374+
SYM_TYPED_FUNC_START(sm4_ce_pmull_gcm_enc)
374375
/* input:
375376
* x0: round key array, CTX
376377
* x1: dst
@@ -581,7 +582,7 @@ SYM_FUNC_END(sm4_ce_pmull_gcm_enc)
581582
#define RH3 v20
582583

583584
.align 3
584-
SYM_FUNC_START(sm4_ce_pmull_gcm_dec)
585+
SYM_TYPED_FUNC_START(sm4_ce_pmull_gcm_dec)
585586
/* input:
586587
* x0: round key array, CTX
587588
* x1: dst

drivers/crypto/caam/blob_gen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ int caam_process_blob(struct caam_blob_priv *priv,
104104
}
105105

106106
ctrlpriv = dev_get_drvdata(jrdev->parent);
107-
moo = FIELD_GET(CSTA_MOO, ioread32(&ctrlpriv->ctrl->perfmon.status));
107+
moo = FIELD_GET(CSTA_MOO, rd_reg32(&ctrlpriv->ctrl->perfmon.status));
108108
if (moo != CSTA_MOO_SECURE && moo != CSTA_MOO_TRUSTED)
109109
dev_warn(jrdev,
110110
"using insecure test key, enable HAB to use unique device key!\n");

0 commit comments

Comments
 (0)