Re: dynamic memory automatically zero'd

2010-08-08 Thread Stefan Schulze Frielinghaus
On Sa, 2010-08-07 at 09:43 -0700, Ulrich Drepper wrote: [...] > Anonymous memory returned by mmap must be cleared. Memory provided by > sbrk can be cleared and it is on Linux. I found a couple of messages at the LKML where they talk about zeroing memory. For example this one: http://marc.info/?l

Re: dynamic memory automatically zero'd

2010-08-07 Thread Gregory Hosler
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/08/2010 12:43 AM, Ulrich Drepper wrote: > On 08/07/2010 06:59 AM, Robert Nichols wrote: >> Pages newly allocated by the kernel will be zeroed. They begin life as >> a copy-on-write mmap() of /dev/zero. > > Mostly true although /dev/zero hasn't

Re: dynamic memory automatically zero'd

2010-08-07 Thread Ulrich Drepper
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/07/2010 06:59 AM, Robert Nichols wrote: > Pages newly allocated by the kernel will be zeroed. They begin life as > a copy-on-write mmap() of /dev/zero. Mostly true although /dev/zero hasn't played a role in this for many years now. Anonymous m

Re: dynamic memory automatically zero'd

2010-08-07 Thread Robert Nichols
On 08/07/2010 03:44 AM, Stefan Schulze Frielinghaus wrote: > On Fr, 2010-08-06 at 09:37 -0700, Rick Stevens wrote: >> On 08/06/2010 07:44 AM, Stefan Schulze Frielinghaus wrote: >>> Hi all, >>> >>> if you allocate memory, e.g. via malloc(3), then it is automatically set >>> to zero. This is actually

Re: dynamic memory automatically zero'd

2010-08-07 Thread Stefan Schulze Frielinghaus
On Fr, 2010-08-06 at 09:37 -0700, Rick Stevens wrote: > On 08/06/2010 07:44 AM, Stefan Schulze Frielinghaus wrote: > > Hi all, > > > > if you allocate memory, e.g. via malloc(3), then it is automatically set > > to zero. This is actually a security feature quite common nowadays. I > > would like to

Re: dynamic memory automatically zero'd

2010-08-06 Thread Rick Stevens
On 08/06/2010 07:44 AM, Stefan Schulze Frielinghaus wrote: > Hi all, > > if you allocate memory, e.g. via malloc(3), then it is automatically set > to zero. This is actually a security feature quite common nowadays. I > would like to know when this feature has made it into Fedora or in RHEL. > Is t

Re: dynamic memory automatically zero'd

2010-08-06 Thread Alan Evans
On Fri, Aug 6, 2010 at 7:44 AM, Stefan Schulze Frielinghaus wrote: > if you allocate memory, e.g. via malloc(3), then it is automatically set > to zero. This is actually a security feature quite common nowadays. I > would like to know when this feature has made it into Fedora or in RHEL. > Is this