Home
last modified time | relevance | path

Searched refs:sym (Results 1 – 14 of 14) sorted by relevance

/kernel/module/
Dkallsyms.c37 static char elf_type(const Elf_Sym *sym, const struct load_info *info) in elf_type() argument
41 if (ELF_ST_BIND(sym->st_info) == STB_WEAK) { in elf_type()
42 if (ELF_ST_TYPE(sym->st_info) == STT_OBJECT) in elf_type()
47 if (sym->st_shndx == SHN_UNDEF) in elf_type()
49 if (sym->st_shndx == SHN_ABS || sym->st_shndx == info->index.pcpu) in elf_type()
51 if (sym->st_shndx >= SHN_LORESERVE) in elf_type()
53 if (sechdrs[sym->st_shndx].sh_flags & SHF_EXECINSTR) in elf_type()
55 if (sechdrs[sym->st_shndx].sh_flags & SHF_ALLOC && in elf_type()
56 sechdrs[sym->st_shndx].sh_type != SHT_NOBITS) { in elf_type()
57 if (!(sechdrs[sym->st_shndx].sh_flags & SHF_WRITE)) in elf_type()
[all …]
Dmain.c250 static const char *kernel_symbol_name(const struct kernel_symbol *sym) in kernel_symbol_name() argument
253 return offset_to_ptr(&sym->name_offset); in kernel_symbol_name()
255 return sym->name; in kernel_symbol_name()
259 static const char *kernel_symbol_namespace(const struct kernel_symbol *sym) in kernel_symbol_namespace() argument
262 if (!sym->namespace_offset) in kernel_symbol_namespace()
264 return offset_to_ptr(&sym->namespace_offset); in kernel_symbol_namespace()
266 return sym->namespace; in kernel_symbol_namespace()
270 int cmp_name(const void *name, const void *sym) in cmp_name() argument
272 return strcmp(name, kernel_symbol_name(sym)); in cmp_name()
279 struct kernel_symbol *sym; in find_exported_symbol_in_section() local
[all …]
Dinternal.h77 unsigned int sym, str, mod, vers, info, pcpu; member
95 const struct kernel_symbol *sym; member
103 int cmp_name(const void *name, const void *sym);
120 static inline unsigned long kernel_symbol_value(const struct kernel_symbol *sym) in kernel_symbol_value() argument
123 return (unsigned long)offset_to_ptr(&sym->value_offset); in kernel_symbol_value()
125 return sym->value; in kernel_symbol_value()
Dgki_module.c25 static int cmp_name(const void *sym, const void *protected_sym) in cmp_name() argument
27 return strncmp(sym, protected_sym, MAX_STRCMP_LEN); in cmp_name()
Dlivepatch.c49 symndx = info->index.sym; in copy_module_elf()
/kernel/
Dfail_function.c56 static struct fei_attr *fei_attr_new(const char *sym, unsigned long addr) in fei_attr_new() argument
62 attr->kp.symbol_name = kstrdup(sym, GFP_KERNEL); in fei_attr_new()
83 static struct fei_attr *fei_attr_lookup(const char *sym) in fei_attr_lookup() argument
88 if (!strcmp(attr->kp.symbol_name, sym)) in fei_attr_lookup()
241 char *buf, *sym; in fei_write() local
252 sym = strstrip(buf); in fei_write()
257 if (sym[0] == '\0') { in fei_write()
263 if (sym[0] == '!') { in fei_write()
264 attr = fei_attr_lookup(sym + 1); in fei_write()
274 addr = kallsyms_lookup_name(sym); in fei_write()
[all …]
Dkexec_file.c1094 const Elf_Sym *sym; in kexec_purgatory_get_symbol_addr() local
1097 sym = kexec_purgatory_find_symbol(pi, name); in kexec_purgatory_get_symbol_addr()
1098 if (!sym) in kexec_purgatory_get_symbol_addr()
1101 sechdr = &pi->sechdrs[sym->st_shndx]; in kexec_purgatory_get_symbol_addr()
1107 return (void *)(sechdr->sh_addr + sym->st_value); in kexec_purgatory_get_symbol_addr()
1118 const Elf_Sym *sym; in kexec_purgatory_get_set_symbol() local
1122 sym = kexec_purgatory_find_symbol(pi, name); in kexec_purgatory_get_set_symbol()
1123 if (!sym) in kexec_purgatory_get_set_symbol()
1126 if (sym->st_size != size) { in kexec_purgatory_get_set_symbol()
1128 name, (unsigned long)sym->st_size, size); in kexec_purgatory_get_set_symbol()
[all …]
Dkprobes.c133 .sym = KPROBE_INSN_PAGE_SYM,
198 PAGE_SIZE, false, c->sym); in __get_insn_slot()
223 kip->cache->sym); in collect_one_slot()
315 unsigned long *value, char *type, char *sym) in kprobe_cache_get_kallsym() argument
324 strscpy(sym, c->sym, KSYM_NAME_LEN); in kprobe_cache_get_kallsym()
351 .sym = KPROBE_OPTINSN_PAGE_SYM,
2178 int kprobe_on_func_entry(kprobe_opcode_t *addr, const char *sym, unsigned long offset) in kprobe_on_func_entry() argument
2181 kprobe_opcode_t *kp_addr = _kprobe_addr(addr, sym, offset, &on_func_entry); in kprobe_on_func_entry()
2518 char *type, char *sym) in arch_kprobe_get_kallsym() argument
2524 char *sym) in kprobe_get_kallsym() argument
[all …]
/kernel/livepatch/
Dcore.c201 Elf_Sym *sym; in klp_resolve_symbols() local
221 sym = (Elf_Sym *)sechdrs[symndx].sh_addr + ELF_R_SYM(relas[i].r_info); in klp_resolve_symbols()
222 if (sym->st_shndx != SHN_LIVEPATCH) { in klp_resolve_symbols()
224 strtab + sym->st_name); in klp_resolve_symbols()
229 cnt = sscanf(strtab + sym->st_name, in klp_resolve_symbols()
234 strtab + sym->st_name); in klp_resolve_symbols()
258 sym->st_value = addr; in klp_resolve_symbols()
/kernel/bpf/
Dcore.c557 char *sym = prog->aux->ksym.name; in bpf_prog_ksym_set_name() local
558 const char *end = sym + KSYM_NAME_LEN; in bpf_prog_ksym_set_name()
573 sym += snprintf(sym, KSYM_NAME_LEN, "bpf_prog_"); in bpf_prog_ksym_set_name()
574 sym = bin2hex(sym, prog->tag, sizeof(prog->tag)); in bpf_prog_ksym_set_name()
581 snprintf(sym, (size_t)(end - sym), "_%s", func_name); in bpf_prog_ksym_set_name()
586 snprintf(sym, (size_t)(end - sym), "_%s", prog->aux->name); in bpf_prog_ksym_set_name()
588 *sym = 0; in bpf_prog_ksym_set_name()
690 unsigned long *off, char *sym) in __bpf_address_lookup() argument
701 strncpy(sym, ksym->name, KSYM_NAME_LEN); in __bpf_address_lookup()
703 ret = sym; in __bpf_address_lookup()
[all …]
/kernel/trace/
Dtrace_syscalls.c38 static inline bool arch_syscall_match_sym_name(const char *sym, const char *name) in arch_syscall_match_sym_name() argument
46 return !strcmp(sym + 3, name + 3); in arch_syscall_match_sym_name()
Dtrace_output.c517 #define MARK(v, s) {.val = v, .sym = s}
521 char sym; member
542 return (i == size) ? ' ' : mark[i].sym; in trace_find_mark()
Dftrace.c7166 unsigned long *off, char *sym) in ftrace_func_address_lookup() argument
7184 if (sym) in ftrace_func_address_lookup()
7185 strlcpy(sym, found_func->name, KSYM_NAME_LEN); in ftrace_func_address_lookup()
7195 unsigned long *off, char **modname, char *sym) in ftrace_mod_address_lookup() argument
7203 ret = ftrace_func_address_lookup(mod_map, addr, size, off, sym); in ftrace_mod_address_lookup()
8307 const char **sym; in kallsyms_callback() local
8310 sym = bsearch(&name, args->syms, args->cnt, sizeof(*args->syms), symbols_cmp); in kallsyms_callback()
8311 if (!sym) in kallsyms_callback()
8314 idx = sym - args->syms; in kallsyms_callback()
/kernel/events/
Dcore.c8977 const char *sym) in perf_event_ksymbol() argument
8991 strlcpy(name, sym, KSYM_NAME_LEN); in perf_event_ksymbol()