Home
last modified time | relevance | path

Searched refs:addr (Results 1 – 25 of 74) sorted by relevance

123

/kernel/
Dextable.c46 struct exception_table_entry *search_kernel_exception_table(unsigned long addr) in search_kernel_exception_table() argument
49 __stop___ex_table - __start___ex_table, addr); in search_kernel_exception_table()
53 const struct exception_table_entry *search_exception_tables(unsigned long addr) in search_exception_tables() argument
57 e = search_kernel_exception_table(addr); in search_exception_tables()
59 e = search_module_extables(addr); in search_exception_tables()
61 e = search_bpf_extables(addr); in search_exception_tables()
65 int init_kernel_text(unsigned long addr) in init_kernel_text() argument
67 if (addr >= (unsigned long)_sinittext && in init_kernel_text()
68 addr < (unsigned long)_einittext) in init_kernel_text()
73 int notrace core_kernel_text(unsigned long addr) in core_kernel_text() argument
[all …]
Diomem.c75 void *addr = NULL; in memremap() local
95 addr = try_ram_remap(offset, size, flags); in memremap()
96 if (!addr) in memremap()
97 addr = arch_memremap_wb(offset, size); in memremap()
106 if (!addr && is_ram == REGION_INTERSECTS && flags != MEMREMAP_WB) { in memremap()
112 if (!addr && (flags & MEMREMAP_WT)) in memremap()
113 addr = ioremap_wt(offset, size); in memremap()
115 if (!addr && (flags & MEMREMAP_WC)) in memremap()
116 addr = ioremap_wc(offset, size); in memremap()
118 return addr; in memremap()
[all …]
Dkprobes.c294 bool __is_insn_slot_addr(struct kprobe_insn_cache *c, unsigned long addr) in __is_insn_slot_addr() argument
301 if (addr >= (unsigned long)kip->insns && in __is_insn_slot_addr()
302 addr < (unsigned long)kip->insns + PAGE_SIZE) { in __is_insn_slot_addr()
364 struct kprobe *get_kprobe(void *addr) in get_kprobe() argument
369 head = &kprobe_table[hash_ptr(addr, KPROBE_HASH_BITS)]; in get_kprobe()
372 if (p->addr == addr) in get_kprobe()
481 static struct kprobe *get_optimized_kprobe(unsigned long addr) in get_optimized_kprobe() argument
489 p = get_kprobe((void *)(addr - i)); in get_optimized_kprobe()
493 if (arch_within_optimized_kprobe(op, addr)) in get_optimized_kprobe()
824 op->kp.addr = p->addr; in alloc_aggr_kprobe()
[all …]
Dkallsyms.c221 static unsigned long get_symbol_pos(unsigned long addr, in get_symbol_pos() argument
240 if (kallsyms_sym_address(mid) <= addr) in get_symbol_pos()
265 if (is_kernel_inittext(addr)) in get_symbol_pos()
276 *offset = addr - symbol_start; in get_symbol_pos()
284 int kallsyms_lookup_size_offset(unsigned long addr, unsigned long *symbolsize, in kallsyms_lookup_size_offset() argument
289 if (is_ksym_addr(addr)) { in kallsyms_lookup_size_offset()
290 get_symbol_pos(addr, symbolsize, offset); in kallsyms_lookup_size_offset()
293 return !!module_address_lookup(addr, symbolsize, offset, NULL, namebuf) || in kallsyms_lookup_size_offset()
294 !!__bpf_address_lookup(addr, symbolsize, offset, namebuf); in kallsyms_lookup_size_offset()
304 const char *kallsyms_lookup(unsigned long addr, in kallsyms_lookup() argument
[all …]
Dfail_function.c36 static unsigned long adjust_error_retval(unsigned long addr, unsigned long retv) in adjust_error_retval() argument
38 switch (get_injectable_error_type(addr)) { in adjust_error_retval()
56 static struct fei_attr *fei_attr_new(const char *sym, unsigned long addr) in fei_attr_new() argument
69 attr->retval = adjust_error_retval(addr, 0); in fei_attr_new()
124 if (attr->kp.addr) { in fei_retval_set()
125 if (adjust_error_retval((unsigned long)attr->kp.addr, in fei_retval_set()
203 seq_printf(m, "%ps\n", attr->kp.addr); in fei_seq_show()
240 unsigned long addr; in fei_write() local
278 addr = kallsyms_lookup_name(sym); in fei_write()
279 if (!addr) { in fei_write()
[all …]
Dptrace.c42 int ptrace_access_vm(struct task_struct *tsk, unsigned long addr, in ptrace_access_vm() argument
60 ret = __access_remote_vm(tsk, mm, addr, buf, len, gup_flags); in ptrace_access_vm()
394 unsigned long addr, in ptrace_attach() argument
402 if (addr != 0) in ptrace_attach()
734 unsigned long addr, in ptrace_peek_siginfo() argument
742 ret = copy_from_user(&arg, (void __user *) addr, in ptrace_peek_siginfo()
1030 unsigned long addr, unsigned long data) in ptrace_request() argument
1042 return generic_ptrace_peekdata(child, addr, data); in ptrace_request()
1045 return generic_ptrace_pokedata(child, addr, data); in ptrace_request()
1058 ret = ptrace_peek_siginfo(child, addr, data); in ptrace_request()
[all …]
Dstatic_call.c35 return (void *)((long)site->addr + (long)&site->addr); in static_call_addr()
88 a->addr = b->addr - delta; in static_call_site_swap()
91 b->addr = tmp.addr + delta; in static_call_site_swap()
284 unsigned long addr = (unsigned long)static_call_addr(site); in addr_conflict() local
286 if (addr <= (unsigned long)end && in addr_conflict()
287 addr + CALL_INSN_SIZE > (unsigned long)start) in addr_conflict()
336 static unsigned long tramp_key_lookup(unsigned long addr) in tramp_key_lookup() argument
346 if (tramp == addr) in tramp_key_lookup()
361 unsigned long addr = s_key & ~STATIC_CALL_SITE_FLAGS; in static_call_add_module() local
375 if (!kernel_text_address(addr)) in static_call_add_module()
[all …]
Dkexec_core.c377 unsigned long pfn, epfn, addr, eaddr; in kimage_alloc_normal_control_pages() local
384 addr = pfn << PAGE_SHIFT; in kimage_alloc_normal_control_pages()
387 kimage_is_destination_range(image, addr, eaddr)) { in kimage_alloc_normal_control_pages()
707 unsigned long addr; in kimage_alloc_page() local
714 addr = page_to_boot_pfn(page) << PAGE_SHIFT; in kimage_alloc_page()
715 if (addr == destination) { in kimage_alloc_page()
734 addr = page_to_boot_pfn(page) << PAGE_SHIFT; in kimage_alloc_page()
737 if (addr == destination) in kimage_alloc_page()
741 if (!kimage_is_destination_range(image, addr, in kimage_alloc_page()
742 addr + PAGE_SIZE)) in kimage_alloc_page()
[all …]
/kernel/debug/kdb/
Dkdb_support.c82 int kdbnearsym(unsigned long addr, kdb_symtab_t *symtab) in kdbnearsym() argument
91 kdb_printf("kdbnearsym: addr=0x%lx, symtab=%px\n", addr, symtab); in kdbnearsym()
94 if (addr < 4096) in kdbnearsym()
99 addr); in kdbnearsym()
102 symtab->sym_name = kallsyms_lookup(addr, &symbolsize , &offset, in kdbnearsym()
106 addr = offset = symbolsize = 0; in kdbnearsym()
108 symtab->sym_start = addr - offset; in kdbnearsym()
258 void kdb_symbol_print(unsigned long addr, const kdb_symtab_t *symtab_p, in kdb_symbol_print() argument
266 kdbnearsym(addr, symtab_p2); in kdb_symbol_print()
273 kdb_printf(kdb_machreg_fmt0, addr); in kdb_symbol_print()
[all …]
Dkdb_bt.c22 static void kdb_show_stack(struct task_struct *p, void *addr) in kdb_show_stack() argument
26 if (!addr && kdb_task_has_cpu(p)) { in kdb_show_stack()
33 show_stack(p, addr, KERN_EMERG); in kdb_show_stack()
132 unsigned long addr; in kdb_bt() local
176 diag = kdbgetularg((char *)argv[1], &addr); in kdb_bt()
179 return kdb_bt1((struct task_struct *)addr, ~0UL, false); in kdb_bt()
208 diag = kdbgetaddrarg(argc, argv, &nextarg, &addr, in kdb_bt()
212 kdb_show_stack(kdb_current_task, (void *)addr); in kdb_bt()
Dkdb_main.c556 unsigned long addr; in kdbgetaddrarg() local
601 diag = kdbgetulenv(&symname[1], &addr); in kdbgetaddrarg()
615 addr = symtab.sym_start; in kdbgetaddrarg()
617 diag = kdbgetularg(argv[*nextarg], &addr); in kdbgetaddrarg()
624 found = kdbnearsym(addr, &symtab); in kdbgetaddrarg()
631 *value = addr; in kdbgetaddrarg()
633 *offset = addr - symtab.sym_start; in kdbgetaddrarg()
1521 static int kdb_mdr(unsigned long addr, unsigned int count) in kdb_mdr() argument
1525 if (kdb_getarea(c, addr)) in kdb_mdr()
1528 addr++; in kdb_mdr()
[all …]
Dkdb_debugger.c57 unsigned long addr = kgdb_arch_pc(ks->ex_vector, ks->linux_regs); in kdb_stub() local
66 addr = instruction_pointer(ks->linux_regs); in kdb_stub()
79 if ((bp->bp_enabled) && (bp->bp_addr == addr)) { in kdb_stub()
82 if (addr != instruction_pointer(ks->linux_regs)) in kdb_stub()
83 kgdb_arch_set_pc(ks->linux_regs, addr); in kdb_stub()
91 if (bp->bp_addr == addr) { in kdb_stub()
Dkdb_private.h97 #define kdb_getarea(x, addr) kdb_getarea_size(&(x), addr, sizeof((x))) argument
98 #define kdb_putarea(addr, x) kdb_putarea_size(addr, &(x), sizeof((x))) argument
101 unsigned long addr, size_t size);
/kernel/dma/
Dmapping.c145 dma_addr_t addr; in dma_map_page_attrs() local
153 addr = dma_direct_map_page(dev, page, offset, size, dir, attrs); in dma_map_page_attrs()
155 addr = ops->map_page(dev, page, offset, size, dir, attrs); in dma_map_page_attrs()
156 debug_dma_map_page(dev, page, offset, size, dir, addr); in dma_map_page_attrs()
158 return addr; in dma_map_page_attrs()
162 void dma_unmap_page_attrs(struct device *dev, dma_addr_t addr, size_t size, in dma_unmap_page_attrs() argument
169 dma_direct_unmap_page(dev, addr, size, dir, attrs); in dma_unmap_page_attrs()
171 ops->unmap_page(dev, addr, size, dir, attrs); in dma_unmap_page_attrs()
172 debug_dma_unmap_page(dev, addr, size, dir); in dma_unmap_page_attrs()
221 dma_addr_t addr = DMA_MAPPING_ERROR; in dma_map_resource() local
[all …]
Dpool.c87 void *addr; in atomic_pool_expand() local
107 addr = dma_common_contiguous_remap(page, pool_size, in atomic_pool_expand()
110 if (!addr) in atomic_pool_expand()
113 addr = page_to_virt(page); in atomic_pool_expand()
123 ret = gen_pool_add_virt(pool, (unsigned long)addr, page_to_phys(page), in atomic_pool_expand()
140 dma_common_free_remap(addr, pool_size); in atomic_pool_expand()
247 unsigned long addr; in __dma_alloc_from_pool() local
250 addr = gen_pool_alloc(pool, size); in __dma_alloc_from_pool()
251 if (!addr) in __dma_alloc_from_pool()
254 phys = gen_pool_virt_to_phys(pool, addr); in __dma_alloc_from_pool()
[all …]
Ddirect.h55 dma_addr_t addr, size_t size, enum dma_data_direction dir) in dma_direct_sync_single_for_device() argument
57 phys_addr_t paddr = dma_to_phys(dev, addr); in dma_direct_sync_single_for_device()
67 dma_addr_t addr, size_t size, enum dma_data_direction dir) in dma_direct_sync_single_for_cpu() argument
69 phys_addr_t paddr = dma_to_phys(dev, addr); in dma_direct_sync_single_for_cpu()
108 static inline void dma_direct_unmap_page(struct device *dev, dma_addr_t addr, in dma_direct_unmap_page() argument
111 phys_addr_t phys = dma_to_phys(dev, addr); in dma_direct_unmap_page()
114 dma_direct_sync_single_for_cpu(dev, addr, size, dir); in dma_direct_unmap_page()
Ddebug.h16 extern void debug_dma_unmap_page(struct device *dev, dma_addr_t addr,
29 void *virt, dma_addr_t addr);
31 extern void debug_dma_map_resource(struct device *dev, phys_addr_t addr,
60 static inline void debug_dma_unmap_page(struct device *dev, dma_addr_t addr, in debug_dma_unmap_page() argument
82 void *virt, dma_addr_t addr) in debug_dma_free_coherent() argument
86 static inline void debug_dma_map_resource(struct device *dev, phys_addr_t addr, in debug_dma_map_resource() argument
Ddebug.c1055 void *addr; in check_for_stack() local
1062 addr = page_address(page) + offset; in check_for_stack()
1063 if (object_is_on_stack(addr)) in check_for_stack()
1064 err_printk(dev, NULL, "device driver maps memory from stack [addr=%p]\n", addr); in check_for_stack()
1073 addr = (u8 *)current->stack + i * PAGE_SIZE + offset; in check_for_stack()
1074 err_printk(dev, NULL, "device driver maps memory from stack [probable addr=%p]\n", addr); in check_for_stack()
1080 static inline bool overlap(void *addr, unsigned long len, void *start, void *end) in overlap() argument
1082 unsigned long a1 = (unsigned long)addr; in overlap()
1090 static void check_for_illegal_area(struct device *dev, void *addr, unsigned long len) in check_for_illegal_area() argument
1092 if (overlap(addr, len, _stext, _etext) || in check_for_illegal_area()
[all …]
/kernel/trace/
Dtrace_kprobe.c151 snprintf(buf, sizeof(buf), "0x%p", tk->rp.kp.addr); in trace_kprobe_match_command_head()
195 unsigned long addr; in trace_kprobe_address() local
198 addr = (unsigned long) in trace_kprobe_address()
200 if (addr) in trace_kprobe_address()
201 addr += tk->rp.kp.offset; in trace_kprobe_address()
203 addr = (unsigned long)tk->rp.kp.addr; in trace_kprobe_address()
205 return addr; in trace_kprobe_address()
224 return tk ? (kprobe_on_func_entry(tk->rp.kp.addr, in trace_kprobe_on_func_entry()
225 tk->rp.kp.addr ? NULL : tk->rp.kp.symbol_name, in trace_kprobe_on_func_entry()
226 tk->rp.kp.addr ? 0 : tk->rp.kp.offset) == 0) : false; in trace_kprobe_on_func_entry()
[all …]
Dtrace_readwrite.c18 void __log_write_mmio(u64 val, u8 width, volatile void __iomem *addr) in __log_write_mmio() argument
20 trace_rwmmio_write(CALLER_ADDR0, val, width, addr); in __log_write_mmio()
25 void __log_read_mmio(u8 width, const volatile void __iomem *addr) in __log_read_mmio() argument
27 trace_rwmmio_read(CALLER_ADDR0, width, addr); in __log_read_mmio()
32 void __log_post_read_mmio(u64 val, u8 width, const volatile void __iomem *addr) in __log_post_read_mmio() argument
34 trace_rwmmio_post_read(CALLER_ADDR0, val, width, addr); in __log_post_read_mmio()
/kernel/debug/
Ddebug_core.c182 int __weak kgdb_validate_break_address(unsigned long addr) in kgdb_validate_break_address() argument
187 if (kgdb_within_blocklist(addr)) in kgdb_validate_break_address()
195 tmp.bpt_addr = addr; in kgdb_validate_break_address()
202 addr); in kgdb_validate_break_address()
285 static void kgdb_flush_swbreak_addr(unsigned long addr) in kgdb_flush_swbreak_addr() argument
297 addr, addr + BREAK_INSTR_SIZE); in kgdb_flush_swbreak_addr()
302 flush_icache_range(addr, addr + BREAK_INSTR_SIZE); in kgdb_flush_swbreak_addr()
334 int dbg_set_sw_break(unsigned long addr) in dbg_set_sw_break() argument
336 int err = kgdb_validate_break_address(addr); in dbg_set_sw_break()
345 (kgdb_break[i].bpt_addr == addr)) in dbg_set_sw_break()
[all …]
Dgdbstub.c371 unsigned long addr; in write_mem_msg() local
375 if (kgdb_hex2long(&ptr, &addr) > 0 && *(ptr++) == ',' && in write_mem_msg()
378 err = kgdb_ebin2mem(ptr, (char *)addr, length); in write_mem_msg()
380 err = kgdb_hex2mem(ptr, (char *)addr, length); in write_mem_msg()
384 flush_icache_range(addr, addr + length); in write_mem_msg()
562 unsigned long addr; in gdb_cmd_memread() local
565 if (kgdb_hex2long(&ptr, &addr) > 0 && *ptr++ == ',' && in gdb_cmd_memread()
567 err = kgdb_mem2hex((char *)addr, remcom_out_buffer, length); in gdb_cmd_memread()
871 unsigned long addr; in gdb_cmd_break() local
897 if (!kgdb_hex2long(&ptr, &addr)) { in gdb_cmd_break()
[all …]
/kernel/kcsan/
Dselftest.c33 unsigned long addr; in test_encode_decode() local
35 prandom_bytes(&addr, sizeof(addr)); in test_encode_decode()
36 if (WARN_ON(!check_encodable(addr, size))) in test_encode_decode()
42 encode_watchpoint(addr, size, is_write); in test_encode_decode()
63 (addr & WATCHPOINT_ADDR_MASK))) in test_encode_decode()
74 addr, encoded_watchpoint, in test_encode_decode()
Dencoding.h49 static inline bool check_encodable(unsigned long addr, size_t size) in check_encodable() argument
55 encode_watchpoint(unsigned long addr, size_t size, bool is_write) in encode_watchpoint() argument
59 (addr & WATCHPOINT_ADDR_MASK)); in encode_watchpoint()
81 static __always_inline int watchpoint_slot(unsigned long addr) in watchpoint_slot() argument
83 return (addr / PAGE_SIZE) % CONFIG_KCSAN_NUM_WATCHPOINTS; in watchpoint_slot()
/kernel/bpf/
Dtrampoline.c94 long addr; in is_ftrace_location() local
96 addr = ftrace_location((long)ip); in is_ftrace_location()
97 if (!addr) in is_ftrace_location()
99 if (WARN_ON_ONCE(addr != (long)ip)) in is_ftrace_location()
106 void *ip = tr->func.addr; in unregister_fentry()
118 void *ip = tr->func.addr; in modify_fentry()
131 void *ip = tr->func.addr; in register_fentry()
335 tr->func.addr); in bpf_trampoline_update()
406 err = bpf_arch_text_poke(tr->func.addr, BPF_MOD_JUMP, NULL, in bpf_trampoline_link_prog()
441 err = bpf_arch_text_poke(tr->func.addr, BPF_MOD_JUMP, in bpf_trampoline_unlink_prog()
[all …]

123