Hi Sebastian, On Tue, Sep 28, 2021 at 01:54:01PM +0200, Sebastian Andrzej Siewior wrote: > 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@xxxxxxxxxxxxx> The comment above the definition of migrate_disable() in include/linux/preempt.h claims that it is a temporary workaround. Is there a better way to do this that should be used instead? - Eric