Lines Matching refs:module
191 static inline int strong_try_module_get(struct module *mod) in strong_try_module_get()
202 static inline void add_taint_module(struct module *mod, unsigned flag, in add_taint_module()
213 void __module_put_and_exit(struct module *mod, long code) in __module_put_and_exit()
282 struct module *owner, in each_symbol_in_section()
284 struct module *owner, in each_symbol_in_section()
300 struct module *owner, in each_symbol_section()
304 struct module *mod; in each_symbol_section()
367 struct module *owner;
373 struct module *owner, in check_symbol()
415 struct module *owner, in find_symbol_in_section()
433 struct module **owner, in find_symbol()
458 static struct module *find_module_all(const char *name, size_t len, in find_module_all()
461 struct module *mod; in find_module_all()
472 struct module *find_module(const char *name) in find_module()
480 static inline void __percpu *mod_percpu(struct module *mod) in mod_percpu()
485 static int percpu_modalloc(struct module *mod, struct load_info *info) in percpu_modalloc()
509 static void percpu_modfree(struct module *mod) in percpu_modfree()
519 static void percpu_modcopy(struct module *mod, in percpu_modcopy()
539 struct module *mod; in is_module_percpu_address()
566 static inline void __percpu *mod_percpu(struct module *mod) in mod_percpu()
570 static int percpu_modalloc(struct module *mod, struct load_info *info) in percpu_modalloc()
577 static inline void percpu_modfree(struct module *mod) in percpu_modfree()
584 static inline void percpu_modcopy(struct module *mod, in percpu_modcopy()
598 static void setup_modinfo_##field(struct module *mod, const char *s) \
607 static int modinfo_##field##_exists(struct module *mod) \
611 static void free_modinfo_##field(struct module *mod) \
637 static int module_unload_init(struct module *mod) in module_unload_init()
655 static int already_uses(struct module *a, struct module *b) in already_uses()
676 static int add_module_usage(struct module *a, struct module *b) in add_module_usage()
695 int ref_module(struct module *a, struct module *b) in ref_module()
717 static void module_unload_free(struct module *mod) in module_unload_free()
723 struct module *i = use->target; in module_unload_free()
749 static int try_release_module_ref(struct module *mod) in try_release_module_ref()
763 static int try_stop_module(struct module *mod, int flags, int *forced) in try_stop_module()
787 int module_refcount(struct module *mod) in module_refcount()
794 static void free_module(struct module *mod);
799 struct module *mod; in SYSCALL_DEFINE2()
866 static inline void print_unload_info(struct seq_file *m, struct module *mod) in print_unload_info()
893 struct module *owner; in __symbol_put()
906 struct module *modaddr; in symbol_put_addr()
933 void __module_get(struct module *module) in __module_get() argument
935 if (module) { in __module_get()
937 atomic_inc(&module->refcnt); in __module_get()
938 trace_module_get(module, _RET_IP_); in __module_get()
944 bool try_module_get(struct module *module) in try_module_get() argument
948 if (module) { in try_module_get()
951 if (likely(module_is_live(module) && in try_module_get()
952 atomic_inc_not_zero(&module->refcnt) != 0)) in try_module_get()
953 trace_module_get(module, _RET_IP_); in try_module_get()
963 void module_put(struct module *module) in module_put() argument
967 if (module) { in module_put()
969 ret = atomic_dec_if_positive(&module->refcnt); in module_put()
971 trace_module_put(module, _RET_IP_); in module_put()
978 static inline void print_unload_info(struct seq_file *m, struct module *mod) in print_unload_info()
984 static inline void module_unload_free(struct module *mod) in module_unload_free()
988 int ref_module(struct module *a, struct module *b) in ref_module()
994 static inline int module_unload_init(struct module *mod) in module_unload_init()
1000 static size_t module_flags_taint(struct module *mod, char *buf) in module_flags_taint()
1107 static int try_to_force_load(struct module *mod, const char *reason) in try_to_force_load()
1122 const struct module *crc_owner) in maybe_relocated()
1134 struct module *mod, in check_version()
1136 const struct module *crc_owner) in check_version()
1175 struct module *mod) in check_modstruct_version()
1203 struct module *mod, in check_version()
1205 const struct module *crc_owner) in check_version()
1212 struct module *mod) in check_modstruct_version()
1225 static const struct kernel_symbol *resolve_symbol(struct module *mod, in resolve_symbol()
1230 struct module *owner; in resolve_symbol()
1268 resolve_symbol_wait(struct module *mod, in resolve_symbol_wait()
1326 static void add_sect_attrs(struct module *mod, const struct load_info *info) in add_sect_attrs()
1380 static void remove_sect_attrs(struct module *mod) in remove_sect_attrs()
1425 static void add_notes_attrs(struct module *mod, const struct load_info *info) in add_notes_attrs()
1484 static void remove_notes_attrs(struct module *mod) in remove_notes_attrs()
1492 static inline void add_sect_attrs(struct module *mod, in add_sect_attrs()
1497 static inline void remove_sect_attrs(struct module *mod) in remove_sect_attrs()
1501 static inline void add_notes_attrs(struct module *mod, in add_notes_attrs()
1506 static inline void remove_notes_attrs(struct module *mod) in remove_notes_attrs()
1511 static void add_usage_links(struct module *mod) in add_usage_links()
1526 static void del_usage_links(struct module *mod) in del_usage_links()
1538 static int module_add_modinfo_attrs(struct module *mod) in module_add_modinfo_attrs()
1565 static void module_remove_modinfo_attrs(struct module *mod) in module_remove_modinfo_attrs()
1581 static void mod_kobject_put(struct module *mod) in mod_kobject_put()
1589 static int mod_sysfs_init(struct module *mod) in mod_sysfs_init()
1622 static int mod_sysfs_setup(struct module *mod, in mod_sysfs_setup()
1664 static void mod_sysfs_fini(struct module *mod) in mod_sysfs_fini()
1673 static int mod_sysfs_setup(struct module *mod, in mod_sysfs_setup()
1681 static void mod_sysfs_fini(struct module *mod) in mod_sysfs_fini()
1685 static void module_remove_modinfo_attrs(struct module *mod) in module_remove_modinfo_attrs()
1689 static void del_usage_links(struct module *mod) in del_usage_links()
1695 static void mod_sysfs_teardown(struct module *mod) in mod_sysfs_teardown()
1749 static void unset_module_core_ro_nx(struct module *mod) in unset_module_core_ro_nx()
1759 static void unset_module_init_ro_nx(struct module *mod) in unset_module_init_ro_nx()
1772 struct module *mod; in set_all_modules_text_rw()
1795 struct module *mod; in set_all_modules_text_ro()
1816 static void unset_module_core_ro_nx(struct module *mod) { } in unset_module_core_ro_nx()
1817 static void unset_module_init_ro_nx(struct module *mod) { } in unset_module_init_ro_nx()
1825 void __weak module_arch_cleanup(struct module *mod) in module_arch_cleanup()
1829 void __weak module_arch_freeing_init(struct module *mod) in module_arch_freeing_init()
1834 static void free_module(struct module *mod) in free_module()
1889 struct module *owner; in __symbol_get()
1908 static int verify_export_symbols(struct module *mod) in verify_export_symbols()
1911 struct module *owner; in verify_export_symbols()
1940 static int simplify_symbols(struct module *mod, const struct load_info *info) in simplify_symbols()
2003 static int apply_relocations(struct module *mod, const struct load_info *info) in apply_relocations()
2033 unsigned int __weak arch_mod_section_prepend(struct module *mod, in arch_mod_section_prepend()
2041 static long get_offset(struct module *mod, unsigned int *size, in get_offset()
2056 static void layout_sections(struct module *mod, struct load_info *info) in layout_sections()
2132 static void set_license(struct module *mod, const char *license) in set_license()
2179 static void setup_modinfo(struct module *mod, struct load_info *info) in setup_modinfo()
2190 static void free_modinfo(struct module *mod) in free_modinfo()
2213 const struct module *mod) in is_exported()
2292 static void layout_symtab(struct module *mod, struct load_info *info) in layout_symtab()
2342 static void add_kallsyms(struct module *mod, const struct load_info *info) in add_kallsyms()
2379 static inline void layout_symtab(struct module *mod, struct load_info *info) in layout_symtab()
2383 static void add_kallsyms(struct module *mod, const struct load_info *info) in add_kallsyms()
2427 static void kmemleak_load_module(const struct module *mod, in kmemleak_load_module()
2433 kmemleak_scan_area(mod, sizeof(struct module), GFP_KERNEL); in kmemleak_load_module()
2447 static inline void kmemleak_load_module(const struct module *mod, in kmemleak_load_module()
2657 static struct module *setup_load_info(struct load_info *info, int flags) in setup_load_info()
2661 struct module *mod; in setup_load_info()
2705 static int check_modinfo(struct module *mod, struct load_info *info, int flags) in check_modinfo()
2739 static int find_module_sections(struct module *mod, struct load_info *info) in find_module_sections()
2825 static int move_module(struct module *mod, struct load_info *info) in move_module()
2888 static int check_module_license_and_versions(struct module *mod) in check_module_license_and_versions()
2924 static void flush_module_icache(const struct module *mod) in flush_module_icache()
2950 struct module *mod) in module_frob_arch_sections()
2955 static struct module *layout_and_allocate(struct load_info *info, int flags) in layout_and_allocate()
2958 struct module *mod; in layout_and_allocate()
2996 static void module_deallocate(struct module *mod, struct load_info *info) in module_deallocate()
3006 struct module *me) in module_finalize()
3011 static int post_relocation(struct module *mod, const struct load_info *info) in post_relocation()
3030 struct module *mod; in finished_loading()
3049 static void do_mod_ctors(struct module *mod) in do_mod_ctors()
3078 static noinline int do_init_module(struct module *mod) in do_init_module()
3189 static int add_unformed_module(struct module *mod) in add_unformed_module()
3192 struct module *old; in add_unformed_module()
3222 static int complete_formation(struct module *mod, struct load_info *info) in complete_formation()
3276 struct module *mod; in load_module()
3495 static const char *get_ksymbol(struct module *mod, in get_ksymbol()
3548 struct module *mod; in module_address_lookup()
3573 struct module *mod; in lookup_module_symbol_name()
3598 struct module *mod; in lookup_module_symbol_attrs()
3626 struct module *mod; in module_get_kallsym()
3650 static unsigned long mod_find_symname(struct module *mod, const char *name) in mod_find_symname()
3665 struct module *mod; in module_kallsyms_lookup_name()
3687 struct module *, unsigned long), in module_kallsyms_on_each_symbol() argument
3690 struct module *mod; in module_kallsyms_on_each_symbol()
3711 static char *module_flags(struct module *mod, char *buf) in module_flags()
3754 struct module *mod = list_entry(p, struct module, list); in m_show()
3817 struct module *mod; in search_module_extables()
3864 struct module *__module_address(unsigned long addr) in __module_address()
3866 struct module *mod; in __module_address()
3907 struct module *__module_text_address(unsigned long addr) in __module_text_address()
3909 struct module *mod = __module_address(addr); in __module_text_address()
3923 struct module *mod; in print_modules()
3943 void module_layout(struct module *mod, in module_layout()