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.

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

+20 -8
+10 -7
crypto/algif_hash.c
··· 214 214 215 215 ahash_request_set_crypt(&ctx->req, NULL, ctx->result, 0); 216 216 217 - if (ctx->more) { 217 + if (!result) { 218 + err = af_alg_wait_for_completion( 219 + crypto_ahash_init(&ctx->req), 220 + &ctx->completion); 221 + if (err) 222 + goto unlock; 223 + } 224 + 225 + if (!result || ctx->more) { 218 226 ctx->more = 0; 219 227 err = af_alg_wait_for_completion(crypto_ahash_final(&ctx->req), 220 228 &ctx->completion); 221 229 if (err) 222 230 goto unlock; 223 - } else if (!result) { 224 - err = af_alg_wait_for_completion( 225 - crypto_ahash_digest(&ctx->req), 226 - &ctx->completion); 227 231 } 228 232 229 233 err = memcpy_to_msg(msg, ctx->result, len); 230 234 231 - hash_free_result(sk, ctx); 232 - 233 235 unlock: 236 + hash_free_result(sk, ctx); 234 237 release_sock(sk); 235 238 236 239 return err ?: len;
+10 -1
drivers/crypto/caam/caamalg.c
··· 137 137 } 138 138 139 139 buf = it_page + it->offset; 140 - len = min(tlen, it->length); 140 + len = min_t(size_t, tlen, it->length); 141 141 print_hex_dump(level, prefix_str, prefix_type, rowsize, 142 142 groupsize, buf, len, ascii); 143 143 tlen -= len; ··· 4581 4581 4582 4582 /* Skip AES algorithms if not supported by device */ 4583 4583 if (!aes_inst && (alg_sel == OP_ALG_ALGSEL_AES)) 4584 + continue; 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) 4584 4593 continue; 4585 4594 4586 4595 t_alg = caam_alg_alloc(alg);