Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\iov_iter.c Create Date:2022-07-28 06:22:07
Last Modify:2022-05-21 11:43:54 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:copy_page_to_iter

Proto:size_t copy_page_to_iter(struct page *page, size_t offset, size_t bytes, struct iov_iter *i)

Type:size_t

Parameter:

TypeParameterName
struct page *page
size_toffset
size_tbytes
struct iov_iter *i
910  If Value for the false possibility is greater at compile time(!page_copy_sane(page, offset, bytes)) Then Return 0
912  If * Bit 0 is the read/write bit, set if we're writing. * Bit 1 is the BVEC_FLAG_NO_REF bit, set if type is a bvec and * the caller isn't expecting to drop a page reference when done. & (ITER_BVEC | ITER_KVEC) Then
913  kaddr = kmap_atomic(page)
914  wanted = copy_to_iter(kaddr + offset, bytes, i)
915  Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(kaddr)
916  Return wanted
917  Else if Value for the false possibility is greater at compile time(iov_iter_is_discard(i)) Then Return bytes
919  Else if Value is more likely to compile time(!iov_iter_is_pipe(i)) Then Return copy_page_to_iter_iovec(page, offset, bytes, i)
921  Else Return copy_page_to_iter_pipe(page, offset, bytes, i)
Caller
NameDescribe
process_vm_rw_pagesprocess_vm_rw_pages - read/write pages from task specified*@pages: array of pointers to pages we want to copy*@offset: offset in page to start copying from/to*@len: number of bytes to copy*@iter: where to copy to/from locally*@vm_write: 0 means copy from,
pipe_to_user