Re: Zeroed pages returned for heap

From: Peter Staubach (staubach_at_redhat.com)
Date: 06/07/05

  • Next message: Ingo Molnar: "Re: [patch] Real-Time Preemption, -RT-2.6.12-rc6-V0.7.47-20"
    Date:	Tue, 07 Jun 2005 11:57:06 -0400
    To: "Tomar, Nagendra" <nagendra_tomar@adaptec.com>
    
    

    Nagendra Singh Tomar wrote:

    >Hi all,
    > The short version first.
    >Is it OK for an application (a C library implementing malloc/calloc is
    >also an application) to assume that the pages returned by the OS for heap
    >allocation (either directly thru brk() or thru mmap(MAP_ANONYMOUS)) will
    >be zero filled.
    >

    An application which makes assumptions about the contents of newly allocated
    memory would seem to be making very dangerous assumptions.

    Ignoring that, would it not be considered to be a security violation to hand
    pieces of memory to applications without erasing the old contents of the
    pages?

        Thanx...

           ps
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Ingo Molnar: "Re: [patch] Real-Time Preemption, -RT-2.6.12-rc6-V0.7.47-20"

    Relevant Pages

    • Re: 2.4.23aa2 (bugfixes and important VM improvements for the high end)
      ... > triggering the zone-normal shortage in 32G, ... Also bear in mind that as memory gets tight, ... Without shared pagetables, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: log-buf-len dynamic
      ... Wake up, dude. ... disk and memory. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: swsusp update: supports discontingmem/highmem
      ... driver is responsible for the memory should handle any required state ... Can't you back out nicely if you don't have enough memory for the image? ... Nigel Cunningham ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Request: I/O request recording
      ... > next reboot. ... > that everything which you will need in the subsequent boot is already in ... > pretty much a waste of time, gaining only 10% or so, from memory. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: lost memory on a 4GB amd64
      ... JM>> reproduce the crash in the simplest possible way, ... JM> AGP aperature settings in your original post ... AGP and PCI I mentioned only as "the bad guys stealing the memory" ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)