diff options
Diffstat (limited to 'debian/patches-rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch')
-rw-r--r-- | debian/patches-rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch | 50 |
1 files changed, 14 insertions, 36 deletions
diff --git a/debian/patches-rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch b/debian/patches-rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch index 43cd09b7b..03505afd6 100644 --- a/debian/patches-rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch +++ b/debian/patches-rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 21 Feb 2014 17:24:04 +0100 Subject: crypto: Reduce preempt disabled regions, more algos -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz Don Estabrook reported | kernel: WARNING: CPU: 2 PID: 858 at kernel/sched/core.c:2428 migrate_disable+0xed/0x100() @@ -39,8 +39,8 @@ Reported-by: Don Estabrook <don.estabrook@gmail.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- arch/x86/crypto/cast5_avx_glue.c | 21 +++++++++------------ - arch/x86/crypto/glue_helper.c | 31 ++++++++++++++++--------------- - 2 files changed, 25 insertions(+), 27 deletions(-) + arch/x86/crypto/glue_helper.c | 26 +++++++++++++++----------- + 2 files changed, 24 insertions(+), 23 deletions(-) --- a/arch/x86/crypto/cast5_avx_glue.c +++ b/arch/x86/crypto/cast5_avx_glue.c @@ -125,7 +125,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> err = skcipher_walk_done(&walk, 0); --- a/arch/x86/crypto/glue_helper.c +++ b/arch/x86/crypto/glue_helper.c -@@ -23,7 +23,7 @@ int glue_ecb_req_128bit(const struct com +@@ -24,7 +24,7 @@ int glue_ecb_req_128bit(const struct com void *ctx = crypto_skcipher_ctx(crypto_skcipher_reqtfm(req)); const unsigned int bsize = 128 / 8; struct skcipher_walk walk; @@ -134,7 +134,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> unsigned int nbytes; int err; -@@ -36,7 +36,7 @@ int glue_ecb_req_128bit(const struct com +@@ -37,7 +37,7 @@ int glue_ecb_req_128bit(const struct com unsigned int i; fpu_enabled = glue_fpu_begin(bsize, gctx->fpu_blocks_limit, @@ -143,7 +143,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> for (i = 0; i < gctx->num_funcs; i++) { func_bytes = bsize * gctx->funcs[i].num_blocks; -@@ -54,10 +54,9 @@ int glue_ecb_req_128bit(const struct com +@@ -55,10 +55,9 @@ int glue_ecb_req_128bit(const struct com if (nbytes < bsize) break; } @@ -155,7 +155,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return err; } EXPORT_SYMBOL_GPL(glue_ecb_req_128bit); -@@ -100,7 +99,7 @@ int glue_cbc_decrypt_req_128bit(const st +@@ -101,7 +100,7 @@ int glue_cbc_decrypt_req_128bit(const st void *ctx = crypto_skcipher_ctx(crypto_skcipher_reqtfm(req)); const unsigned int bsize = 128 / 8; struct skcipher_walk walk; @@ -164,7 +164,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> unsigned int nbytes; int err; -@@ -114,7 +113,7 @@ int glue_cbc_decrypt_req_128bit(const st +@@ -115,7 +114,7 @@ int glue_cbc_decrypt_req_128bit(const st u128 last_iv; fpu_enabled = glue_fpu_begin(bsize, gctx->fpu_blocks_limit, @@ -173,7 +173,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* Start of the last block. */ src += nbytes / bsize - 1; dst += nbytes / bsize - 1; -@@ -146,10 +145,10 @@ int glue_cbc_decrypt_req_128bit(const st +@@ -147,10 +146,10 @@ int glue_cbc_decrypt_req_128bit(const st done: u128_xor(dst, dst, (u128 *)walk.iv); *(u128 *)walk.iv = last_iv; @@ -185,7 +185,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return err; } EXPORT_SYMBOL_GPL(glue_cbc_decrypt_req_128bit); -@@ -160,7 +159,7 @@ int glue_ctr_req_128bit(const struct com +@@ -161,7 +160,7 @@ int glue_ctr_req_128bit(const struct com void *ctx = crypto_skcipher_ctx(crypto_skcipher_reqtfm(req)); const unsigned int bsize = 128 / 8; struct skcipher_walk walk; @@ -194,7 +194,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> unsigned int nbytes; int err; -@@ -174,7 +173,7 @@ int glue_ctr_req_128bit(const struct com +@@ -175,7 +174,7 @@ int glue_ctr_req_128bit(const struct com le128 ctrblk; fpu_enabled = glue_fpu_begin(bsize, gctx->fpu_blocks_limit, @@ -203,7 +203,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> be128_to_le128(&ctrblk, (be128 *)walk.iv); -@@ -198,11 +197,10 @@ int glue_ctr_req_128bit(const struct com +@@ -199,11 +198,10 @@ int glue_ctr_req_128bit(const struct com } le128_to_be128((be128 *)walk.iv, &ctrblk); @@ -216,24 +216,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (nbytes) { le128 ctrblk; u128 tmp; -@@ -263,7 +261,7 @@ int glue_xts_req_128bit(const struct com - { - const unsigned int bsize = 128 / 8; - struct skcipher_walk walk; -- bool fpu_enabled = false; -+ bool fpu_enabled; - unsigned int nbytes; - int err; - -@@ -274,21 +272,24 @@ int glue_xts_req_128bit(const struct com - - /* set minimum length to bsize, for tweak_fn */ - fpu_enabled = glue_fpu_begin(bsize, gctx->fpu_blocks_limit, -- &walk, fpu_enabled, -+ &walk, false, - nbytes < bsize ? bsize : nbytes); - - /* calculate first value of T */ +@@ -301,8 +299,14 @@ int glue_xts_req_128bit(const struct com tweak_fn(tweak_ctx, walk.iv, walk.iv); while (nbytes) { @@ -244,12 +227,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> + glue_fpu_end(fpu_enabled); + fpu_enabled = false; ++ err = skcipher_walk_done(&walk, nbytes); nbytes = walk.nbytes; } - -- glue_fpu_end(fpu_enabled); -- - return err; - } - EXPORT_SYMBOL_GPL(glue_xts_req_128bit); |