Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: caam - fix CAAM io mem access in blob_gen

IO memory access has to be done with accessors defined in caam/regs.h
as there are little-endian architectures with a big-endian CAAM unit.

Fixes: 6a83830f649a ("crypto: caam - warn if blob_gen key is insecure")
Signed-off-by: Nikolaus Voss <nikolaus.voss@haag-streit.com>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Nikolaus Voss and committed by
Herbert Xu
a2352998 1b929c02

+1 -1
+1 -1
drivers/crypto/caam/blob_gen.c
··· 104 104 } 105 105 106 106 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)); 108 108 if (moo != CSTA_MOO_SECURE && moo != CSTA_MOO_TRUSTED) 109 109 dev_warn(jrdev, 110 110 "using insecure test key, enable HAB to use unique device key!\n");