[Crash-utility] ptov command

Karlsson, Jan Jan.Karlsson at sonymobile.com
Thu Jul 5 11:01:45 UTC 2012


Hi Dave

I have a question about the ptov command. Ptov only handles kernel virtual addresses and their corresponding physical addresses. However if you give ptov a physical address that does not correspond to a kernel virtual address it still answers with an address. Users might get confused and do not know when to trust ptov, especially as the inverse command vtop always works.

So I would like to restrict ptov to give a result only when it is valid. The idea I have is that if ptov returns a valid virtual address then vtop on that address should give the same physical address back again. True??

cmd_ptov() in memory.c
  ....
  vaddr = PTOV(paddr);
  kvtop(0, vaddr, &paddr_tst, 0);
  if (paddr != paddr_tst) ... invalid vaddr, do not print it ...

Any comments?

Jan

Jan Karlsson
Senior Software Engineer
MIB

Sony Mobile Communications
Tel: +46703062174
sonymobile.com<http://sonymobile.com/>

[cid:image001.jpg at 01CD5AAD.EB8A3DC0]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120705/cc8774a6/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 2843 bytes
Desc: image001.jpg
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120705/cc8774a6/attachment.jpg>


More information about the Crash-utility mailing list