• Home
  • Raw
  • Download

Lines Matching refs:addr

296 bool __is_insn_slot_addr(struct kprobe_insn_cache *c, unsigned long addr)  in __is_insn_slot_addr()  argument
303 if (addr >= (unsigned long)kip->insns && in __is_insn_slot_addr()
304 addr < (unsigned long)kip->insns + PAGE_SIZE) { in __is_insn_slot_addr()
376 struct kprobe *get_kprobe(void *addr) in get_kprobe() argument
381 head = &kprobe_table[hash_ptr(addr, KPROBE_HASH_BITS)]; in get_kprobe()
384 if (p->addr == addr) in get_kprobe()
491 static struct kprobe *get_optimized_kprobe(kprobe_opcode_t *addr) in get_optimized_kprobe() argument
499 p = get_kprobe(addr - i); in get_optimized_kprobe()
503 if (arch_within_optimized_kprobe(op, addr)) in get_optimized_kprobe()
837 op->kp.addr = p->addr; in alloc_aggr_kprobe()
988 _p = get_optimized_kprobe(p->addr); in __arm_kprobe()
1010 _p = get_optimized_kprobe(p->addr); in __disarm_kprobe()
1079 ret = ftrace_set_filter_ip(ops, (unsigned long)p->addr, 0, 0); in __arm_kprobe_ftrace()
1080 if (WARN_ONCE(ret < 0, "Failed to arm kprobe-ftrace at %pS (error %d)\n", p->addr, ret)) in __arm_kprobe_ftrace()
1097 ftrace_set_filter_ip(ops, (unsigned long)p->addr, 1, 0); in __arm_kprobe_ftrace()
1125 ret = ftrace_set_filter_ip(ops, (unsigned long)p->addr, 1, 0); in __disarm_kprobe_ftrace()
1127 p->addr, ret); in __disarm_kprobe_ftrace()
1238 .addr = (void *) get_kprobe,
1279 ap->addr = p->addr; in init_aggr_kprobe()
1373 bool __weak arch_within_kprobe_blacklist(unsigned long addr) in arch_within_kprobe_blacklist() argument
1376 return addr >= (unsigned long)__kprobes_text_start && in arch_within_kprobe_blacklist()
1377 addr < (unsigned long)__kprobes_text_end; in arch_within_kprobe_blacklist()
1380 static bool __within_kprobe_blacklist(unsigned long addr) in __within_kprobe_blacklist() argument
1384 if (arch_within_kprobe_blacklist(addr)) in __within_kprobe_blacklist()
1391 if (addr >= ent->start_addr && addr < ent->end_addr) in __within_kprobe_blacklist()
1397 bool within_kprobe_blacklist(unsigned long addr) in within_kprobe_blacklist() argument
1401 if (__within_kprobe_blacklist(addr)) in within_kprobe_blacklist()
1405 if (!lookup_symbol_name(addr, symname)) { in within_kprobe_blacklist()
1410 addr = (unsigned long)kprobe_lookup_name(symname, 0); in within_kprobe_blacklist()
1411 if (addr) in within_kprobe_blacklist()
1412 return __within_kprobe_blacklist(addr); in within_kprobe_blacklist()
1431 kprobe_opcode_t *__weak arch_adjust_kprobe_addr(unsigned long addr, in arch_adjust_kprobe_addr() argument
1436 return (kprobe_opcode_t *)(addr + offset); in arch_adjust_kprobe_addr()
1446 _kprobe_addr(kprobe_opcode_t *addr, const char *symbol_name, in _kprobe_addr() argument
1449 if ((symbol_name && addr) || (!symbol_name && !addr)) in _kprobe_addr()
1460 addr = kprobe_lookup_name(symbol_name, offset); in _kprobe_addr()
1461 if (!addr) in _kprobe_addr()
1469 addr = (void *)addr + offset; in _kprobe_addr()
1470 if (!kallsyms_lookup_size_offset((unsigned long)addr, NULL, &offset)) in _kprobe_addr()
1472 addr = (void *)addr - offset; in _kprobe_addr()
1479 addr = arch_adjust_kprobe_addr((unsigned long)addr, offset, on_func_entry); in _kprobe_addr()
1480 if (addr) in _kprobe_addr()
1481 return addr; in _kprobe_addr()
1490 return _kprobe_addr(p->addr, p->symbol_name, p->offset, &on_func_entry); in kprobe_addr()
1503 ap = get_kprobe(p->addr); in __get_valid_kprobe()
1536 unsigned long addr = (unsigned long)p->addr; in check_ftrace_location() local
1538 if (ftrace_location(addr) == addr) { in check_ftrace_location()
1548 static bool is_cfi_preamble_symbol(unsigned long addr) in is_cfi_preamble_symbol() argument
1552 if (lookup_symbol_name(addr, symbuf)) in is_cfi_preamble_symbol()
1571 if (!(core_kernel_text((unsigned long) p->addr) || in check_kprobe_address_safe()
1572 is_module_text_address((unsigned long) p->addr)) || in check_kprobe_address_safe()
1573 in_gate_area_no_mm((unsigned long) p->addr) || in check_kprobe_address_safe()
1574 within_kprobe_blacklist((unsigned long) p->addr) || in check_kprobe_address_safe()
1575 jump_label_text_reserved(p->addr, p->addr) || in check_kprobe_address_safe()
1576 static_call_text_reserved(p->addr, p->addr) || in check_kprobe_address_safe()
1577 find_bug((unsigned long)p->addr) || in check_kprobe_address_safe()
1578 is_cfi_preamble_symbol((unsigned long)p->addr)) { in check_kprobe_address_safe()
1584 *probed_mod = __module_text_address((unsigned long) p->addr); in check_kprobe_address_safe()
1599 if (within_module_init((unsigned long)p->addr, *probed_mod) && in check_kprobe_address_safe()
1618 kprobe_opcode_t *addr; in register_kprobe() local
1622 addr = _kprobe_addr(p->addr, p->symbol_name, p->offset, &on_func_entry); in register_kprobe()
1623 if (IS_ERR(addr)) in register_kprobe()
1624 return PTR_ERR(addr); in register_kprobe()
1625 p->addr = addr; in register_kprobe()
1645 old_p = get_kprobe(p->addr); in register_kprobe()
1663 &kprobe_table[hash_ptr(p->addr, KPROBE_HASH_BITS)]); in register_kprobe()
1855 kps[i]->addr = NULL; in unregister_kprobes()
1860 if (kps[i]->addr) in unregister_kprobes()
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()
2197 void *addr; in register_kretprobe() local
2199 ret = kprobe_on_func_entry(rp->kp.addr, rp->kp.symbol_name, rp->kp.offset); in register_kretprobe()
2204 if (rp->kp.addr && warn_kprobe_rereg(&rp->kp)) in register_kretprobe()
2208 addr = kprobe_addr(&rp->kp); in register_kretprobe()
2209 if (IS_ERR(addr)) in register_kretprobe()
2210 return PTR_ERR(addr); in register_kretprobe()
2213 if (kretprobe_blacklist[i].addr == addr) in register_kretprobe()
2313 rps[i]->kp.addr = NULL; in unregister_kretprobes()
2324 if (rps[i]->kp.addr) { in unregister_kretprobes()
2459 kp->symbol_name, kp->offset, kp->addr); in dump_kprobe()
2655 if (within_module_init((unsigned long)p->addr, mod) || in kprobes_module_callback()
2657 within_module_core((unsigned long)p->addr, mod))) { in kprobes_module_callback()
2697 if (start <= (void *)p->addr && (void *)p->addr < end) in kprobe_free_init_mem()
2722 kretprobe_blacklist[i].addr = in init_kprobes()
2724 if (!kretprobe_blacklist[i].addr) in init_kprobes()
2770 void *addr = p->addr; in report_probe() local
2778 addr = NULL; in report_probe()
2782 addr, kprobe_type, sym, offset, in report_probe()
2786 addr, kprobe_type, p->addr); in report_probe()
2827 sym = kallsyms_lookup((unsigned long)p->addr, NULL, in show_kprobe_addr()