Thread (4 messages) flat view 4 messages, 3 authors, 2021-06-11

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

From: Hangbin Liu <hidden>
Date: 2021-06-03 14:07:12
Also in: linux-crypto, stable

On Thu, Jun 3, 2021 at 6:24 PM Jason A. Donenfeld [off-list ref] wrote:
quoted
        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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help