Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\iov_iter.c Create Date:2022-07-28 06:21:05
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_iovec

Proto:static size_t copy_page_to_iter_iovec(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
161  __user * buf
164  If Value for the false possibility is greater at compile time(bytes > count) Then bytes = count
167  If Value for the false possibility is greater at compile time(!bytes) Then Return 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 = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(bytes, Must be size_t (1003.1g) - skip)
177  If IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_HIGHMEM) && Not Fault everything in given userspace address range in. Then
178  kaddr = kmap_atomic(page)
179  from = kaddr + offset
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  Go to done
202  offset = from - kaddr
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 = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(bytes, Must be size_t (1003.1g) - skip)
209  kaddr = kmap(page)
210  from = kaddr + offset
211  left = copyout(buf, from, copy)
212  copy -= left
213  skip += copy
214  from += copy
215  bytes -= copy
216  When Value for the false possibility is greater at compile time(!left && bytes) cycle
217  iov++
218  buf = BSD uses caddr_t (1003.1g requires void *)
219  copy = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(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  If skip == Must be size_t (1003.1g) Then
230  iov++
231  skip = 0
233  count -= wanted - bytes
234  nr_segs -= iov - iov
235  iov = iov
236  iov_offset = skip
237  Return wanted - bytes
Caller
NameDescribe
copy_page_to_iter