Merge tag 'v6.4-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull crypto fixes from Herbert Xu:

- A long-standing bug in crypto_engine

- A buggy but harmless check in the sun8i-ss driver

- A regression in the CRYPTO_USER interface

* tag 'v6.4-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: api - Fix CRYPTO_USER checks for report function
crypto: engine - fix crypto_queue backlog handling
crypto: sun8i-ss - Fix a test in sun8i_ss_setup_ivs()

+1 -1
crypto/acompress.c
··· 125 125 #ifdef CONFIG_PROC_FS 126 126 .show = crypto_acomp_show, 127 127 #endif 128 - #ifdef CONFIG_CRYPTO_USER 128 + #if IS_ENABLED(CONFIG_CRYPTO_USER) 129 129 .report = crypto_acomp_report, 130 130 #endif 131 131 #ifdef CONFIG_CRYPTO_STATS
+1 -1
crypto/aead.c
··· 242 242 #ifdef CONFIG_PROC_FS 243 243 .show = crypto_aead_show, 244 244 #endif 245 - #ifdef CONFIG_CRYPTO_USER 245 + #if IS_ENABLED(CONFIG_CRYPTO_USER) 246 246 .report = crypto_aead_report, 247 247 #endif 248 248 #ifdef CONFIG_CRYPTO_STATS
+1 -1
crypto/ahash.c
··· 509 509 #ifdef CONFIG_PROC_FS 510 510 .show = crypto_ahash_show, 511 511 #endif 512 - #ifdef CONFIG_CRYPTO_USER 512 + #if IS_ENABLED(CONFIG_CRYPTO_USER) 513 513 .report = crypto_ahash_report, 514 514 #endif 515 515 #ifdef CONFIG_CRYPTO_STATS
+1 -1
crypto/akcipher.c
··· 98 98 #ifdef CONFIG_PROC_FS 99 99 .show = crypto_akcipher_show, 100 100 #endif 101 - #ifdef CONFIG_CRYPTO_USER 101 + #if IS_ENABLED(CONFIG_CRYPTO_USER) 102 102 .report = crypto_akcipher_report, 103 103 #endif 104 104 #ifdef CONFIG_CRYPTO_STATS
+3
crypto/algapi.c
··· 961 961 void crypto_enqueue_request_head(struct crypto_queue *queue, 962 962 struct crypto_async_request *request) 963 963 { 964 + if (unlikely(queue->qlen >= queue->max_qlen)) 965 + queue->backlog = queue->backlog->prev; 966 + 964 967 queue->qlen++; 965 968 list_add(&request->list, &queue->list); 966 969 }
+3 -3
crypto/crypto_engine.c
··· 129 129 if (!engine->retry_support) 130 130 engine->cur_req = async_req; 131 131 132 - if (backlog) 133 - crypto_request_complete(backlog, -EINPROGRESS); 134 - 135 132 if (engine->busy) 136 133 was_busy = true; 137 134 else ··· 214 217 crypto_request_complete(async_req, ret); 215 218 216 219 retry: 220 + if (backlog) 221 + crypto_request_complete(backlog, -EINPROGRESS); 222 + 217 223 /* If retry mechanism is supported, send new requests to engine */ 218 224 if (engine->retry_support) { 219 225 spin_lock_irqsave(&engine->queue_lock, flags);
+1 -1
crypto/kpp.c
··· 96 96 #ifdef CONFIG_PROC_FS 97 97 .show = crypto_kpp_show, 98 98 #endif 99 - #ifdef CONFIG_CRYPTO_USER 99 + #if IS_ENABLED(CONFIG_CRYPTO_USER) 100 100 .report = crypto_kpp_report, 101 101 #endif 102 102 #ifdef CONFIG_CRYPTO_STATS
+1 -1
crypto/rng.c
··· 118 118 #ifdef CONFIG_PROC_FS 119 119 .show = crypto_rng_show, 120 120 #endif 121 - #ifdef CONFIG_CRYPTO_USER 121 + #if IS_ENABLED(CONFIG_CRYPTO_USER) 122 122 .report = crypto_rng_report, 123 123 #endif 124 124 #ifdef CONFIG_CRYPTO_STATS
+1 -1
crypto/scompress.c
··· 240 240 #ifdef CONFIG_PROC_FS 241 241 .show = crypto_scomp_show, 242 242 #endif 243 - #ifdef CONFIG_CRYPTO_USER 243 + #if IS_ENABLED(CONFIG_CRYPTO_USER) 244 244 .report = crypto_scomp_report, 245 245 #endif 246 246 #ifdef CONFIG_CRYPTO_STATS
+1 -1
crypto/shash.c
··· 548 548 #ifdef CONFIG_PROC_FS 549 549 .show = crypto_shash_show, 550 550 #endif 551 - #ifdef CONFIG_CRYPTO_USER 551 + #if IS_ENABLED(CONFIG_CRYPTO_USER) 552 552 .report = crypto_shash_report, 553 553 #endif 554 554 #ifdef CONFIG_CRYPTO_STATS
+1 -1
crypto/skcipher.c
··· 776 776 #ifdef CONFIG_PROC_FS 777 777 .show = crypto_skcipher_show, 778 778 #endif 779 - #ifdef CONFIG_CRYPTO_USER 779 + #if IS_ENABLED(CONFIG_CRYPTO_USER) 780 780 .report = crypto_skcipher_report, 781 781 #endif 782 782 #ifdef CONFIG_CRYPTO_STATS
+1 -1
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c
··· 151 151 } 152 152 rctx->p_iv[i] = a; 153 153 /* we need to setup all others IVs only in the decrypt way */ 154 - if (rctx->op_dir & SS_ENCRYPTION) 154 + if (rctx->op_dir == SS_ENCRYPTION) 155 155 return 0; 156 156 todo = min(len, sg_dma_len(sg)); 157 157 len -= todo;