tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: virtual to physical memory address translation



On Mon, Jan 15, 2018 at 12:47:52PM +0000, Emmanuel Dreyfus wrote:
> Hello
> 
> Sorry if that has been covered ad nauseum, but I canot find relevant
> information about that: on NetBSD, how can I get the physical memory
> address given a virtual memory address? This is to port the Linux
> Meltdown PoC so that we have something to test our systems against.

I'd guess the only way it to mmap() /dev/mem and walk the page table.
Of course you need to know the root of the page table, and for this you
need to parse kernel structures.

crash(8) may help you here.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index