LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Reversing a memory mapping?
@ 2011-02-03 20:50 Nikolaus Rath
  2011-02-05 21:04 ` virt_to_page for userspace pointers (was: Reversing a memory mapping?) Nikolaus Rath
  0 siblings, 1 reply; 10+ messages in thread
From: Nikolaus Rath @ 2011-02-03 20:50 UTC (permalink / raw)
  To: linux-kernel

Hello,

I am trying to outsmart the proprietary nvidia driver to get my own
driver to access to a memory region set up by the nvidia driver.

Strace tells me that the nividia userspace library is calling

mmap2(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_SHARED, 5, 0x35375)

to get a userspace pointer to the kernel memory that I'm interested in.

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?

I know that the region is pinned and used as a DMA buffer for
communication with the GPU. I want my own device to do DMA transfers to
and from the same location.



Thanks,

   -Nikolaus

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

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-07-26 12:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-03 20:50 Reversing a memory mapping? Nikolaus Rath
2011-02-05 21:04 ` virt_to_page for userspace pointers (was: Reversing a memory mapping?) Nikolaus Rath
2011-02-05 21:36   ` virt_to_page for userspace pointers Brice Goglin
2011-02-13 20:24     ` Nikolaus Rath
2011-02-13 20:37       ` Brice Goglin
2011-02-13 21:56         ` Nikolaus Rath
2011-02-13 22:06           ` Alan Cox
2011-02-13 22:11             ` Nikolaus Rath
2011-02-14 22:46       ` Nikolaus Rath
2011-07-26 12:03         ` Alexey Skidanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).