Re: [Qemu-devel] [PATCH for-2.9 v2] virtio-crypto: zeroize the key material before free

2016-12-11 Thread Gonglei (Arei)
> -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Sunday, December 11, 2016 10:51 AM > To: Eric Blake > Cc: Gonglei (Arei); qemu-devel@nongnu.org; stefa...@redhat.com > Subject: Re: [PATCH for-2.9 v2] virtio-crypto: zeroize the key material before > free >

Re: [Qemu-devel] [PATCH for-2.9 v2] virtio-crypto: zeroize the key material before free

2016-12-10 Thread Michael S. Tsirkin
On Thu, Dec 08, 2016 at 09:20:07AM -0600, Eric Blake wrote: > On 12/07/2016 08:33 PM, Gonglei (Arei) wrote: > > >> Sensitive information is sometimes also held in mlocked pages to prevent > >> it being swapped to disk, but qemu in general is not currently taking > >> that level of precaution (see

Re: [Qemu-devel] [PATCH for-2.9 v2] virtio-crypto: zeroize the key material before free

2016-12-10 Thread Max Reitz
On 10.12.2016 03:58, Gonglei (Arei) wrote: >> >> >> On 09.12.2016 02:42, Gonglei (Arei) wrote: >>> Hi, >>> >>>> >>>> Subject: Re: [Qemu-devel] [PATCH for-2.9 v2] virtio-crypto: zeroize the key >>>> material before free >&

Re: [Qemu-devel] [PATCH for-2.9 v2] virtio-crypto: zeroize the key material before free

2016-12-09 Thread Gonglei (Arei)
> > > On 09.12.2016 02:42, Gonglei (Arei) wrote: > > Hi, > > > >> > >> Subject: Re: [Qemu-devel] [PATCH for-2.9 v2] virtio-crypto: zeroize the key > >> material before free > >> > >> On 08.12.2016 16:23, Eric Blake wrote: > &

Re: [Qemu-devel] [PATCH for-2.9 v2] virtio-crypto: zeroize the key material before free

2016-12-09 Thread Max Reitz
On 09.12.2016 02:42, Gonglei (Arei) wrote: > Hi, > >> >> Subject: Re: [Qemu-devel] [PATCH for-2.9 v2] virtio-crypto: zeroize the key >> material before free >> >> On 08.12.2016 16:23, Eric Blake wrote: >>> On 12/07/2016 08:28 PM, Gonglei (Arei) wrote:

Re: [Qemu-devel] [PATCH for-2.9 v2] virtio-crypto: zeroize the key material before free

2016-12-08 Thread Gonglei (Arei)
Hi, > > Subject: Re: [Qemu-devel] [PATCH for-2.9 v2] virtio-crypto: zeroize the key > material before free > > On 08.12.2016 16:23, Eric Blake wrote: > > On 12/07/2016 08:28 PM, Gonglei (Arei) wrote: > > > >>> As far as I'm aware, other projects usuall

Re: [Qemu-devel] [PATCH for-2.9 v2] virtio-crypto: zeroize the key material before free

2016-12-08 Thread Max Reitz
On 08.12.2016 16:23, Eric Blake wrote: > On 12/07/2016 08:28 PM, Gonglei (Arei) wrote: > >>> As far as I'm aware, other projects usually have a special memset >>> variation for doing this. That is because compilers may choose to >>> "optimize" memset(p, ...) + free(p) to just the free(p). Having

Re: [Qemu-devel] [PATCH for-2.9 v2] virtio-crypto: zeroize the key material before free

2016-12-08 Thread Eric Blake
On 12/07/2016 08:28 PM, Gonglei (Arei) wrote: >> As far as I'm aware, other projects usually have a special memset >> variation for doing this. That is because compilers may choose to >> "optimize" memset(p, ...) + free(p) to just the free(p). Having a > > Actually, I googled this, but I didn't

Re: [Qemu-devel] [PATCH for-2.9 v2] virtio-crypto: zeroize the key material before free

2016-12-08 Thread Eric Blake
On 12/07/2016 08:33 PM, Gonglei (Arei) wrote: >> Sensitive information is sometimes also held in mlocked pages to prevent >> it being swapped to disk, but qemu in general is not currently taking >> that level of precaution (see also commit 8813800b). >> >>> >>> Let's zeroize the memory of

Re: [Qemu-devel] [PATCH for-2.9 v2] virtio-crypto: zeroize the key material before free

2016-12-07 Thread Gonglei (Arei)
> > From: Eric Blake [mailto:ebl...@redhat.com] > Sent: Wednesday, December 07, 2016 11:22 PM > To: Gonglei (Arei); qemu-devel@nongnu.org > Cc: m...@redhat.com; stefa...@redhat.com > Subject: Re: [PATCH for-2.9 v2] virtio-crypto: zeroize the key material before > free > > On 12/06/2016 08:29 PM,

Re: [Qemu-devel] [PATCH for-2.9 v2] virtio-crypto: zeroize the key material before free

2016-12-07 Thread Gonglei (Arei)
Hi Max, > > On 07.12.2016 03:29, Gonglei wrote: > > Common practice with sensitive information (key material, passwords, > > etc). Prevents sensitive information from being exposed by accident later in > > coredumps, memory disclosure bugs when heap memory is reused, etc. > > > > Sensitive

Re: [Qemu-devel] [PATCH for-2.9 v2] virtio-crypto: zeroize the key material before free

2016-12-07 Thread Max Reitz
On 07.12.2016 03:29, Gonglei wrote: > Common practice with sensitive information (key material, passwords, > etc). Prevents sensitive information from being exposed by accident later in > coredumps, memory disclosure bugs when heap memory is reused, etc. > > Sensitive information is sometimes

Re: [Qemu-devel] [PATCH for-2.9 v2] virtio-crypto: zeroize the key material before free

2016-12-07 Thread Eric Blake
On 12/06/2016 08:29 PM, Gonglei wrote: > Common practice with sensitive information (key material, passwords, > etc). Prevents sensitive information from being exposed by accident later in > coredumps, memory disclosure bugs when heap memory is reused, etc. > > Sensitive information is sometimes

[Qemu-devel] [PATCH for-2.9 v2] virtio-crypto: zeroize the key material before free

2016-12-06 Thread Gonglei
Common practice with sensitive information (key material, passwords, etc). Prevents sensitive information from being exposed by accident later in coredumps, memory disclosure bugs when heap memory is reused, etc. Sensitive information is sometimes also held in mlocked pages to prevent it being