函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sys.c Create Date:2022-07-27 10:20:25
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Work around broken programs that cannot handle "Linux 3.0".* Instead we map 3.x to 2.6.40+x, so e.g. 3.0 would be 2.6.40* And we map 4.x and later versions to 2.6.60+x, so 4.0/5.0/6.0/... would be* 2.6.60.

函数原型:static int override_release(char __user *release, size_t len)

返回类型:int

参数:

类型参数名称
char __user *release
size_tlen
1215  ret等于0
1217  如果personality按位与UNAME26
1218  rest等于UTS_RELEASE
1219  char buf[65] = {0}
1220  ndots等于0
1224 rest循环
1225  如果rest恒等于'.'且ndots先自加大于等于3则退出
1227  如果非是数字rest不等于'.'则退出
1229  rest自加
1231  v等于LINUX_VERSION_CODE右移8位按位与0xff的值加60
1232  copy等于clamp_t - return a value clamped to a given range using a given type*@type: the type of variable to use*@val: current value*@lo: minimum allowable value*@hi: maximum allowable value* This macro does no typechecking and uses temporary variables of type(size_t, len, 1, buf的长度)
1233  copy等于格式化输出字符串
1234  ret等于copy_to_user(release, buf, copy + 1)
1236  返回:ret
调用者
名称描述
SYSCALL_DEFINE1
SYSCALL_DEFINE1Old cruft
SYSCALL_DEFINE1