diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-19 14:15:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-19 14:15:45 -0500 |
commit | 384b0dc4c84eb0ffe04589694a31a06226d61f7a (patch) | |
tree | b60236afef24712752b2560d92b4e5578a95e071 /drivers | |
parent | 6741897602aabae6542631cafbd2616943acc735 (diff) | |
parent | a8348bca2944d397a528772f5c0ccb47a8b58af4 (diff) |
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu:
"This fixes the following issues:
- Compiler warning in caam driver that was the last one remaining
- Do not register aes-xts in caam drivers on unsupported platforms
- Regression in algif_hash interface that may lead to an oops"
* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: algif_hash - Fix NULL hash crash with shash
crypto: caam - fix type mismatch warning
crypto: caam - do not register AES-XTS mode on LP units
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/crypto/caam/caamalg.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c index 156aad167cd6..954a64c7757b 100644 --- a/drivers/crypto/caam/caamalg.c +++ b/drivers/crypto/caam/caamalg.c | |||
@@ -137,7 +137,7 @@ static void dbg_dump_sg(const char *level, const char *prefix_str, | |||
137 | } | 137 | } |
138 | 138 | ||
139 | buf = it_page + it->offset; | 139 | buf = it_page + it->offset; |
140 | len = min(tlen, it->length); | 140 | len = min_t(size_t, tlen, it->length); |
141 | print_hex_dump(level, prefix_str, prefix_type, rowsize, | 141 | print_hex_dump(level, prefix_str, prefix_type, rowsize, |
142 | groupsize, buf, len, ascii); | 142 | groupsize, buf, len, ascii); |
143 | tlen -= len; | 143 | tlen -= len; |
@@ -4583,6 +4583,15 @@ static int __init caam_algapi_init(void) | |||
4583 | if (!aes_inst && (alg_sel == OP_ALG_ALGSEL_AES)) | 4583 | if (!aes_inst && (alg_sel == OP_ALG_ALGSEL_AES)) |
4584 | continue; | 4584 | continue; |
4585 | 4585 | ||
4586 | /* | ||
4587 | * Check support for AES modes not available | ||
4588 | * on LP devices. | ||
4589 | */ | ||
4590 | if ((cha_vid & CHA_ID_LS_AES_MASK) == CHA_ID_LS_AES_LP) | ||
4591 | if ((alg->class1_alg_type & OP_ALG_AAI_MASK) == | ||
4592 | OP_ALG_AAI_XTS) | ||
4593 | continue; | ||
4594 | |||
4586 | t_alg = caam_alg_alloc(alg); | 4595 | t_alg = caam_alg_alloc(alg); |
4587 | if (IS_ERR(t_alg)) { | 4596 | if (IS_ERR(t_alg)) { |
4588 | err = PTR_ERR(t_alg); | 4597 | err = PTR_ERR(t_alg); |