All of lore.kernel.org
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-crypto@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] crypto: testmgr - Only disable migration in crypto_disable_simd_for_test()
Date: Fri, 8 Oct 2021 20:24:01 +0800	[thread overview]
Message-ID: <20211008122401.GD31060@gondor.apana.org.au> (raw)
In-Reply-To: <20210928115401.441339-1-bigeasy@linutronix.de>

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

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

      parent reply	other threads:[~2021-10-08 12:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28 11:54 [PATCH] crypto: testmgr - Only disable migration in crypto_disable_simd_for_test() Sebastian Andrzej Siewior
2021-10-05 18:17 ` Eric Biggers
2021-10-07  9:42   ` Sebastian Andrzej Siewior
2021-10-07 17:53     ` Eric Biggers
2021-10-07 19:03       ` Sebastian Andrzej Siewior
2021-10-08 11:34         ` Herbert Xu
2021-10-08 12:24 ` Herbert Xu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211008122401.GD31060@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=linux-crypto@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.