LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 03-29-2014, 01:30 PM   #1
animesh
LQ Newbie
 
Registered: Aug 2011
Posts: 7

Rep: Reputation: Disabled
get_user_pages() linux kernel


get_user_pages() implementation shows that it uses virt_to_page() to extract struct page pointer for given user space, page aligned virtual address.

http://lxr.free-electrons.com/source/mm/nommu.c#L171

virt_to_page() can only be used for directly mapped kernel addresses. How's that get_user_pages() is using the same for user space pages ?
 
Old 04-08-2014, 10:23 AM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
... because, at that point in time, both sets of pages are mapped.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
get_user_pages question nakul.k1 Linux - Kernel 1 09-15-2010 03:07 PM
why aio_setup_ring() using get_user_pages()? zdz97 Linux - Kernel 0 02-28-2007 02:40 AM
LXer: Howto: build Linux kernel module against installed kernel w/o full kernel source tree LXer Syndicated Linux News 0 09-03-2006 08:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 06:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration