LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   get_user_pages / page faulting (https://www.linuxquestions.org/questions/linux-kernel-70/get_user_pages-page-faulting-4175656146/)

jjj005 06-21-2019 10:36 AM

get_user_pages / page faulting
 
I am seeing some unexpected behavior trying to access a user buffer in kernel space. Basically I am allocating a buffer in user space and using get_user_pages in my driver to get a corresponding page list, but the page list generated is incorrect. All pages in the list are the same value of 0x01C13000. The problem appears to be that the buffer is not accessed before being passed to the driver so physical memory is not attached to the virtual address; this makes sense. However, I am expecting get_user_pages to detect this and fault in the backing physical memory; this is not happening.

It seems my understanding of get_user_pages must be incorrect, but I haven't come across any information on how this situation should be handled.


All times are GMT -5. The time now is 10:33 AM.