All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Barton <eric@bartonsoftware.com>
To: linux-kernel@vger.kernel.org
Subject: kernel vaddr -> struct page
Date: Thu, 17 Oct 2002 20:11:17 +0100	[thread overview]
Message-ID: <200210171911.g9HJBHk02456@bartonsoftware.com> (raw)


Hi,

I'm trying to turn a kernel virtual address into a struct page that I can
then pass to tcp_sendpage().  

The kernel virtual address could be {kmalloc(),vmalloc(),kmap()}-ed memory,
and I guarantee that this memory will not be {kfree(),vfree(),kunmap()}-ed
until the socket has done with the page (i.e. all the data has been acked).

I'd have thought that vmalloc_to_page(kvaddr) should give me a page I could
use, since it is walking the page tables to find the pte for 'kvaddr', and
checking that the physical page is present.

However I find I'm sending garbage when I use this method.

Can anyone help me understand?

-- 

                Cheers,
                        Eric

----------------------------------------------------
|Eric Barton        Barton Software                |
|9 York Gardens     Tel:    +44 (117) 330 1575     |
|Clifton            Mobile: +44 (7909) 680 356     |
|Bristol BS8 4LL    Fax:    call first             |
|United Kingdom     E-Mail: eric@bartonsoftware.com|
----------------------------------------------------

             reply	other threads:[~2002-10-17 19:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-17 19:11 Eric Barton [this message]
2002-10-17 19:24 ` kernel vaddr -> struct page Brian Gerst
2002-10-17 20:24   ` David S. Miller
2002-10-17 20:22 ` David S. Miller

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=200210171911.g9HJBHk02456@bartonsoftware.com \
    --to=eric@bartonsoftware.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.