Re: memset() in crypto code?

2014-10-08 Thread Daniel Borkmann
On 10/08/2014 04:30 AM, Sandy Harris wrote: I have started a thread about this on the gcc help mailing list https://gcc.gnu.org/ml/gcc-help/2014-10/msg00047.html Great, perhaps you want to pass a patch proposal to gcc folks? We might consider replacinging memzero_explicit with memset_s()

Re: memset() in crypto code?

2014-10-07 Thread Sandy Harris
I have started a thread about this on the gcc help mailing list https://gcc.gnu.org/ml/gcc-help/2014-10/msg00047.html We might consider replacinging memzero_explicit with memset_s() since that is in the C!! standard, albeit I think as optional. IBM, Apple, NetBSD, ... have that.

Re: memset() in crypto code?

2014-10-06 Thread Jason Cooper
On Sat, Oct 04, 2014 at 11:09:40PM -0400, Sandy Harris wrote: There was recently a patch to the random driver to replace memset() because, according to the submitter, gcc sometimes optimises memset() away which might leave data unnecessarily exposed. The solution suggested was a function

Re: memset() in crypto code?

2014-10-06 Thread Sandy Harris
On Mon, Oct 6, 2014 at 1:44 PM, Jason Cooper ja...@lakedaemon.net wrote: On Sat, Oct 04, 2014 at 11:09:40PM -0400, Sandy Harris wrote: There was recently a patch to the random driver to replace memset() because, according to the submitter, gcc sometimes optimises memset() away which might

Re: memset() in crypto code?

2014-10-06 Thread Jason Cooper
On Mon, Oct 06, 2014 at 01:59:06PM -0400, Sandy Harris wrote: On Mon, Oct 6, 2014 at 1:44 PM, Jason Cooper ja...@lakedaemon.net wrote: On Sat, Oct 04, 2014 at 11:09:40PM -0400, Sandy Harris wrote: There was recently a patch to the random driver to replace memset() because, according to

Re: memset() in crypto code?

2014-10-06 Thread Sandy Harris
On Mon, Oct 6, 2014 at 1:44 PM, Jason Cooper ja...@lakedaemon.net wrote: On Sat, Oct 04, 2014 at 11:09:40PM -0400, Sandy Harris wrote: There was recently a patch to the random driver to replace memset() because, according to the submitter, gcc sometimes optimises memset() away ...

Re: memset() in crypto code?

2014-10-06 Thread Daniel Borkmann
On 10/06/2014 08:52 PM, Sandy Harris wrote: On Mon, Oct 6, 2014 at 1:44 PM, Jason Cooper ja...@lakedaemon.net wrote: On Sat, Oct 04, 2014 at 11:09:40PM -0400, Sandy Harris wrote: ... There was recently a patch to the random driver to replace memset() because, according to the submitter, gcc

Re: memset() in crypto code?

2014-10-05 Thread Daniel Borkmann
Hi Sandy, On 10/05/2014 05:09 AM, Sandy Harris wrote: There was recently a patch to the random driver to replace memset() because, according to the submitter, gcc sometimes optimises memset() away which might leave data unnecessarily exposed. The solution suggested was a function called

memset() in crypto code?

2014-10-04 Thread Sandy Harris
There was recently a patch to the random driver to replace memset() because, according to the submitter, gcc sometimes optimises memset() away which might leave data unnecessarily exposed. The solution suggested was a function called memzero_explicit(). There was a fair bit of discussion and the