Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Virutal to Physical Address Conversion: (4 Items)
   
Virutal to Physical Address Conversion  
Greetings,

Does anyone know of a way to convert virtual addresses from other processes into their physical address in ram? I'd like
 to have a monitoring process go through all the running processes and find where their code/data section is in ram. Any
 suggestions would be great. Thanks.
AW: Virutal to Physical Address Conversion  
shortest answer: try pidin and showmem sources


-----Ursprüngliche Nachricht-----
Von:	Hayder Mouhammed [mailto:community-noreply@qnx.com]
Gesendet:	Di 17.03.2009 18:17
An:	osmeta-core_os
Cc:	
Betreff:	Virutal to Physical Address Conversion

Greetings,

Does anyone know of a way to convert virtual addresses from other processes into their physical address in ram? I'd like
 to have a monitoring process go through all the running processes and find where their code/data section is in ram. Any
 suggestions would be great. Thanks.

_______________________________________________
OSMeta
http://community.qnx.com/sf/go/post24587 
 
*******************************************
Harman Becker Automotive Systems GmbH
Management Board: Dr. Klaus Blickle (Chairman), Dr. Udo Hüls, Michael Mauser
Chairman of the Supervisory Board: Ansgar Rempp | Domicile: Karlsbad | 
Local Court Mannheim: Register No. 361395

 
*******************************************
Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Wenn Sie nicht der richtige Adressat 
sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und loeschen Sie diese Mail
. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have 
received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, 
disclosure or distribution of the contents in this e-mail is strictly forbidden.
*******************************************
Attachment: Text winmail.dat 3.43 KB
Re: AW: Virutal to Physical Address Conversion  
If I use "pidin mem", "pidin pmem", showmem, I can see how big the code/stack size is and virtual addresses, but how can
 you get another process to translate that process' virtual address. Example: all processes return the beginning of 
their code space as 0x48040000, but if you try to use mphys() that will return the physical address of the monitoring 
process.
AW: AW: Virutal to Physical Address Conversion  
I don't see a chance for you as long as you try to do this from a different process.
This would break some fundamental memory protection issues.
The mapping tables (v -> p) are stored in procs memory.

What about doing a bit different:

write a SO that is including either a signal handler or a very simple resmgr and also the functionaloty needed to map 
the virt -> phys stuff.
having this SO, you could use LD_PRELOAD so that this lib is loaded additionaly with the process you want to moinitor.
then, when ever you want the mappings you send a signal or simple string to the resmgr and the libs is doing what it 
should.

This way you can work inside of you process




-----Ursprüngliche Nachricht-----
Von:	Hayder Mouhammed [mailto:community-noreply@qnx.com]
Gesendet:	Di 17.03.2009 19:15
An:	osmeta-core_os
Cc:	
Betreff:	Re: AW: Virutal to Physical Address Conversion

If I use "pidin mem", "pidin pmem", showmem, I can see how big the code/stack size is and virtual addresses, but how can
 you get another process to translate that process' virtual address. Example: all processes return the beginning of 
their code space as 0x48040000, but if you try to use mphys() that will return the physical address of the monitoring 
process.

_______________________________________________
OSMeta
http://community.qnx.com/sf/go/post24602 
 
*******************************************
Harman Becker Automotive Systems GmbH
Management Board: Dr. Klaus Blickle (Chairman), Dr. Udo Hüls, Michael Mauser
Chairman of the Supervisory Board: Ansgar Rempp | Domicile: Karlsbad | 
Local Court Mannheim: Register No. 361395

 
*******************************************
Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Wenn Sie nicht der richtige Adressat 
sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und loeschen Sie diese Mail
. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have 
received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, 
disclosure or distribution of the contents in this e-mail is strictly forbidden.
*******************************************
Attachment: Text winmail.dat 3.9 KB