Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\swap.c Create Date:2022-07-28 14:13:03
Last Modify:2022-05-23 13:40:24 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:get_kernel_pages() - pin kernel pages in memory*@kiov: An array of struct kvec structures*@nr_segs: number of segments to pin*@write: pinning for read/write, currently ignored*@pages: array that receives pointers to the pages pinned.

Proto:int get_kernel_pages(const struct kvec *kiov, int nr_segs, int write, struct page **pages)

Type:int

Parameter:

TypeParameterName
const struct kvec *kiov
intnr_segs
intwrite
struct page **pages
156  When seg < nr_segs cycle
157  If WARN_ON(iov_len != PAGE_SIZE) Then Return seg
160  pages[seg] = kmap_to_page( and that should *never* hold a userland pointer )
161  get_page(pages[seg])
164  Return seg
Caller
NameDescribe
get_kernel_pageget_kernel_page() - pin a kernel page in memory*@start: starting kernel address*@write: pinning for read/write, currently ignored*@pages: array that receives pointer to the page pinned.* Must be at least nr_segs long.* Returns 1 if page is pinned