Lines Matching refs:name
353 static unsigned int find_sec(const struct load_info *info, const char *name)
361 && strcmp(info->secstrings + shdr->sh_name, name) == 0)
368 static void *section_addr(const struct load_info *info, const char *name)
371 return (void *)info->sechdrs[find_sec(info, name)].sh_addr;
376 const char *name,
380 unsigned int sec = find_sec(info, name);
496 const char *name;
519 fsa->name);
526 "using it.\n", fsa->name);
556 return sym->name;
571 static int cmp_name(const void *name, const void *sym)
573 return strcmp(name, kernel_symbol_name(sym));
583 sym = bsearch(fsa->name, syms->start, syms->stop - syms->start,
595 static const struct kernel_symbol *find_symbol(const char *name,
604 fsa.name = name;
618 pr_debug("Failed to find symbol %s\n", name);
623 * Search for module by name: must hold module_mutex (or preempt disabled
626 static struct module *find_module_all(const char *name, size_t len,
637 if (strlen(mod->name) == len && !memcmp(mod->name, name, len))
643 struct module *find_module(const char *name)
646 return find_module_all(name, strlen(name), false);
667 mod->name, align, PAGE_SIZE);
674 mod->name, (unsigned long)pcpusec->sh_size);
805 .attr = { .name = __stringify(field), .mode = 0444 }, \
849 pr_debug("%s uses %s!\n", a->name, b->name);
853 pr_debug("%s does not use %s!\n", a->name, b->name);
868 pr_debug("Allocating new usage for %s.\n", a->name);
909 pr_debug("%s unusing %s\n", mod->name, i->name);
985 char name[MODULE_NAME_LEN];
991 if (strncpy_from_user(name, name_user, MODULE_NAME_LEN-1) < 0)
993 name[MODULE_NAME_LEN-1] = '\0';
995 audit_log_kern_module(name);
1000 mod = find_module(name);
1015 pr_debug("%s already dying\n", mod->name);
1046 /* Store the name of the last unloaded module for diagnostic purposes */
1047 strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
1071 seq_printf(m, "%s,", use->source->name);
1292 pr_warn("%s: %s: kernel tainted.\n", mod->name, reason);
1332 if (strcmp(versions[i].name, symname) != 0)
1347 pr_warn_once("%s: no symbol version for %s\n", info->name, symname);
1352 info->name, symname);
1432 mod->name, kernel_symbol_name(sym), namespace);
1447 mod->name, owner->name);
1453 mod->name, owner->name);
1462 const char *name,
1478 sym = find_symbol(name, &owner, &crc, &license,
1491 if (!check_version(info, name, mod, crc)) {
1519 const char *name)
1525 !IS_ERR(ksym = resolve_symbol(mod, info, name, owner))
1529 mod->name, owner);
1592 kfree(sect_attrs->attrs[section].battr.attr.name);
1615 sect_attrs->grp.name = "sections";
1627 sattr->battr.attr.name =
1629 if (sattr->battr.attr.name == NULL)
1661 * /sys/module/foo/notes/.section.name gives contents of SHT_NOTE sections.
1725 nattr->attr.name = mod->sect_attrs->attrs[loaded].battr.attr.name;
1785 sysfs_remove_link(use->target->holders_dir, mod->name);
1799 &mod->mkobj.kobj, mod->name);
1857 if (!attr->attr.name)
1880 pr_err("%s: module sysfs not initialized\n", mod->name);
1885 kobj = kset_find_obj(module_kset, mod->name);
1887 pr_err("%s: module is already loaded\n", mod->name);
1898 "%s", mod->name);
2105 mod->name, secstrings + sechdrs[i].sh_name, i);
2151 /* Elf section name string table */
2232 ddebug_remove_module(mod->name);
2338 mod->name, kernel_symbol_name(s),
2347 static bool ignore_undef_symbol(Elf_Half emachine, const char *name)
2358 return !strcmp(name, "_GLOBAL_OFFSET_TABLE_");
2373 const char *name = info->strtab + sym[i].st_name;
2378 if (!strncmp(name, "__gnu_lto", 9))
2383 pr_debug("Common symbol: %s\n", name);
2385 mod->name);
2400 ksym = resolve_symbol_wait(mod, info, name);
2410 ignore_undef_symbol(info->hdr->e_machine, name)))
2415 mod->name, name, ret);
2587 mod->name, license);
2650 attr->setup(mod, get_modinfo(info, attr->attr.name));
2668 static const struct kernel_symbol *lookup_exported_symbol(const char *name,
2672 return bsearch(name, start, stop - start,
2676 static int is_exported(const char *name, unsigned long value,
2681 ks = lookup_exported_symbol(name, __start___ksymtab, __stop___ksymtab);
2683 ks = lookup_exported_symbol(name, mod->syms, mod->syms + mod->num_syms);
2871 ddebug_add_module(debug, num, mod->name);
2877 ddebug_remove_module(mod->name);
2887 bool __weak module_init_section(const char *name)
2889 return strstarts(name, ".init");
2892 bool __weak module_exit_section(const char *name)
2894 return strstarts(name, ".exit");
3004 * section name string table, and the indices used for it (sh_name).
3034 * Verify if the section name table index is valid.
3046 * The section name table must be NUL-terminated, as required
3084 pr_err("Invalid ELF section name in module (section %u type %u)\n",
3120 mod->name);
3130 mod->name);
3144 mod->name);
3220 /* Try to find a name early so we can log errors with a module name */
3223 info->name = get_modinfo(info, "name");
3238 info->name ?: "(missing .modinfo section or name field)");
3245 info->name ?: "(missing .modinfo section or name field)");
3252 * If we didn't load the .modinfo 'name' field earlier, fall back to
3253 * on-disk struct mod 'name' field.
3255 if (!info->name)
3256 info->name = info->mod->name;
3283 info->name, modmagic, vermagic);
3290 mod->name);
3299 "is unknown, you have been warned.\n", mod->name);
3351 mod->name);
3419 pr_warn("%s: Ignoring obsolete parameters\n", mod->name);
3499 if (strcmp(mod->name, "ndiswrapper") == 0)
3503 if (strcmp(mod->name, "driverloader") == 0)
3508 if (strcmp(mod->name, "lve") == 0)
3513 pr_warn("%s: module license taints kernel.\n", mod->name);
3666 /* Is this module of this name done loading? No locks held. */
3667 static bool finished_loading(const char *name)
3679 mod = find_module_all(name, strlen(name), true);
3749 __func__, mod->name, ret, __func__);
3848 old = find_module_all(mod->name, strlen(mod->name), true);
3855 finished_loading(mod->name));
3861 old = find_module_all(mod->name, strlen(mod->name),
4001 * Now that we know we have the correct module name, check
4004 if (blacklisted(info->name)) {
4006 pr_err("Module %s is blacklisted\n", info->name);
4027 audit_log_kern_module(mod->name);
4039 "kernel\n", mod->name);
4109 after_dashes = parse_args(mod->name, mod->args, mod->kp, mod->num_kp,
4117 mod->name, after_dashes);
4255 * Given a module and address, find the corresponding symbol and return its name
4330 *modname = mod->name;
4370 unsigned long *offset, char *modname, char *name)
4385 strlcpy(modname, mod->name, MODULE_NAME_LEN);
4386 if (name)
4387 strlcpy(name, sym, KSYM_NAME_LEN);
4398 char *name, char *module_name, int *exported)
4414 strlcpy(name, kallsyms_symbol_name(kallsyms, symnum), KSYM_NAME_LEN);
4415 strlcpy(module_name, mod->name, MODULE_NAME_LEN);
4416 *exported = is_exported(name, *value, mod);
4426 /* Given a module and name of symbol, find and return the symbol's value */
4427 static unsigned long find_kallsyms_symbol_value(struct module *mod, const char *name)
4435 if (strcmp(name, kallsyms_symbol_name(kallsyms, i)) == 0 &&
4442 /* Look for this name: can be of form module:name. */
4443 unsigned long module_kallsyms_lookup_name(const char *name)
4451 if ((colon = strnchr(name, MODULE_NAME_LEN, ':')) != NULL) {
4452 if ((mod = find_module_all(name, colon - name, false)) != NULL)
4458 if ((ret = find_kallsyms_symbol_value(mod, name)) != 0)
4588 mod->name, mod->init_layout.size + mod->core_layout.size);
4775 pr_cont(" %s%s", mod->name, module_flags(mod, buf));