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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 13 Aug 2020 10:58:59 +1000 From: Herbert Xu <herbert@...dor.apana.org.au> To: Srujana Challa <schalla@...vell.com> Cc: davem@...emloft.net, netdev@...r.kernel.org, linux-crypto@...r.kernel.org, schandran@...vell.com, pathreya@...vell.com, sgoutham@...vell.com, lcherian@...vell.com, gakula@...vell.com, jerinj@...vell.com Subject: Re: [PATCH v2 3/3] drivers: crypto: add the Virtual Function driver for OcteonTX2 CPT On Fri, Aug 07, 2020 at 07:39:20PM +0530, Srujana Challa wrote: > > +static inline int is_any_alg_used(void) > +{ > + int i; > + > + for (i = 0; i < ARRAY_SIZE(otx2_cpt_skciphers); i++) > + if (refcount_read(&otx2_cpt_skciphers[i].base.cra_refcnt) != 1) > + return true; > + for (i = 0; i < ARRAY_SIZE(otx2_cpt_aeads); i++) > + if (refcount_read(&otx2_cpt_aeads[i].base.cra_refcnt) != 1) > + return true; > + return false; > +} This is racy as there is nothing stopping new users from coming in after you've finished the test. Cheers, -- Email: Herbert Xu <herbert@...dor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists