lkml.org 
[lkml]   [2011]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectvirt_to_page for userspace pointers (was: Reversing a memory mapping?)
Date
Nikolaus Rath <Nikolaus@rath.org> writes:
> Is there a way that my own kernel module can "reverse" this mmap call?
> I.e. given the userspace pointer, how do I get access to the physical
> location of the memory that has been mapped?

Ok, after some studying I think I can ask the question in a better way:

Is there an equivalent function to virt_to_page (and virt_to_phys) that
works with userspace pointers? Or do I have to manually walk through the
page tables? In the later case, are there any examples of this kind of
search that I could use as a basis?


Thanks,

-Nikolaus

--
»Time flies like an arrow, fruit flies like a Banana.«

PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-02-05 22:11    [W:1.834 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site