linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Drake <ddrake@brontes3d.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Johannes Weiner <hannes@saeurebad.de>, linux-mm@kvack.org
Subject: Re: faulting kmalloced buffers into userspace through mmap()
Date: Fri, 06 Jun 2008 22:29:05 +0100	[thread overview]
Message-ID: <4849AC21.5090301@brontes3d.com> (raw)
In-Reply-To: <200806042100.39345.nickpiggin@yahoo.com.au>

Nick Piggin wrote:
> You can map it with a pfn mapping / vm_insert_pfn / remap_pfn_range etc.
> which does not touch the underlying struct pages. You must then ensure
> you deallocate the memory yourself after it is finished with.

Ah, excellent, I wasn't aware of pfn mappings or vm_insert_pfn. I should 
have read further than LDD3 :)

I have brushed up the section I wrote earlier:
http://linux-mm.org/DeviceDriverMmap

Hopefully someone else will find it useful.

Since I'm working with 2.6.25 I've implemented a nopfn handler which 
works perfectly using vm_insert_pfn(). Thanks for all your great work in 
this area!
-- 
Daniel Drake
Brontes Technologies, A 3M Company
http://www.brontes3d.com/opensource/

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2008-06-06 21:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-01 14:40 Daniel Drake
2008-06-02  5:38 ` Johannes Weiner
2008-06-04  9:39   ` Daniel Drake
2008-06-04 11:00     ` Nick Piggin
2008-06-06 21:29       ` Daniel Drake [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4849AC21.5090301@brontes3d.com \
    --to=ddrake@brontes3d.com \
    --cc=hannes@saeurebad.de \
    --cc=linux-mm@kvack.org \
    --cc=nickpiggin@yahoo.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox