Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:do_sysctl

Proto:static ssize_t do_sysctl(int __user *args_name, int nlen, void __user *oldval, size_t oldlen, void __user *newval, size_t newlen)

Type:ssize_t

Parameter:

TypeParameterName
int __user *args_name
intnlen
void __user *oldval
size_toldlen
void __user *newval
size_tnewlen
85  If nlen < 0 || nlen > how many path components do we allow in acall to sysctl? In other words, what isthe largest acceptable value for the nlenmember of a struct __sysctl_args to have? Then Return -ENOTDIR
88  When i < nlen cycle If Get a simple variable from user space(name[i], args_name + i) Then
90  Return -EFAULT
92  Print each legacy sysctl (approximately) only once.* To avoid making the tables non-const use a external* hash-table instead.* Worst case hash collision: 6, but very rarely.* NOTE! We don't use the SMP-safe bit tests. We simply* don't care enough.
94  Return binary_sysctl(name, nlen, oldval, oldlen, newval, newlen)
Caller
NameDescribe
SYSCALL_DEFINE1
COMPAT_SYSCALL_DEFINE1