函数逻辑报告 |
Source Code:kernel\module.c |
Create Date:2022-07-27 11:59:58 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Allocate and load the module: note that size of section 0 is alwayszero, and we rely on this for optional sections.
函数原型:static int load_module(struct load_info *info, const char __user *uargs, int flags)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct load_info * | info | |
const char __user * | uargs | |
int | flags |
3789 | err等于0 |
3800 | 如果blacklisted(name)则 |
3805 | err等于module_sig_check(info, flags) |
3809 | err等于rewrite_section_headers(info, flags) |
3820 | mod等于layout_and_allocate(info, flags) |
3821 | 如果是错误则 |
3829 | err等于We try to place it in the list now to make sure it's unique before* we dedicate too many resources. In particular, temporary percpu* memory exhaustion. |
3830 | 如果err则转到:free_module |
3844 | err等于percpu_modalloc(mod, info) |
3845 | 如果err则转到:unlink_mod |
3849 | err等于module_unload_init(mod) |
3850 | 如果err则转到:unlink_mod |
3853 | init_param_lock(mod) |
3857 | err等于find_module_sections(mod, info) |
3858 | 如果err则转到:free_unload |
3862 | 如果err则转到:free_unload |
3866 | setup_modinfo(mod, info) |
3870 | 如果err小于0则转到:free_modinfo |
3873 | err等于apply_relocations(mod, info) |
3874 | 如果err小于0则转到:free_modinfo |
3877 | err等于post_relocation(mod, info) |
3878 | 如果err小于0则转到:free_modinfo |
3881 | flush_module_icache(mod) |
3884 | The command line arguments (may be mangled). People like keeping pointers to this stuff 等于We don't want strings.h stuff being used by user stuff by accident |
3885 | 如果是错误则 |
3887 | 转到:free_arch_cleanup |
3890 | dynamic_debug_setup(mod, debug, num_debug) |
3893 | ftrace_module_init(mod) |
3896 | err等于complete_formation(mod, info) |
3897 | 如果err则转到:ddebug_cleanup |
3900 | err等于prepare_coming_module(mod) |
3901 | 如果err则转到:bug_cleanup |
3905 | after_dashes等于解析参数 |
3908 | 如果是错误则 |
3910 | 转到:coming_cleanup |
3911 | 否则如果after_dashes则 |
3912 | 打印警告信息("%s: parameters '%s' after `--' ignored\n", Unique handle for this module , after_dashes) |
3918 | 如果err小于0则转到:coming_cleanup |
3921 | 如果is_livepatch_module(mod)则 |
3922 | err等于Persist Elf information about a module. Copy the Elf header,* section header table, section string table, and symtab section* index from info to mod->klp_info. |
3923 | 如果err小于0则转到:sysfs_cleanup |
3931 | trace_module_load(mod) |
3935 | sysfs_cleanup : |
3936 | mod_sysfs_teardown(mod) |
3937 | coming_cleanup : |
3938 | state等于 Going away. |
3939 | destroy_params(kp, num_kp) |
3940 | blocking_notifier_call_chain( & module_notify_list, Going away. , mod) |
3942 | klp_module_going(mod) |
3943 | bug_cleanup : |
3946 | module_bug_cleanup(mod) |
3949 | ddebug_cleanup : |
3950 | ftrace_release_mod(mod) |
3951 | dynamic_debug_remove(mod, debug) |
3953 | kfree( The command line arguments (may be mangled). People like keeping pointers to this stuff ) |
3954 | free_arch_cleanup : |
3955 | module_arch_cleanup(mod) |
3956 | free_modinfo : |
3957 | free_modinfo(mod) |
3958 | free_unload : |
3959 | module_unload_free(mod) |
3960 | unlink_mod : |
3963 | 删除不需要重新初始化的列表项 |
3964 | mod_tree_remove(mod) |
3969 | free_module : |
3974 | free_copy : |
3976 | 返回:err |
名称 | 描述 |
---|---|
SYSCALL_DEFINE3 | |
SYSCALL_DEFINE3 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |