Re: [PATCH] crypto: testmgr - Only disable migration in crypto_disable_simd_for_test()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>
> ---
>  crypto/testmgr.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux