How to access user space memory from the Linux kernel?

后端 未结 4 1723
我寻月下人不归
我寻月下人不归 2021-02-01 10:20

I know that copy_to_user/copy_from_user, get_user/put_user functions are for this purpose.

My question is that, given

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-01 10:36

    You'll need to follow an address to get a corresponding page struct (see follow_page for the example). Next, getting the page struct you'll need to map it to kernel's address space via kmap or kmap_atomic.

提交回复
热议问题