Home
last modified time | relevance | path

Searched hist:"82 e269ad" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/crypto/
H A Dtestmgr.c82e269ad Tue Sep 28 06:54:01 CDT 2021 Sebastian Andrzej Siewior <bigeasy@linutronix.de> crypto: testmgr - Only disable migration in crypto_disable_simd_for_test()

crypto_disable_simd_for_test() disables preemption in order to receive a
stable per-CPU variable which it needs to modify in order to alter
crypto_simd_usable() results.

This can also be achived by migrate_disable() which forbidds CPU
migrations but allows the task to be preempted. The latter is important
for PREEMPT_RT since operation like skcipher_walk_first() may allocate
memory which must not happen with disabled preemption on PREEMPT_RT.

Use migrate_disable() in crypto_disable_simd_for_test() to achieve a
stable per-CPU pointer.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>