Re: [PATCH] crypto: x86/curve25519 - fix cpu feature checking logic in mod_exit

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

 



On Thu, Jun 3, 2021 at 6:24 PM Jason A. Donenfeld <Jason@xxxxxxxxx> 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



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

  Powered by Linux