| Function report | 
| Source Code: kernel\module.c | Create Date:2022-07-28 10:59:22 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Allocate and load the module: note that size of section 0 is alwayszero, and we rely on this for optional sections.
Proto:static int load_module(struct load_info *info, const char __user *uargs, int flags)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct load_info * | info | |
| const char __user * | uargs | |
| int | flags | 
| 3789 | err = 0 | 
| 3800 | If blacklisted(name) Then | 
| 3805 | err = module_sig_check(info, flags) | 
| 3809 | err = rewrite_section_headers(info, flags) | 
| 3820 | mod = layout_and_allocate(info, flags) | 
| 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 | If err Then Go to free_module | 
| 3844 | err = percpu_modalloc(mod, info) | 
| 3845 | If err Then Go to unlink_mod | 
| 3849 | err = module_unload_init(mod) | 
| 3850 | If err Then Go to unlink_mod | 
| 3853 | init_param_lock(mod) | 
| 3857 | err = find_module_sections(mod, info) | 
| 3858 | If err Then Go to free_unload | 
| 3861 | err = check_module_license_and_versions(mod) | 
| 3862 | If err Then Go to free_unload | 
| 3866 | setup_modinfo(mod, info) | 
| 3870 | If err < 0 Then Go to free_modinfo | 
| 3873 | err = apply_relocations(mod, info) | 
| 3874 | If err < 0 Then Go to free_modinfo | 
| 3877 | err = post_relocation(mod, info) | 
| 3878 | If err < 0 Then Go to 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 | 
| 3886 | err = PTR_ERR( The command line arguments (may be mangled). People like keeping pointers to this stuff ) | 
| 3887 | Go to free_arch_cleanup | 
| 3890 | dynamic_debug_setup(mod, debug, num_debug) | 
| 3893 | ftrace_module_init(mod) | 
| 3896 | err = complete_formation(mod, info) | 
| 3897 | If err Then Go to ddebug_cleanup | 
| 3900 | err = prepare_coming_module(mod) | 
| 3901 | If err Then Go to bug_cleanup | 
| 3908 | If IS_ERR(after_dashes) Then | 
| 3909 | err = PTR_ERR(after_dashes) | 
| 3910 | Go to coming_cleanup | 
| 3911 | Else if after_dashes Then | 
| 3912 | pr_warn("%s: parameters '%s' after `--' ignored\n", Unique handle for this module , after_dashes) | 
| 3918 | If err < 0 Then Go to coming_cleanup | 
| 3921 | If is_livepatch_module(mod) Then | 
| 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 | If err < 0 Then Go to 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 : | 
| 3964 | mod_tree_remove(mod) | 
| 3969 | free_module : | 
| 3974 | free_copy : | 
| 3976 | Return err | 
| Name | Describe | 
|---|---|
| SYSCALL_DEFINE3 | |
| SYSCALL_DEFINE3 | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |