Thanks!<div><br></div><div>I do not want to access other PAS when other process is alive, and it seems impossible because each process has its own page table.</div><div><br></div><div>But after its death, some information might be left in the memory if the OS does not clean the physical pages, I guess. When the OS load a binary program, some physical pages are rewrited. I read it from one book that the&nbsp;variable&nbsp;and array which are in the .bss and .data are directly loaded into memory and will rewirte physical pages. So I decided to use malloc to dynamically get memory and seek whether there is some information left in such memory.</div>
<div><br></div><div><br><div class="gmail_quote">2012/1/12 beyond.hack <span dir="ltr">&lt;<a href="mailto:beyond.hack@gmail.com">beyond.hack@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p>Luk frnd..<br>
First of all.. U just cannt acess other PAS i.e.process address space via other process..<br>
Ex--malloc some memory n then free it twice..<br>
First tym it will b freed bt d nxt time u try to free it. U cant .. So it will report the illegal access to memory bcz now that adress is not in your pas..errors r handled by some compiler in a standard way..they may show some fixed area of memory when u try to access such areas of memory which are not allocated for ur process..<br>


Ex.gcc may show you glibc or give a&nbsp; segv</p>
<p>N</p>
<p>Since we know that we r having virtual memory management.. So how r u going back to that only address...<br>
I tried to save the pointer value (obtained by malloc) by writing it in a file..n later on use it from that value. Bt <br>
cant initiallise a pointer by giving an virtual address n printing from there ..(i tried it getting errors)..<br>
Also..as soon as your first process is over...previous malloc&#39;d address are mostly get corrupted bcz. Of the use by various other processes..<br></p>
<div class="gmail_quote"><div><div class="h5">On 11 Jan 2012 18:24, &quot;ÏÄÒµÌí&quot; &lt;<a href="mailto:summerxyt@gmail.com" target="_blank">summerxyt@gmail.com</a>&gt; wrote:<br type="attribution"></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5">
<font face="arial, helvetica, sans-serif"><div>Hi,</div><div>&nbsp; &nbsp;My tutor asked me to test whether one process leaves information in memory after it is dead. I tried to search some article about such thing on the Internet but there seems to be no one discuss about it. And after that, I tried to write some program in the User Mode to test it, using fork() to create lots of processes and filling char &#39;a&#39; into a 102400 bytes char array in each process. Then I used malloc() to get some memory to seek char &#39;a&#39; in a new one process or many new processes, but failed. All memory I malloced was full of zero.</div>


<div>&nbsp; &nbsp;As the man page of malloc said:&quot;The memory is not initialized&quot;, I believe that the memory which was got by malloc() could be used by other process, and therefor information leakage exists. But how can I test it? Or where can I get related information?&nbsp;</div>


<div>&nbsp; &nbsp;Thanks!&nbsp;</div></font>
<br></div></div>_______________________________________________<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>
</blockquote></div><br></div>