函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sysctl_binary.c Create Date:2022-07-27 10:12:10
Last Modify:2020-03-17 13:22:06 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:COMPAT_SYSCALL_DEFINE1

函数原型:COMPAT_SYSCALL_DEFINE1(sysctl, struct compat_sysctl_args __user *, args)

返回类型:

参数:

142  __usercompat_oldlenp
143  oldlen等于0
146  如果copy_from_user( & tmp, args, tmp的长度)则返回:负EFAULT
149  如果oldval且非oldlenp则返回:负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  如果compat_oldlenpCareful: we have to cast the result to the type of the pointer* for sign reasons(oldlen, compat_oldlenp)则返回:负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  如果result大于等于0则
161  oldlen等于result
162  result等于0
165  如果compat_oldlenpput_user - Write a simple value into user space(oldlen, compat_oldlenp)则返回:负EFAULT
168  返回:result