函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\iov_iter.c Create Date:2022-07-27 07:18:05
Last Modify:2022-05-21 11:43:54 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:copy_page_to_iter_iovec

函数原型:static size_t copy_page_to_iter_iovec(struct page *page, size_t offset, size_t bytes, struct iov_iter *i)

返回类型:size_t

参数:

类型参数名称
struct page *page
size_toffset
size_tbytes
struct iov_iter *i
161  __userbuf
164  如果此条件成立可能性小(为编译器优化)(bytes > count)则bytes等于count
167  如果此条件成立可能性小(为编译器优化)(!bytes)则返回:0
170  might_fault()
171  wanted等于bytes
172  iov等于iov
173  skip等于iov_offset
174  buf等于 BSD uses caddr_t (1003.1g requires void *) skip
175  copy等于两数取小(bytes, Must be size_t (1003.1g) - skip)
177  如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_HIGHMEM)且非Fault everything in given userspace address range in.
178  kaddr等于kmap_atomic(page)
179  from等于kaddroffset
182  left等于copyout(buf, from, copy)
183  copy减等于left
184  skip加等于copy
185  from加等于copy
186  bytes减等于copy
189  iov自加
192  left等于copyout(buf, from, copy)
193  copy减等于left
194  skip等于copy
195  from加等于copy
196  bytes减等于copy
200  转到:done
202  offset等于fromkaddr
203  buf加等于copy
204  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)
205  copy等于两数取小(bytes, Must be size_t (1003.1g) - skip)
209  kaddr等于kmap(page)
210  from等于kaddroffset
211  left等于copyout(buf, from, copy)
212  copy减等于left
213  skip加等于copy
214  from加等于copy
215  bytes减等于copy
216 此条件成立可能性小(为编译器优化)(!left && bytes)循环
217  iov自加
218  buf等于 BSD uses caddr_t (1003.1g requires void *)
219  copy等于两数取小(bytes, Must be size_t (1003.1g) )
220  left等于copyout(buf, from, copy)
221  copy减等于left
222  skip等于copy
223  from加等于copy
224  bytes减等于copy
226  kunmap(page)
228  done :
229  如果skip恒等于 Must be size_t (1003.1g)
230  iov自加
231  skip等于0
233  count减等于wantedbytes
234  nr_segs减等于ioviov
235  iov等于iov
236  iov_offset等于skip
237  返回:wantedbytes
调用者
名称描述
copy_page_to_iter