Re: [PATCH 3/5] KEYS: encrypted: sanitize all key material

2017-04-24 Thread David Howells
Eric Biggers wrote: > It's not actually needed because it's impossible for the compiler to optimize > away the memset(). memzero_explicit() is only needed on stack data. Okay, also reasonable. David

Re: [PATCH 3/5] KEYS: encrypted: sanitize all key material

2017-04-21 Thread Eric Biggers
On Fri, Apr 21, 2017 at 03:31:08PM +0100, David Howells wrote: > Eric Biggers wrote: > > > - memzero_explicit(epayload->decrypted_data, epayload->decrypted_datalen); > > - kfree(key->payload.data[0]); > > + kzfree(key->payload.data[0]); > > Should kzfree() be using memzero_explicit() rathe

Re: [PATCH 3/5] KEYS: encrypted: sanitize all key material

2017-04-21 Thread David Howells
Eric Biggers wrote: > - memzero_explicit(epayload->decrypted_data, epayload->decrypted_datalen); > - kfree(key->payload.data[0]); > + kzfree(key->payload.data[0]); Should kzfree() be using memzero_explicit() rather than memset()? David