mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 10:01:39 -05:00
Merge tag 'v6.18-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto updates from Herbert Xu: "Drivers: - Add ciphertext hiding support to ccp - Add hashjoin, gather and UDMA data move features to hisilicon - Add lz4 and lz77_only to hisilicon - Add xilinx hwrng driver - Add ti driver with ecb/cbc aes support - Add ring buffer idle and command queue telemetry for GEN6 in qat Others: - Use rcu_dereference_all to stop false alarms in rhashtable - Fix CPU number wraparound in padata" * tag 'v6.18-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (78 commits) dt-bindings: rng: hisi-rng: convert to DT schema crypto: doc - Add explicit title heading to API docs hwrng: ks-sa - fix division by zero in ks_sa_rng_init KEYS: X.509: Fix Basic Constraints CA flag parsing crypto: anubis - simplify return statement in anubis_mod_init crypto: hisilicon/qm - set NULL to qm->debug.qm_diff_regs crypto: hisilicon/qm - clear all VF configurations in the hardware crypto: hisilicon - enable error reporting again crypto: hisilicon/qm - mask axi error before memory init crypto: hisilicon/qm - invalidate queues in use crypto: qat - Return pointer directly in adf_ctl_alloc_resources crypto: aspeed - Fix dma_unmap_sg() direction rhashtable: Use rcu_dereference_all and rcu_dereference_all_check crypto: comp - Use same definition of context alloc and free ops crypto: omap - convert from tasklet to BH workqueue crypto: qat - Replace kzalloc() + copy_from_user() with memdup_user() crypto: caam - double the entropy delay interval for retry padata: WQ_PERCPU added to alloc_workqueue users padata: replace use of system_unbound_wq with system_dfl_wq crypto: cryptd - WQ_PERCPU added to alloc_workqueue users ...
This commit is contained in:
@@ -54,8 +54,10 @@ static int crypto842_sdecompress(struct crypto_scomp *tfm,
|
||||
}
|
||||
|
||||
static struct scomp_alg scomp = {
|
||||
.alloc_ctx = crypto842_alloc_ctx,
|
||||
.free_ctx = crypto842_free_ctx,
|
||||
.streams = {
|
||||
.alloc_ctx = crypto842_alloc_ctx,
|
||||
.free_ctx = crypto842_free_ctx,
|
||||
},
|
||||
.compress = crypto842_scompress,
|
||||
.decompress = crypto842_sdecompress,
|
||||
.base = {
|
||||
|
||||
@@ -683,10 +683,7 @@ static struct crypto_alg anubis_alg = {
|
||||
|
||||
static int __init anubis_mod_init(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
ret = crypto_register_alg(&anubis_alg);
|
||||
return ret;
|
||||
return crypto_register_alg(&anubis_alg);
|
||||
}
|
||||
|
||||
static void __exit anubis_mod_fini(void)
|
||||
|
||||
@@ -610,11 +610,14 @@ int x509_process_extension(void *context, size_t hdrlen,
|
||||
/*
|
||||
* Get hold of the basicConstraints
|
||||
* v[1] is the encoding size
|
||||
* (Expect 0x2 or greater, making it 1 or more bytes)
|
||||
* (Expect 0x00 for empty SEQUENCE with CA:FALSE, or
|
||||
* 0x03 or greater for non-empty SEQUENCE)
|
||||
* v[2] is the encoding type
|
||||
* (Expect an ASN1_BOOL for the CA)
|
||||
* v[3] is the contents of the ASN1_BOOL
|
||||
* (Expect 1 if the CA is TRUE)
|
||||
* v[3] is the length of the ASN1_BOOL
|
||||
* (Expect 1 for a single byte boolean)
|
||||
* v[4] is the contents of the ASN1_BOOL
|
||||
* (Expect 0xFF if the CA is TRUE)
|
||||
* vlen should match the entire extension size
|
||||
*/
|
||||
if (v[0] != (ASN1_CONS_BIT | ASN1_SEQ))
|
||||
@@ -623,8 +626,13 @@ int x509_process_extension(void *context, size_t hdrlen,
|
||||
return -EBADMSG;
|
||||
if (v[1] != vlen - 2)
|
||||
return -EBADMSG;
|
||||
if (vlen >= 4 && v[1] != 0 && v[2] == ASN1_BOOL && v[3] == 1)
|
||||
/* Empty SEQUENCE means CA:FALSE (default value omitted per DER) */
|
||||
if (v[1] == 0)
|
||||
return 0;
|
||||
if (vlen >= 5 && v[2] == ASN1_BOOL && v[3] == 1 && v[4] == 0xFF)
|
||||
ctx->cert->pub->key_eflags |= 1 << KEY_EFLAG_CA;
|
||||
else
|
||||
return -EBADMSG;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1115,7 +1115,8 @@ static int __init cryptd_init(void)
|
||||
{
|
||||
int err;
|
||||
|
||||
cryptd_wq = alloc_workqueue("cryptd", WQ_MEM_RECLAIM | WQ_CPU_INTENSIVE,
|
||||
cryptd_wq = alloc_workqueue("cryptd",
|
||||
WQ_MEM_RECLAIM | WQ_CPU_INTENSIVE | WQ_PERCPU,
|
||||
1);
|
||||
if (!cryptd_wq)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -117,6 +117,7 @@ int jent_hash_time(void *hash_state, __u64 time, u8 *addtl,
|
||||
pr_warn_ratelimited("Unexpected digest size\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
kmsan_unpoison_memory(intermediary, sizeof(intermediary));
|
||||
|
||||
/*
|
||||
* This loop fills a buffer which is injected into the entropy pool.
|
||||
|
||||
@@ -68,8 +68,10 @@ static int lz4_sdecompress(struct crypto_scomp *tfm, const u8 *src,
|
||||
}
|
||||
|
||||
static struct scomp_alg scomp = {
|
||||
.alloc_ctx = lz4_alloc_ctx,
|
||||
.free_ctx = lz4_free_ctx,
|
||||
.streams = {
|
||||
.alloc_ctx = lz4_alloc_ctx,
|
||||
.free_ctx = lz4_free_ctx,
|
||||
},
|
||||
.compress = lz4_scompress,
|
||||
.decompress = lz4_sdecompress,
|
||||
.base = {
|
||||
|
||||
@@ -66,8 +66,10 @@ static int lz4hc_sdecompress(struct crypto_scomp *tfm, const u8 *src,
|
||||
}
|
||||
|
||||
static struct scomp_alg scomp = {
|
||||
.alloc_ctx = lz4hc_alloc_ctx,
|
||||
.free_ctx = lz4hc_free_ctx,
|
||||
.streams = {
|
||||
.alloc_ctx = lz4hc_alloc_ctx,
|
||||
.free_ctx = lz4hc_free_ctx,
|
||||
},
|
||||
.compress = lz4hc_scompress,
|
||||
.decompress = lz4hc_sdecompress,
|
||||
.base = {
|
||||
|
||||
@@ -70,8 +70,10 @@ static int lzorle_sdecompress(struct crypto_scomp *tfm, const u8 *src,
|
||||
}
|
||||
|
||||
static struct scomp_alg scomp = {
|
||||
.alloc_ctx = lzorle_alloc_ctx,
|
||||
.free_ctx = lzorle_free_ctx,
|
||||
.streams = {
|
||||
.alloc_ctx = lzorle_alloc_ctx,
|
||||
.free_ctx = lzorle_free_ctx,
|
||||
},
|
||||
.compress = lzorle_scompress,
|
||||
.decompress = lzorle_sdecompress,
|
||||
.base = {
|
||||
|
||||
@@ -70,8 +70,10 @@ static int lzo_sdecompress(struct crypto_scomp *tfm, const u8 *src,
|
||||
}
|
||||
|
||||
static struct scomp_alg scomp = {
|
||||
.alloc_ctx = lzo_alloc_ctx,
|
||||
.free_ctx = lzo_free_ctx,
|
||||
.streams = {
|
||||
.alloc_ctx = lzo_alloc_ctx,
|
||||
.free_ctx = lzo_free_ctx,
|
||||
},
|
||||
.compress = lzo_scompress,
|
||||
.decompress = lzo_sdecompress,
|
||||
.base = {
|
||||
|
||||
Reference in New Issue
Block a user