linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* getting physical address of buffer into user space
@ 2020-02-18 20:56 Marty Leisner
  2020-02-20 21:27 ` Alexander Duyck
  0 siblings, 1 reply; 2+ messages in thread
From: Marty Leisner @ 2020-02-18 20:56 UTC (permalink / raw)
  To: linux-mm; +Cc: maleisner

I've read tutorials and seen example programs on how to get page information into userspace 
(eventually, I'll want to dma from a UIO driver)

For POC, I have a simple driver with an mmap rule, which does kmalloc on a new buffer.

The driver can read/write the memory, and the user space program can read/write the memory (and both
sides agree on the data read/written).

It appears in /proc/self/maps, and when I try to look it up in /proc/self/pagemap, it says its
neither swapped nor present.

This seems like a clever way -- if it works (the alternative is sloppy ioctl's or other custom
methods)

-- 
Marty Leisner <linux@rochester.rr.com>


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

end of thread, other threads:[~2020-02-20 21:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-18 20:56 getting physical address of buffer into user space Marty Leisner
2020-02-20 21:27 ` Alexander Duyck

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).