Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\regset.h Create Date:2022-07-28 07:49:17
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:These two parallel the two above, but for portions of a regset layout* that always read as all-zero or for which writes are ignored.

Proto:static inline int user_regset_copyout_zero(unsigned int *pos, unsigned int *count, void **kbuf, void __user **ubuf, const int start_pos, const int end_pos)

Type:int

Parameter:

TypeParameterName
unsigned int *pos
unsigned int *count
void **kbuf
void __user **ubuf
const intstart_pos
const intend_pos
314  If count == 0 Then Return 0
316  BUG_ON( * pos < start_pos)
317  If end_pos < 0 || pos < end_pos Then
318  copy = If end_pos < 0 Then count Else min - return minimum of two values of the same or compatible types*@x: first value*@y: second value( * count, end_pos - * pos)
320  If kbuf Then
321  memset( * kbuf, 0, copy)
322  kbuf += copy
323  Else if Zero a block of memory in user space, with less checking Then Return -EFAULT
325  Else ubuf += copy
327  pos += copy
328  count -= copy
330  Return 0