summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Cornelius <steve.cornelius@freescale.com>2013-08-02 14:19:27 -0700
committerVictoria Milhoan <vicki.milhoan@freescale.com>2014-11-07 14:54:43 -0700
commit1fc34e85a370b3f6702a1e5bc94a2af43fd97420 (patch)
tree831ed5bd09c92287737a0766a6dc435866ff4311
parent1b36873ca001180d942e785aa229071d4288c2e7 (diff)
MLK-9710-15 Correct size of padded key buffers
Correct size of padded key buffers for the Secure Memory test module. Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com> (cherry picked from commit da77cf5583c064deefd09a5e91851ab4398701a0)
-rw-r--r--drivers/crypto/caam/sm_test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/crypto/caam/sm_test.c b/drivers/crypto/caam/sm_test.c
index 3af923777538..e0774d1fa52b 100644
--- a/drivers/crypto/caam/sm_test.c
+++ b/drivers/crypto/caam/sm_test.c
@@ -90,8 +90,10 @@ int caam_sm_example_init(struct platform_device *pdev)
u32 unit, units;
int rtnval = 0;
u8 clrkey8[8], clrkey16[16], clrkey24[24], clrkey32[32];
- u8 blkkey8[16], blkkey16[16], blkkey24[24], blkkey32[32];
- u8 rstkey8[16], rstkey16[16], rstkey24[24], rstkey32[32];
+ u8 blkkey8[AES_BLOCK_PAD(8)], blkkey16[AES_BLOCK_PAD(16)];
+ u8 blkkey24[AES_BLOCK_PAD(24)], blkkey32[AES_BLOCK_PAD(32)];
+ u8 rstkey8[AES_BLOCK_PAD(8)], rstkey16[AES_BLOCK_PAD(16)];
+ u8 rstkey24[AES_BLOCK_PAD(24)], rstkey32[AES_BLOCK_PAD(32)];
u8 __iomem *blob8, *blob16, *blob24, *blob32;
u32 keyslot8, keyslot16, keyslot24, keyslot32 = 0;