lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPwn2JQh2ahvSwJiuMNSeoVe7czM1x=Pt5jyXQBVxpPb5PbU1A@mail.gmail.com>
Date:   Thu, 3 Jun 2021 22:06:56 +0800
From:   Hangbin Liu <liuhangbin@...il.com>
To:     "Jason A. Donenfeld" <Jason@...c4.com>
Cc:     Linux Crypto Mailing List <linux-crypto@...r.kernel.org>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        Netdev <netdev@...r.kernel.org>, stable <stable@...r.kernel.org>
Subject: Re: [PATCH] crypto: x86/curve25519 - fix cpu feature checking logic
 in mod_exit

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ