Re: [v3 RFC PATCH 1/2] crypto: ecdh: fix concurrency on ecdh_ctx

2017-07-19 Thread Herbert Xu
On Tue, Jul 18, 2017 at 03:52:19PM +0300, Tudor Ambarus wrote: > > I'm replacing a per-tfm shared secret with a per-request dynamically > allocated shared secret. The same for the public key, I'm replacing > a per-tfm public key with a per-request dynamically allocated public > key. No shared

Re: [v3 RFC PATCH 1/2] crypto: ecdh: fix concurrency on ecdh_ctx

2017-07-18 Thread Tudor Ambarus
Hi, Herbert, On 07/18/2017 08:50 AM, Herbert Xu wrote: On Wed, Jun 28, 2017 at 05:08:35PM +0300, Tudor Ambarus wrote: ecdh_ctx contained static allocated data for the shared secret, for the public and private key. When talking about shared secret and public key, they were doomed to

Re: [v3 RFC PATCH 1/2] crypto: ecdh: fix concurrency on ecdh_ctx

2017-07-17 Thread Herbert Xu
On Wed, Jun 28, 2017 at 05:08:35PM +0300, Tudor Ambarus wrote: > ecdh_ctx contained static allocated data for the shared secret, > for the public and private key. > > When talking about shared secret and public key, they were > doomed to concurrency issues because they could be shared by >

[v3 RFC PATCH 1/2] crypto: ecdh: fix concurrency on ecdh_ctx

2017-06-28 Thread Tudor Ambarus
ecdh_ctx contained static allocated data for the shared secret, for the public and private key. When talking about shared secret and public key, they were doomed to concurrency issues because they could be shared by multiple crypto requests. The requests were generating specific data to the same