All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hangbin Liu <liuhangbin@gmail.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Netdev <netdev@vger.kernel.org>, stable <stable@vger.kernel.org>
Subject: Re: [PATCH] crypto: x86/curve25519 - fix cpu feature checking logic in mod_exit
Date: Thu, 3 Jun 2021 22:06:56 +0800	[thread overview]
Message-ID: <CAPwn2JQh2ahvSwJiuMNSeoVe7czM1x=Pt5jyXQBVxpPb5PbU1A@mail.gmail.com> (raw)
In-Reply-To: <CAHmME9qXTYVLenPBfq2xpfq=DSJAsdUwSqP4Fzc=0YP6kW+QsQ@mail.gmail.com>

On Thu, Jun 3, 2021 at 6:24 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> >         if (IS_REACHABLE(CONFIG_CRYPTO_KPP) &&
> > -           (boot_cpu_has(X86_FEATURE_BMI2) || boot_cpu_has(X86_FEATURE_ADX)))
> > +           static_branch_likely(&curve25519_use_bmi2_adx))
> >                 crypto_unregister_kpp(&curve25519_alg);
> >  }
>
> Looks like the error is actually that the `||` should be a `&&`. But
> if you'd like to branch on that static key instead, that's fine.

Yes, the code would be shorter by checking the static key :)

Thanks
hangbin

  reply	other threads:[~2021-06-03 14:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03  5:53 [PATCH] crypto: x86/curve25519 - fix cpu feature checking logic in mod_exit Hangbin Liu
2021-06-03 10:24 ` Jason A. Donenfeld
2021-06-03 14:06   ` Hangbin Liu [this message]
2021-06-11  7:23 ` Herbert Xu
2021-06-11 10:07   ` Jason A. Donenfeld
2021-06-11 12:46     ` Herbert Xu

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='CAPwn2JQh2ahvSwJiuMNSeoVe7czM1x=Pt5jyXQBVxpPb5PbU1A@mail.gmail.com' \
    --to=liuhangbin@gmail.com \
    --cc=Jason@zx2c4.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /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.