函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:copy_page_from_iter_iovec

函数原型:static size_t copy_page_from_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
245  __userbuf
248  如果此条件成立可能性小(为编译器优化)(bytes > count)则bytes等于count
251  如果此条件成立可能性小(为编译器优化)(!bytes)则返回:0
254  might_fault()
255  wanted等于bytes
256  iov等于iov
257  skip等于iov_offset
258  buf等于 BSD uses caddr_t (1003.1g requires void *) skip
259  copy等于两数取小(bytes, Must be size_t (1003.1g) - skip)
261  如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_HIGHMEM)且非fault_in_pages_readable(buf, copy)则
262  kaddr等于kmap_atomic(page)
263  to等于kaddroffset
266  left等于copyin(to, buf, copy)
267  copy减等于left
268  skip加等于copy
269  to加等于copy
270  bytes减等于copy
273  iov自加
276  left等于copyin(to, buf, copy)
277  copy减等于left
278  skip等于copy
279  to加等于copy
280  bytes减等于copy
284  转到:done
286  offset等于tokaddr
287  buf加等于copy
288  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)
289  copy等于两数取小(bytes, Must be size_t (1003.1g) - skip)
293  kaddr等于kmap(page)
294  to等于kaddroffset
295  left等于copyin(to, buf, copy)
296  copy减等于left
297  skip加等于copy
298  to加等于copy
299  bytes减等于copy
300 此条件成立可能性小(为编译器优化)(!left && bytes)循环
301  iov自加
302  buf等于 BSD uses caddr_t (1003.1g requires void *)
303  copy等于两数取小(bytes, Must be size_t (1003.1g) )
304  left等于copyin(to, buf, copy)
305  copy减等于left
306  skip等于copy
307  to加等于copy
308  bytes减等于copy
310  kunmap(page)
312  done :
313  如果skip恒等于 Must be size_t (1003.1g)
314  iov自加
315  skip等于0
317  count减等于wantedbytes
318  nr_segs减等于ioviov
319  iov等于iov
320  iov_offset等于skip
321  返回:wantedbytes
调用者
名称描述
copy_page_from_iter