Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sysctl_binary.c Create Date:2022-07-28 09:12:18
Last Modify:2020-03-17 13:22:06 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:COMPAT_SYSCALL_DEFINE1

Proto:COMPAT_SYSCALL_DEFINE1(sysctl, struct compat_sysctl_args __user *, args)

Type:

Parameter:Nothing

142  __user * compat_oldlenp
143  oldlen = 0
146  If copy_from_user( & tmp, args, size of tmp ) Then Return -EFAULT
149  If oldval && Not oldlenp Then Return -EFAULT
152  compat_oldlenp = A pointer passed in from user mode. This should not* be used for syscall parameters, just declare them* as pointers because the syscall entry code will have* appropriately converted them already.
153  If compat_oldlenp && Get a simple variable from user space(oldlen, compat_oldlenp) Then Return -EFAULT
156  result = do_sysctl(A pointer passed in from user mode. This should not* be used for syscall parameters, just declare them* as pointers because the syscall entry code will have* appropriately converted them already., nlen, A pointer passed in from user mode. This should not* be used for syscall parameters, just declare them* as pointers because the syscall entry code will have* appropriately converted them already., oldlen, A pointer passed in from user mode. This should not* be used for syscall parameters, just declare them* as pointers because the syscall entry code will have* appropriately converted them already., newlen)
160  If result >= 0 Then
161  oldlen = result
162  result = 0
165  If compat_oldlenp && Write a simple value into user space(oldlen, compat_oldlenp) Then Return -EFAULT
168  Return result