From: Andi Kleen <andi@firstfloor.org>
To: Mark Veltzer <mark.veltzer@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: get_user_pages question
Date: Mon, 09 Nov 2009 10:31:26 +0100 [thread overview]
Message-ID: <87skco59jl.fsf@basil.nowhere.org> (raw)
In-Reply-To: <200911090850.26724.mark.veltzer@gmail.com> (Mark Veltzer's message of "Mon, 9 Nov 2009 08:50:25 +0200")
Mark Veltzer <mark.veltzer@gmail.com> writes:
>
> I am testing this kernel module with several buffers from user space allocated
> in several different ways. heap, data segment, static variable in function and
> stack. All scenarious work EXCEPT the stack one. When passing the stack buffer
> the kernel sees one thing while user space sees another.
In theory it should work, stack is no different from any other pages.
First thought was that you used some platform with incoherent caches,
but that doesn't seem to be the case if it's standard x86.
> My not so intelligent questions (they may well be off the mark):
> - How can this be? (two views of the same page)
It should not be on a coherent platform.
> - Does not 'get_user_pages' pin the pages?
Yes it does.
> - Could this be due to stack protection of some sort?
No.
> - Do I need to do anything extra with the vm_area I receive for the stack
> pages EXCEPT 'get_user_pages' ?
No. Stack is like any other user memory.
Most likely it's some bug in your code.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
next prev parent reply other threads:[~2009-11-09 9:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-09 6:50 get_user_pages question Mark Veltzer
2009-11-09 9:31 ` Andi Kleen [this message]
2009-11-09 10:32 ` Hugh Dickins
2009-11-09 22:13 ` Mark Veltzer
2009-11-10 16:33 ` Hugh Dickins
2009-11-28 18:50 ` Andrea Arcangeli
2009-11-28 22:22 ` Mark Veltzer
2009-11-30 12:01 ` Nick Piggin
2009-11-30 16:12 ` Andrea Arcangeli
2009-11-30 11:54 ` Nick Piggin
-- strict thread matches above, loose matches on Subject: below --
2004-05-01 11:12 Eli Cohen
2004-05-01 11:32 ` Arjan van de Ven
2004-05-01 11:41 ` Eli Cohen
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=87skco59jl.fsf@basil.nowhere.org \
--to=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.veltzer@gmail.com \
/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