函数逻辑报告 |
Source Code:fs\binfmt_misc.c |
Create Date:2022-07-29 11:02:09 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:This registers a new binary format, it recognises the syntax* ':name:type:offset:magic:mask:interpreter:flags'* where the ':' is the IFS, that can be chosen with the first char
函数原型:static Node *create_entry(const char __user *buffer, size_t count)
返回类型:Node
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| const char __user * | buffer | |
| size_t | count |
| 332 | 如果count小于11或count大于Max length of the register string则转到:out |
| 344 | 如果copy_from_user(buf, buffer, count)则转到:efault |
| 356 | p等于strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for |
| 359 | p自加等于'\0' |
| 360 | 如果非name[0]或非字符串比较或非字符串比较或strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for则转到:einval |
| 370 | 当:++ == 'E' |
| 374 | 当:++ == 'M' |
| 378 | 默认 |
| 379 | 转到:einval |
| 389 | s等于strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for |
| 392 | s等于'\0' |
| 395 | 如果r不等于0或 offset of magic 小于0则转到:einval |
| 401 | pr_debug("register: offset: %#x\n", offset of magic ) |
| 404 | magic or filename extension 等于p |
| 408 | 如果非 magic or filename extension [0]则转到:einval |
| 416 | mask, NULL for exact match 等于p |
| 420 | 如果非 mask, NULL for exact match [0]则 |
| 421 | mask, NULL for exact match = NULL |
| 422 | pr_debug("register: mask[raw]: none\n") |
| 435 | 如果 mask, NULL for exact match 且string_unescape_inplace( mask, NULL for exact match , UNESCAPE_HEX)不等于 size of magic/mask 则转到:einval |
| 438 | 如果 size of magic/mask 大于sizeof(linux_binprm->buf) 或sizeof(linux_binprm->buf) 减 size of magic/mask 小于 offset of magic 则转到:einval |
| 441 | pr_debug("register: magic/mask length: %i\n", size of magic/mask ) |
| 442 | 如果USE_DEBUG则 |
| 447 | 如果 mask, NULL for exact match 则 |
| 455 | 如果masked则 |
| 456 | 以i小于 size of magic/mask 循环masked[i]等于 magic or filename extension [i]按位与 mask, NULL for exact match [i] |
| 462 | 释放内存 |
| 466 | 否则 |
| 470 | p等于strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for |
| 473 | p自加等于'\0' |
| 476 | magic or filename extension 等于p |
| 477 | p等于strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for |
| 480 | p自加等于'\0' |
| 481 | 如果非 magic or filename extension [0]或strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for则转到:einval |
| 483 | pr_debug("register: extension: {%s}\n", magic or filename extension ) |
| 486 | p等于strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for |
| 489 | p自加等于'\0' |
| 493 | filename of interpreter 等于p |
| 494 | p等于strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for |
| 497 | p自加等于'\0' |
| 498 | 如果非 filename of interpreter [0]则转到:einval |
| 500 | pr_debug("register: interpreter: {%s}\n", filename of interpreter ) |
| 503 | p等于check_special_flags(p, e) |
| 509 | 返回:e |
| 511 | out : |
| 512 | 返回:错误号 |
| 514 | efault : |
| 515 | 释放内存 |
| 516 | 返回:错误号 |
| 517 | einval : |
| 518 | 释放内存 |
| 519 | 返回:错误号 |
| 名称 | 描述 |
|---|---|
| bm_register_write | /register |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |