/kernel/ |
D | extable.c | 47 struct exception_table_entry *search_kernel_exception_table(unsigned long addr) in search_kernel_exception_table() argument 50 __stop___ex_table - __start___ex_table, addr); in search_kernel_exception_table() 54 const struct exception_table_entry *search_exception_tables(unsigned long addr) in search_exception_tables() argument 58 e = search_kernel_exception_table(addr); in search_exception_tables() 60 e = search_module_extables(addr); in search_exception_tables() 62 e = search_bpf_extables(addr); in search_exception_tables() 66 int notrace core_kernel_text(unsigned long addr) in core_kernel_text() argument 68 if (is_kernel_text(addr)) in core_kernel_text() 72 is_kernel_inittext(addr)) in core_kernel_text() 77 int __kernel_text_address(unsigned long addr) in __kernel_text_address() argument [all …]
|
D | iomem.c | 75 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 …]
|
D | cfi.c | 10 enum bug_trap_type report_cfi_failure(struct pt_regs *regs, unsigned long addr, in report_cfi_failure() argument 15 (void *)addr, (void *)*target, type); in report_cfi_failure() 18 (void *)addr); in report_cfi_failure() 21 __warn(NULL, 0, (void *)addr, 0, regs, NULL); in report_cfi_failure() 34 static bool is_trap(unsigned long addr, s32 *start, s32 *end) in is_trap() argument 39 if (trap_address(p) == addr) in is_trap() 69 static bool is_module_cfi_trap(unsigned long addr) in is_module_cfi_trap() argument 76 mod = __module_address(addr); in is_module_cfi_trap() 78 found = is_trap(addr, mod->kcfi_traps, mod->kcfi_traps_end); in is_module_cfi_trap() 85 static inline bool is_module_cfi_trap(unsigned long addr) in is_module_cfi_trap() argument [all …]
|
D | kprobes.c | 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() [all …]
|
D | kallsyms.c | 324 static unsigned long get_symbol_pos(unsigned long addr, in get_symbol_pos() argument 343 if (kallsyms_sym_address(mid) <= addr) in get_symbol_pos() 368 if (is_kernel_inittext(addr)) in get_symbol_pos() 379 *offset = addr - symbol_start; in get_symbol_pos() 387 int kallsyms_lookup_size_offset(unsigned long addr, unsigned long *symbolsize, in kallsyms_lookup_size_offset() argument 392 if (is_ksym_addr(addr)) { in kallsyms_lookup_size_offset() 393 get_symbol_pos(addr, symbolsize, offset); in kallsyms_lookup_size_offset() 396 return !!module_address_lookup(addr, symbolsize, offset, NULL, NULL, namebuf) || in kallsyms_lookup_size_offset() 397 !!__bpf_address_lookup(addr, symbolsize, offset, namebuf); in kallsyms_lookup_size_offset() 400 static const char *kallsyms_lookup_buildid(unsigned long addr, in kallsyms_lookup_buildid() argument [all …]
|
D | fail_function.c | 36 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 274 addr = kallsyms_lookup_name(sym); in fei_write() 275 if (!addr) { in fei_write() [all …]
|
D | ptrace.c | 43 int ptrace_access_vm(struct task_struct *tsk, unsigned long addr, in ptrace_access_vm() argument 61 ret = __access_remote_vm(mm, addr, buf, len, gup_flags); in ptrace_access_vm() 389 unsigned long addr, in ptrace_attach() argument 397 if (addr != 0) in ptrace_attach() 729 unsigned long addr, in ptrace_peek_siginfo() argument 737 ret = copy_from_user(&arg, (void __user *) addr, in ptrace_peek_siginfo() 1031 unsigned long addr, unsigned long data) in ptrace_request() argument 1043 return generic_ptrace_peekdata(child, addr, data); in ptrace_request() 1046 return generic_ptrace_pokedata(child, addr, data); in ptrace_request() 1059 ret = ptrace_peek_siginfo(child, addr, data); in ptrace_request() [all …]
|
D | static_call_inline.c | 35 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 …]
|
D | resource.c | 1644 int iomem_map_sanity_check(resource_size_t addr, unsigned long size) in iomem_map_sanity_check() argument 1656 if (p->start >= addr + size) in iomem_map_sanity_check() 1658 if (p->end < addr) in iomem_map_sanity_check() 1660 if (PFN_DOWN(p->start) <= PFN_DOWN(addr) && in iomem_map_sanity_check() 1661 PFN_DOWN(p->end) >= PFN_DOWN(addr + size - 1)) in iomem_map_sanity_check() 1673 (unsigned long long)addr, in iomem_map_sanity_check() 1674 (unsigned long long)(addr + size - 1), in iomem_map_sanity_check() 1696 bool iomem_is_exclusive(u64 addr) in iomem_is_exclusive() argument 1704 addr = addr & PAGE_MASK; in iomem_is_exclusive() 1708 if (p->start >= addr + size) in iomem_is_exclusive() [all …]
|
/kernel/debug/kdb/ |
D | kdb_support.c | 81 int kdbnearsym(unsigned long addr, kdb_symtab_t *symtab) in kdbnearsym() argument 88 kdb_dbg_printf(AR, "addr=0x%lx, symtab=%px\n", addr, symtab); in kdbnearsym() 91 if (addr < 4096) in kdbnearsym() 94 symtab->sym_name = kallsyms_lookup(addr, &symbolsize , &offset, in kdbnearsym() 98 addr = offset = symbolsize = 0; in kdbnearsym() 100 symtab->sym_start = addr - offset; in kdbnearsym() 198 void kdb_symbol_print(unsigned long addr, const kdb_symtab_t *symtab_p, in kdb_symbol_print() argument 206 kdbnearsym(addr, symtab_p2); in kdb_symbol_print() 213 kdb_printf(kdb_machreg_fmt0, addr); in kdb_symbol_print() 222 if (addr != symtab_p2->sym_start) in kdb_symbol_print() [all …]
|
D | kdb_bt.c | 22 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, "A", 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()
|
D | kdb_main.c | 547 unsigned long addr; in kdbgetaddrarg() local 592 diag = kdbgetulenv(&symname[1], &addr); in kdbgetaddrarg() 606 addr = symtab.sym_start; in kdbgetaddrarg() 608 diag = kdbgetularg(argv[*nextarg], &addr); in kdbgetaddrarg() 615 found = kdbnearsym(addr, &symtab); in kdbgetaddrarg() 622 *value = addr; in kdbgetaddrarg() 624 *offset = addr - symtab.sym_start; in kdbgetaddrarg() 1506 static int kdb_mdr(unsigned long addr, unsigned int count) in kdb_mdr() argument 1510 if (kdb_getarea(c, addr)) in kdb_mdr() 1513 addr++; in kdb_mdr() [all …]
|
D | kdb_debugger.c | 57 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()
|
/kernel/trace/ |
D | trace_probe_kernel.h | 13 kern_fetch_store_strlen_user(unsigned long addr) in kern_fetch_store_strlen_user() argument 15 const void __user *uaddr = (__force const void __user *)addr; in kern_fetch_store_strlen_user() 22 kern_fetch_store_strlen(unsigned long addr) in kern_fetch_store_strlen() argument 28 if (addr < TASK_SIZE) in kern_fetch_store_strlen() 29 return kern_fetch_store_strlen_user(addr); in kern_fetch_store_strlen() 33 ret = copy_from_kernel_nofault(&c, (u8 *)addr + len, 1); in kern_fetch_store_strlen() 52 kern_fetch_store_string_user(unsigned long addr, void *dest, void *base) in kern_fetch_store_string_user() argument 54 const void __user *uaddr = (__force const void __user *)addr; in kern_fetch_store_string_user() 75 kern_fetch_store_string(unsigned long addr, void *dest, void *base) in kern_fetch_store_string() argument 82 if ((unsigned long)addr < TASK_SIZE) in kern_fetch_store_string() [all …]
|
D | trace_kprobe.c | 149 snprintf(buf, sizeof(buf), "0x%p", tk->rp.kp.addr); in trace_kprobe_match_command_head() 194 unsigned long addr; in trace_kprobe_address() local 197 addr = (unsigned long) in trace_kprobe_address() 199 if (addr) in trace_kprobe_address() 200 addr += tk->rp.kp.offset; in trace_kprobe_address() 202 addr = (unsigned long)tk->rp.kp.addr; in trace_kprobe_address() 204 return addr; in trace_kprobe_address() 223 return tk ? (kprobe_on_func_entry(tk->rp.kp.addr, in trace_kprobe_on_func_entry() 224 tk->rp.kp.addr ? NULL : tk->rp.kp.symbol_name, in trace_kprobe_on_func_entry() 225 tk->rp.kp.addr ? 0 : tk->rp.kp.offset) == 0) : false; in trace_kprobe_on_func_entry() [all …]
|
D | trace_eprobe.c | 327 void *addr; in get_event_field() local 329 addr = rec + field->offset; in get_event_field() 334 val = (unsigned long)(rec + (*(unsigned int *)addr & 0xffff)); in get_event_field() 337 val = (unsigned long)(addr + (*(unsigned int *)addr & 0xffff)); in get_event_field() 340 val = (unsigned long)addr; in get_event_field() 343 val = (unsigned long)(*(char *)addr); in get_event_field() 355 val = *(char *)addr; in get_event_field() 357 val = *(unsigned char *)addr; in get_event_field() 361 val = *(short *)addr; in get_event_field() 363 val = *(unsigned short *)addr; in get_event_field() [all …]
|
/kernel/dma/ |
D | pool.c | 84 void *addr; in atomic_pool_expand() local 104 addr = dma_common_contiguous_remap(page, pool_size, in atomic_pool_expand() 107 if (!addr) in atomic_pool_expand() 110 addr = page_to_virt(page); in atomic_pool_expand() 120 ret = gen_pool_add_virt(pool, (unsigned long)addr, page_to_phys(page), in atomic_pool_expand() 137 dma_common_free_remap(addr, pool_size); in atomic_pool_expand() 244 unsigned long addr; in __dma_alloc_from_pool() local 247 addr = gen_pool_alloc(pool, size); in __dma_alloc_from_pool() 248 if (!addr) in __dma_alloc_from_pool() 251 phys = gen_pool_virt_to_phys(pool, addr); in __dma_alloc_from_pool() [all …]
|
D | mapping.c | 148 dma_addr_t addr; in dma_map_page_attrs() local 157 addr = dma_direct_map_page(dev, page, offset, size, dir, attrs); in dma_map_page_attrs() 159 addr = ops->map_page(dev, page, offset, size, dir, attrs); in dma_map_page_attrs() 161 debug_dma_map_page(dev, page, offset, size, dir, addr, attrs); in dma_map_page_attrs() 163 return addr; in dma_map_page_attrs() 167 void dma_unmap_page_attrs(struct device *dev, dma_addr_t addr, size_t size, in dma_unmap_page_attrs() argument 174 arch_dma_unmap_page_direct(dev, addr + size)) in dma_unmap_page_attrs() 175 dma_direct_unmap_page(dev, addr, size, dir, attrs); in dma_unmap_page_attrs() 177 ops->unmap_page(dev, addr, size, dir, attrs); in dma_unmap_page_attrs() 178 debug_dma_unmap_page(dev, addr, size, dir); in dma_unmap_page_attrs() [all …]
|
D | direct.h | 56 dma_addr_t addr, size_t size, enum dma_data_direction dir) in dma_direct_sync_single_for_device() argument 58 phys_addr_t paddr = dma_to_phys(dev, addr); in dma_direct_sync_single_for_device() 68 dma_addr_t addr, size_t size, enum dma_data_direction dir) in dma_direct_sync_single_for_cpu() argument 70 phys_addr_t paddr = dma_to_phys(dev, addr); in dma_direct_sync_single_for_cpu() 114 static inline void dma_direct_unmap_page(struct device *dev, dma_addr_t addr, in dma_direct_unmap_page() argument 117 phys_addr_t phys = dma_to_phys(dev, addr); in dma_direct_unmap_page() 120 dma_direct_sync_single_for_cpu(dev, addr, size, dir); in dma_direct_unmap_page()
|
D | debug.h | 17 extern void debug_dma_unmap_page(struct device *dev, dma_addr_t addr, 32 void *virt, dma_addr_t addr); 34 extern void debug_dma_map_resource(struct device *dev, phys_addr_t addr, 65 static inline void debug_dma_unmap_page(struct device *dev, dma_addr_t addr, in debug_dma_unmap_page() argument 89 void *virt, dma_addr_t addr) in debug_dma_free_coherent() argument 93 static inline void debug_dma_map_resource(struct device *dev, phys_addr_t addr, in debug_dma_map_resource() argument
|
D | debug.c | 1052 void *addr; in check_for_stack() local 1059 addr = page_address(page) + offset; in check_for_stack() 1060 if (object_is_on_stack(addr)) in check_for_stack() 1061 err_printk(dev, NULL, "device driver maps memory from stack [addr=%p]\n", addr); in check_for_stack() 1070 addr = (u8 *)current->stack + i * PAGE_SIZE + offset; in check_for_stack() 1071 err_printk(dev, NULL, "device driver maps memory from stack [probable addr=%p]\n", addr); in check_for_stack() 1077 static void check_for_illegal_area(struct device *dev, void *addr, unsigned long len) in check_for_illegal_area() argument 1079 if (memory_intersects(_stext, _etext, addr, len) || in check_for_illegal_area() 1080 memory_intersects(__start_rodata, __end_rodata, addr, len)) in check_for_illegal_area() 1081 …ev, NULL, "device driver maps memory from kernel text or rodata [addr=%p] [len=%lu]\n", addr, len); in check_for_illegal_area() [all …]
|
/kernel/debug/ |
D | debug_core.c | 177 int __weak kgdb_validate_break_address(unsigned long addr) in kgdb_validate_break_address() argument 182 if (kgdb_within_blocklist(addr)) in kgdb_validate_break_address() 190 tmp.bpt_addr = addr; in kgdb_validate_break_address() 197 addr); in kgdb_validate_break_address() 280 static void kgdb_flush_swbreak_addr(unsigned long addr) in kgdb_flush_swbreak_addr() argument 286 flush_icache_range(addr, addr + BREAK_INSTR_SIZE); in kgdb_flush_swbreak_addr() 318 int dbg_set_sw_break(unsigned long addr) in dbg_set_sw_break() argument 320 int err = kgdb_validate_break_address(addr); in dbg_set_sw_break() 329 (kgdb_break[i].bpt_addr == addr)) in dbg_set_sw_break() 334 kgdb_break[i].bpt_addr == addr) { in dbg_set_sw_break() [all …]
|
/kernel/kcsan/ |
D | encoding.h | 52 static inline bool check_encodable(unsigned long addr, size_t size) in check_encodable() argument 58 return addr >= PAGE_SIZE && size <= MAX_ENCODABLE_SIZE; in check_encodable() 62 encode_watchpoint(unsigned long addr, size_t size, bool is_write) in encode_watchpoint() argument 66 (addr & WATCHPOINT_ADDR_MASK)); in encode_watchpoint() 88 static __always_inline int watchpoint_slot(unsigned long addr) in watchpoint_slot() argument 90 return (addr / PAGE_SIZE) % CONFIG_KCSAN_NUM_WATCHPOINTS; in watchpoint_slot()
|
D | selftest.c | 46 unsigned long addr; in test_encode_decode() local 49 get_random_bytes(&addr, sizeof(addr)); in test_encode_decode() 50 if (addr < PAGE_SIZE) in test_encode_decode() 51 addr = PAGE_SIZE; in test_encode_decode() 53 if (WARN_ON(!check_encodable(addr, size))) in test_encode_decode() 56 encoded_watchpoint = encode_watchpoint(addr, size, is_write); in test_encode_decode() 67 if (WARN_ON(verif_masked_addr != (addr & WATCHPOINT_ADDR_MASK))) in test_encode_decode() 77 __func__, is_write ? "write" : "read", size, addr, encoded_watchpoint, in test_encode_decode()
|
/kernel/module/ |
D | kallsyms.c | 263 unsigned long addr, in find_kallsyms_symbol() argument 272 if (within_module_init(addr, mod)) in find_kallsyms_symbol() 298 if (thisval <= addr && thisval > bestval) { in find_kallsyms_symbol() 302 if (thisval > addr && thisval < nextval) in find_kallsyms_symbol() 312 *offset = addr - bestval; in find_kallsyms_symbol() 327 const char *module_address_lookup(unsigned long addr, in module_address_lookup() argument 338 mod = __module_address(addr); in module_address_lookup() 350 ret = find_kallsyms_symbol(mod, addr, size, offset); in module_address_lookup() 362 int lookup_module_symbol_name(unsigned long addr, char *symname) in lookup_module_symbol_name() argument 370 if (within_module(addr, mod)) { in lookup_module_symbol_name() [all …]
|