sorry guys did not read tat properly..he is just referring to user space....as far malloc is concerned it basically calls <b style="font-size:13px;font-weight:bold;font-family:arial,sans-serif;background-color:rgb(255,255,255)">brk</b><span class="Apple-style-span" style="font-size:13px;font-family:arial,sans-serif;background-color:rgb(255,255,255)">() and <b>sbrk() </b></span><span class="Apple-style-span" style="font-size:13px;font-family:arial,sans-serif;background-color:rgb(255,255,255)"> tand they basically end up changing the location of thelocation of program break which is nothing but </span><span class="Apple-style-span" style="font-size:13px;font-family:arial,sans-serif;background-color:rgb(255,255,255)"> the end of the process's data segment so it has nothing to do with u getting any info or any memory leaks...i mean not too specific to PDT...or any such previously exited processes...</span><br>
<br><div class="gmail_quote">2012/1/19 SaNtosh kuLkarni <span dir="ltr"><<a href="mailto:santosh.yesoptus@gmail.com">santosh.yesoptus@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
am not sure about my answer but regarding kmalloc if i am going out of context ..but when u do a<b> kmalloc it doesnt clear </b>the memory obtained and still holds the prvious contents...what happens in that case ..and as far as i know when u take the case of reparenting ....during process termination exit_mm() is called to release the mm_struct held by this process. If no other process<div>
is using this address space, if the address space is not shared—the kernel then destroys it and also there is the senario of zombie exit...i mean PDT remains after parent exits....</div><div><br></div><br><div class="gmail_quote">
2012/1/19 ÏÄÒµÌí <span dir="ltr"><<a href="mailto:summerxyt@gmail.com" target="_blank">summerxyt@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks£¡<div>
<br></div><div>It seems that the function do_page_fault() will finally call <a href="http://lxr.oss.org.cn/plain/source/arch/x86/lib/mmx_32.c#L125" target="_blank">fast_clear_page()</a> or <a href="http://lxr.oss.org.cn/plain/source/arch/x86/lib/mmx_32.c#L336" target="_blank">slow_zero_page()</a> to zero a new physical page for a process. So calling malloc() cannot get a page used by another process which is dead already.</div>
<div><br></div><div>The assemble language is difficult to me, so please tell me if I am wrong.</div><div><br><div class="gmail_quote">2012/1/18 Fredrick <span dir="ltr"><<a href="mailto:fjohnber@zoho.com" target="_blank">fjohnber@zoho.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">When you malloc a memory or mmap a MAP_ANON memory, it is virtually allocated. When you read or write to it, the process takes a page fault. The page fault handler zeroes those memory and hands it to the process. So I think there is no leak.<span><font color="#888888"><br>
<br>
-Fredrick</font></span><div><div><br>
<br>
On 01/11/2012 04:53 AM, ÏÄÒµÌí wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
Hi,<br>
My tutor asked me to test whether one process leaves information in<br>
memory after it is dead. I tried to search some article about such thing<br>
on the Internet but there seems to be no one discuss about it. And after<br>
that, I tried to write some program in the User Mode to test it, using<br>
fork() to create lots of processes and filling char 'a' into a 102400<br>
bytes char array in each process. Then I used malloc() to get some<br>
memory to seek char 'a' in a new one process or many new processes, but<br>
failed. All memory I malloced was full of zero.<br>
As the man page of malloc said:"The memory is not initialized", I<br>
believe that the memory which was got by malloc() could be used by other<br>
process, and therefor information leakage exists. But how can I test it?<br>
Or where can I get related information?<br>
Thanks!<br>
<br>
<br></div></div><div>
______________________________<u></u>_________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.<u></u>org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.<u></u>org/mailman/listinfo/<u></u>kernelnewbies</a><br>
</div></blockquote>
<br>
<br>
</blockquote></div><br></div>
<br>_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><b style="color:rgb(102,102,204)">Regards,<br>Santosh Kulkarni</b><br><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><b style="color:rgb(102,102,204)">Regards,<br>Santosh Kulkarni</b><br><br>