kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* When Are Free Pages Zeroed?
@ 2011-11-10  7:43 Patrick Simmons
  2011-11-11  4:05 ` Mulyadi Santosa
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick Simmons @ 2011-11-10  7:43 UTC (permalink / raw)
  To: kernelnewbies

I'm looking into the Linux memory management subsystem and need to know 
when freed pages are zeroed.  Specifically, are they zeroed just before 
they are reallocated, immediately after they are freed, or sometime 
in-between?  Also, what files/functions would I need to modify to change 
this behavior?

Thanks for any help and kindest regards,
--Patrick

-- 
If I'm not here, I've gone out to find myself.  If I get back before I return, please keep me here.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* When Are Free Pages Zeroed?
  2011-11-10  7:43 When Are Free Pages Zeroed? Patrick Simmons
@ 2011-11-11  4:05 ` Mulyadi Santosa
  0 siblings, 0 replies; 2+ messages in thread
From: Mulyadi Santosa @ 2011-11-11  4:05 UTC (permalink / raw)
  To: kernelnewbies

Hi patrick :)

On Thu, Nov 10, 2011 at 14:43, Patrick Simmons
<linuxrocks123@netscape.net> wrote:
> I'm looking into the Linux memory management subsystem and need to know
> when freed pages are zeroed. ?Specifically, are they zeroed just before
> they are reallocated, immediately after they are freed, or sometime
> in-between? ?Also, what files/functions would I need to modify to change
> this behavior?

I vaguely recall that zeroing is done in (re)-allocation. Thus, during
freeing pages, you just mark it as free and let the allocator handle
it further (perhaps doing block combining--forgot the technical name).

The function that does allocation while zeroing IIRC is kzalloc.


PS: IIRC too, once zero-ing isn't done anywhere. But later, it is
found that it could be a security issue since it might leak sensitive
data.


-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-11  4:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-10  7:43 When Are Free Pages Zeroed? Patrick Simmons
2011-11-11  4:05 ` Mulyadi Santosa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).