Re: crypto: nx - Fix reentrancy bugs

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

 



On Tue, Jul 07, 2015 at 03:48:37PM -0300, Leonidas S. Barbosa wrote:
> On Tue, Jul 07, 2015 at 05:30:25PM +0800, Herbert Xu wrote:
> > The crypto API allows a single transform to be used by multiple
> > threads simultaneously.  For example, IPsec will use a single tfm
> > to process packets for a given SA.  As packets may arrive on
> > multiple CPUs that tfm must be reentrant.
> > 
> > The nx driver does try to deal with this by using a spin lock.
> > Unfortunately only the basic AES/CBC/ECB algorithms do this in
> > the correct way.
> > 
> > The symptom of these bugs may range from the generation of incorrect
> > output to memory corruption.
> 
> Is this related with the issue in CTR ouput test#4 too?

I don't think so because during the test there should only be a
single user.  But I'll test it out today just in case.

PS it would appear that you can make this completely reentrant
by moving all the data from the tfm into the reqeust.  Could you
work on this and remove the spinlock completely?

Thanks,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux