函数逻辑报告 |
Source Code:fs\exec.c |
Create Date:2022-07-29 10:33:48 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:'copy_strings()' copies argument/environment strings from the old* processes's memory to the new process's stack. The call to get_user_pages()* ensures the destination page is created and not swapped out.
函数原型:static int copy_strings(int argc, struct user_arg_ptr argv, struct linux_binprm *bprm)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| int | argc | |
| struct user_arg_ptr | argv | |
| struct linux_binprm * | bprm |
| 502 | struct page * kmapped_page = NULL |
| 503 | char * kaddr = NULL |
| 504 | kpos等于0 |
| 513 | str等于get_user_arg_ptr(argv, argc) |
| 522 | 如果非valid_arg_len(bprm, len)则转到:out |
| 537 | 如果fatal_signal_pending(当前进程)则 |
| 538 | ret等于负start if no handler.. |
| 539 | 转到:out |
| 541 | cond_resched() |
| 547 | bytes_to_copy等于offset |
| 548 | 如果bytes_to_copy大于len则bytes_to_copy等于len |
| 551 | offset减等于bytes_to_copy |
| 552 | pos减等于bytes_to_copy |
| 553 | str减等于bytes_to_copy |
| 554 | len减等于bytes_to_copy |
| 556 | 如果非kmapped_page或kpos不等于pos按位与PAGE_MASK的值则 |
| 559 | page等于get_arg_page(bprm, pos, 1) |
| 560 | 如果非page则 |
| 565 | 如果kmapped_page则 |
| 570 | kmapped_page等于page |
| 571 | kaddr等于kmap(kmapped_page) |
| 573 | flush_arg_page(bprm, kpos, kmapped_page) |
| 575 | 如果copy_from_user(kaddr + offset, str, bytes_to_copy)则 |
| 581 | ret等于0 |
| 582 | out : |
| 583 | 如果kmapped_page则 |
| 588 | 返回:ret |
| 名称 | 描述 |
|---|---|
| copy_strings_kernel | Like copy_strings, but get argv and its values from kernel memory. |
| __do_execve_file | sys_execve() executes a new program. |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |