函数逻辑报告 |
Source Code:fs\coredump.c |
Create Date:2022-07-29 11:06:14 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:do_coredump
函数原型:void do_coredump(const kernel_siginfo_t *siginfo)
返回类型:void
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| const kernel_siginfo_t * | siginfo |
| 573 | retval等于0 |
| 575 | size_t * argv = NULL |
| 576 | argc等于0 |
| 579 | bool need_suid_safe = false |
| 580 | bool core_dumped = false |
| 581 | core_dump_count等于Atomic operations that C can't guarantee us. Useful for* resource counting etc..(0) |
| 594 | audit_core_dumps(si_signo) |
| 602 | cred等于prepare_creds - Prepare a new set of credentials for modification* Prepare a new set of task credentials for modification |
| 614 | need_suid_safe = true |
| 617 | retval等于coredump_wait(si_signo, & core_state) |
| 618 | 如果retval小于0则转到:fail_creds |
| 623 | ispipe等于rmat_corename will inspect the pattern parameter, and output a* name into corename, which must have space for at least* CORENAME_MAX_SIZE bytes plus one byte for the zero terminator. |
| 625 | 如果ispipe则 |
| 631 | 如果ispipe小于0则 |
| 634 | 转到:fail_unlock |
| 637 | 如果limit恒等于1则 |
| 657 | 转到:fail_unlock |
| 659 | limit等于RLIM_INFINITY |
| 661 | dump_count等于atomic_inc_return( & core_dump_count) |
| 662 | 如果core_pipe_limit且core_pipe_limit小于dump_count则 |
| 666 | 转到:fail_dropcount |
| 669 | helper_argv等于分配数组内存 |
| 671 | 如果非helper_argv则 |
| 674 | 转到:fail_dropcount |
| 678 | helper_argv[argi] = NULL |
| 688 | 释放内存 |
| 689 | 如果retval则 |
| 694 | 否则 |
| 696 | open_flags等于O_CREAT按位或O_RDWR按位或O_NOFOLLOW按位或O_LARGEFILE按位或O_EXCL |
| 699 | 如果limit小于minimal dump size 则转到:fail_unlock |
| 702 | 如果need_suid_safe且corename[0]不等于'/'则 |
| 707 | 转到:fail_unlock |
| 715 | 如果非need_suid_safe则 |
| 731 | 如果need_suid_safe则 |
| 744 | get_fs_root(文件系统信息, & root) |
| 745 | task_unlock( & Set up the first task table, touch at your own risk!. Base=0,* limit=0x1fffff (=2MB)) |
| 746 | file等于file_open_root(dentry, mnt, corename, open_flags, 0600) |
| 749 | 否则 |
| 752 | 如果是错误则转到:fail_unlock |
| 755 | inode等于file_inode(file) |
| 756 | 如果i_nlink大于1则转到:close_fail |
| 758 | 如果目录项存在于哈希中则转到:close_fail |
| 764 | 如果非S_ISREG(i_mode)则转到:close_fail |
| 772 | 如果非uid_eq(i_uid, current_fsuid())则转到:close_fail |
| 774 | 如果i_mode按位与0677的值不等于0600则转到:close_fail |
| 776 | 如果非f_mode按位与Has write method(s) 的值则转到:close_fail |
| 778 | 如果do_truncate(dentry, 0, 0, file)则转到:close_fail |
| 783 | retval等于Helper to unshare the files of the current task.* We don't want to expose copy_files internals to* the exec layer of the kernel. |
| 784 | 如果retval则转到:close_fail |
| 786 | 如果displaced则put_files_struct(displaced) |
| 788 | 如果非dump_interrupted()则 |
| 795 | close_fail : |
| 798 | fail_dropcount : |
| 799 | 如果ispipe则atomic_dec( & core_dump_count) |
| 801 | fail_unlock : |
| 802 | 释放内存 |
| 803 | 释放内存 |
| 804 | coredump_finish(mm, core_dumped) |
| 806 | fail_creds : |
| 808 | fail : |
| 809 | 返回 |
| 名称 | 描述 |
|---|---|
| get_signal |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |