summaryrefslogtreecommitdiff
path: root/firmware/ess
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2014-02-21 16:24:04 (GMT)
committerScott Wood <scottwood@freescale.com>2015-02-13 22:21:01 (GMT)
commit6129fd20374e61d65434583b79346d7f26a8d1ec (patch)
tree635a84158490a7c4bc9fe756600680957bbecddc /firmware/ess
parentdcb62ac2da39a382a3de334fa85680d4d72f52e8 (diff)
downloadlinux-fsl-qoriq-6129fd20374e61d65434583b79346d7f26a8d1ec.tar.xz
crypto: Reduce preempt disabled regions, more algos
Don Estabrook reported | kernel: WARNING: CPU: 2 PID: 858 at kernel/sched/core.c:2428 migrate_disable+0xed/0x100() | kernel: WARNING: CPU: 2 PID: 858 at kernel/sched/core.c:2462 migrate_enable+0x17b/0x200() | kernel: WARNING: CPU: 3 PID: 865 at kernel/sched/core.c:2428 migrate_disable+0xed/0x100() and his backtrace showed some crypto functions which looked fine. The problem is the following sequence: glue_xts_crypt_128bit() { blkcipher_walk_virt(); /* normal migrate_disable() */ glue_fpu_begin(); /* get atomic */ while (nbytes) { __glue_xts_crypt_128bit(); blkcipher_walk_done(); /* with nbytes = 0, migrate_enable() * while we are atomic */ }; glue_fpu_end() /* no longer atomic */ } and this is why the counter get out of sync and the warning is printed. The other problem is that we are non-preemptible between glue_fpu_begin() and glue_fpu_end() and the latency grows. To fix this, I shorten the FPU off region and ensure blkcipher_walk_done() is called with preemption enabled. This might hurt the performance because we now enable/disable the FPU state more often but we gain lower latency and the bug is gone. Cc: stable-rt@vger.kernel.org Reported-by: Don Estabrook <don.estabrook@gmail.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Diffstat (limited to 'firmware/ess')
0 files changed, 0 insertions, 0 deletions