/linux-6.12.1/arch/arm64/kernel/ |
D | machine_kexec_file.c | 97 struct kexec_buf kbuf; in load_other_segments() local 103 kbuf.image = image; in load_other_segments() 105 kbuf.buf_min = kernel_load_addr + kernel_size; in load_other_segments() 118 kbuf.buffer = headers; in load_other_segments() 119 kbuf.bufsz = headers_sz; in load_other_segments() 120 kbuf.mem = KEXEC_BUF_MEM_UNKNOWN; in load_other_segments() 121 kbuf.memsz = headers_sz; in load_other_segments() 122 kbuf.buf_align = SZ_64K; /* largest supported page size */ in load_other_segments() 123 kbuf.buf_max = ULONG_MAX; in load_other_segments() 124 kbuf.top_down = true; in load_other_segments() [all …]
|
D | kexec_image.c | 44 struct kexec_buf kbuf; in image_load() local 75 kbuf.image = image; in image_load() 76 kbuf.buf_min = 0; in image_load() 77 kbuf.buf_max = ULONG_MAX; in image_load() 78 kbuf.top_down = false; in image_load() 80 kbuf.buffer = kernel; in image_load() 81 kbuf.bufsz = kernel_len; in image_load() 82 kbuf.mem = KEXEC_BUF_MEM_UNKNOWN; in image_load() 83 kbuf.memsz = le64_to_cpu(h->image_size); in image_load() 85 kbuf.buf_align = MIN_KIMG_ALIGN; in image_load() [all …]
|
/linux-6.12.1/arch/parisc/kernel/ |
D | kexec_file.c | 25 struct kexec_buf kbuf = { .image = image, .buf_min = 0, in elf_load() local 32 ret = kexec_elf_load(image, &ehdr, &elf_info, &kbuf, &kernel_load_addr); in elf_load() 45 kbuf.buffer = initrd; in elf_load() 46 kbuf.bufsz = kbuf.memsz = initrd_len; in elf_load() 47 kbuf.buf_align = PAGE_SIZE; in elf_load() 48 kbuf.top_down = false; in elf_load() 49 kbuf.mem = KEXEC_BUF_MEM_UNKNOWN; in elf_load() 50 ret = kexec_add_buffer(&kbuf); in elf_load() 54 kexec_dprintk("Loaded initrd at 0x%lx\n", kbuf.mem); in elf_load() 55 image->arch.initrd_start = kbuf.mem; in elf_load() [all …]
|
/linux-6.12.1/arch/riscv/kernel/ |
D | elf_kexec.c | 44 struct kexec_buf kbuf; in riscv_kexec_elf_load() local 47 kbuf.image = image; in riscv_kexec_elf_load() 58 kbuf.buffer = (void *) elf_info->buffer + phdr->p_offset; in riscv_kexec_elf_load() 59 kbuf.bufsz = size; in riscv_kexec_elf_load() 60 kbuf.buf_align = phdr->p_align; in riscv_kexec_elf_load() 61 kbuf.mem = phdr->p_paddr - old_pbase + new_pbase; in riscv_kexec_elf_load() 62 kbuf.memsz = phdr->p_memsz; in riscv_kexec_elf_load() 63 kbuf.top_down = false; in riscv_kexec_elf_load() 64 ret = kexec_add_buffer(&kbuf); in riscv_kexec_elf_load() 82 struct kexec_buf kbuf; in elf_find_pbase() local [all …]
|
/linux-6.12.1/kernel/ |
D | kexec_file.c | 441 struct kexec_buf *kbuf) in locate_mem_hole_top_down() argument 443 struct kimage *image = kbuf->image; in locate_mem_hole_top_down() 446 temp_end = min(end, kbuf->buf_max); in locate_mem_hole_top_down() 447 temp_start = temp_end - kbuf->memsz + 1; in locate_mem_hole_top_down() 451 temp_start = ALIGN_DOWN(temp_start, kbuf->buf_align); in locate_mem_hole_top_down() 453 if (temp_start < start || temp_start < kbuf->buf_min) in locate_mem_hole_top_down() 456 temp_end = temp_start + kbuf->memsz - 1; in locate_mem_hole_top_down() 472 kbuf->mem = temp_start; in locate_mem_hole_top_down() 479 struct kexec_buf *kbuf) in locate_mem_hole_bottom_up() argument 481 struct kimage *image = kbuf->image; in locate_mem_hole_bottom_up() [all …]
|
/linux-6.12.1/arch/powerpc/kexec/ |
D | elf_64.c | 42 struct kexec_buf kbuf = { .image = image, .buf_min = 0, in elf64_load() local 54 kbuf.buf_min = pbuf.buf_min = crashk_res.start; in elf64_load() 55 kbuf.buf_max = pbuf.buf_max = in elf64_load() 60 ret = kexec_elf_load(image, &ehdr, &elf_info, &kbuf, &kernel_load_addr); in elf64_load() 76 ret = load_crashdump_segments_ppc64(image, &kbuf); in elf64_load() 94 kbuf.buffer = initrd; in elf64_load() 95 kbuf.bufsz = kbuf.memsz = initrd_len; in elf64_load() 96 kbuf.buf_align = PAGE_SIZE; in elf64_load() 97 kbuf.top_down = false; in elf64_load() 98 kbuf.mem = KEXEC_BUF_MEM_UNKNOWN; in elf64_load() [all …]
|
D | file_load_64.c | 62 static int __locate_mem_hole_top_down(struct kexec_buf *kbuf, in __locate_mem_hole_top_down() argument 90 start = ALIGN(start, kbuf->buf_align); in __locate_mem_hole_top_down() 91 if (start < end && (end - start + 1) >= kbuf->memsz) { in __locate_mem_hole_top_down() 93 kbuf->mem = ALIGN_DOWN(end - kbuf->memsz + 1, in __locate_mem_hole_top_down() 94 kbuf->buf_align); in __locate_mem_hole_top_down() 113 static int locate_mem_hole_top_down_ppc64(struct kexec_buf *kbuf, in locate_mem_hole_top_down_ppc64() argument 130 ret = __locate_mem_hole_top_down(kbuf, tmin, tmax); in locate_mem_hole_top_down_ppc64() 146 ret = __locate_mem_hole_top_down(kbuf, tmin, tmax); in locate_mem_hole_top_down_ppc64() 161 static int __locate_mem_hole_bottom_up(struct kexec_buf *kbuf, in __locate_mem_hole_bottom_up() argument 189 start = ALIGN(start, kbuf->buf_align); in __locate_mem_hole_bottom_up() [all …]
|
/linux-6.12.1/mm/damon/ |
D | dbgfs.c | 38 char *kbuf; in user_input_str() local 45 kbuf = kmalloc(count + 1, GFP_KERNEL | __GFP_NOWARN); in user_input_str() 46 if (!kbuf) in user_input_str() 49 ret = simple_write_to_buffer(kbuf, count + 1, ppos, buf, count); in user_input_str() 51 kfree(kbuf); in user_input_str() 54 kbuf[ret] = '\0'; in user_input_str() 56 return kbuf; in user_input_str() 63 char kbuf[128]; in dbgfs_attrs_read() local 67 ret = scnprintf(kbuf, ARRAY_SIZE(kbuf), "%lu %lu %lu %lu %lu\n", in dbgfs_attrs_read() 73 return simple_read_from_buffer(buf, count, ppos, kbuf, ret); in dbgfs_attrs_read() [all …]
|
/linux-6.12.1/fs/ |
D | statfs.c | 267 static int put_compat_statfs(struct compat_statfs __user *ubuf, struct kstatfs *kbuf) in put_compat_statfs() argument 271 if ((kbuf->f_blocks | kbuf->f_bfree | kbuf->f_bavail | in put_compat_statfs() 272 kbuf->f_bsize | kbuf->f_frsize) & 0xffffffff00000000ULL) in put_compat_statfs() 276 if (kbuf->f_files != 0xffffffffffffffffULL in put_compat_statfs() 277 && (kbuf->f_files & 0xffffffff00000000ULL)) in put_compat_statfs() 279 if (kbuf->f_ffree != 0xffffffffffffffffULL in put_compat_statfs() 280 && (kbuf->f_ffree & 0xffffffff00000000ULL)) in put_compat_statfs() 284 buf.f_type = kbuf->f_type; in put_compat_statfs() 285 buf.f_bsize = kbuf->f_bsize; in put_compat_statfs() 286 buf.f_blocks = kbuf->f_blocks; in put_compat_statfs() [all …]
|
/linux-6.12.1/arch/x86/kernel/ |
D | kexec-bzimage64.c | 408 struct kexec_buf kbuf = { .image = image, .buf_max = ULONG_MAX, in bzImage64_load() local 472 kbuf.bufsz = params_cmdline_sz + ALIGN(efi_map_sz, 16) + in bzImage64_load() 479 kbuf.bufsz += sizeof(struct setup_data) + in bzImage64_load() 482 params = kzalloc(kbuf.bufsz, GFP_KERNEL); in bzImage64_load() 494 kbuf.buffer = params; in bzImage64_load() 495 kbuf.memsz = kbuf.bufsz; in bzImage64_load() 496 kbuf.buf_align = 16; in bzImage64_load() 497 kbuf.buf_min = MIN_BOOTPARAM_ADDR; in bzImage64_load() 498 ret = kexec_add_buffer(&kbuf); in bzImage64_load() 501 bootparam_load_addr = kbuf.mem; in bzImage64_load() [all …]
|
D | crash.c | 364 struct kexec_buf kbuf = { .image = image, .buf_min = 0, in crash_load_segments() local 368 ret = prepare_elf_headers(&kbuf.buffer, &kbuf.bufsz, &pnum); in crash_load_segments() 372 image->elf_headers = kbuf.buffer; in crash_load_segments() 373 image->elf_headers_sz = kbuf.bufsz; in crash_load_segments() 374 kbuf.memsz = kbuf.bufsz; in crash_load_segments() 387 kbuf.memsz = pnum * sizeof(Elf64_Phdr); in crash_load_segments() 388 kbuf.memsz += sizeof(Elf64_Ehdr); in crash_load_segments() 393 image->elf_headers_sz = kbuf.memsz; in crash_load_segments() 399 kbuf.buf_align = ELF_CORE_HEADER_ALIGN; in crash_load_segments() 400 kbuf.mem = KEXEC_BUF_MEM_UNKNOWN; in crash_load_segments() [all …]
|
/linux-6.12.1/arch/powerpc/kernel/ptrace/ |
D | ptrace-decl.h | 75 const void *kbuf, const void __user *ubuf); 83 const void *kbuf, const void __user *ubuf); 91 const void *kbuf, const void __user *ubuf); 99 const void *kbuf, const void __user *ubuf); 110 const void *kbuf, const void __user *ubuf, 125 const void *kbuf, const void __user *ubuf); 130 const void *kbuf, const void __user *ubuf); 135 const void *kbuf, const void __user *ubuf); 140 const void *kbuf, const void __user *ubuf); 145 const void *kbuf, const void __user *ubuf); [all …]
|
D | ptrace-tm.c | 136 const void *kbuf, const void __user *ubuf) in tm_cgpr_set() argument 151 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in tm_cgpr_set() 156 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ®, in tm_cgpr_set() 167 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in tm_cgpr_set() 173 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, in tm_cgpr_set() 178 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ®, in tm_cgpr_set() 186 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, in tm_cgpr_set() 275 const void *kbuf, const void __user *ubuf) in tm_cfpr_set() argument 295 i = user_regset_copyin(&pos, &count, &kbuf, &ubuf, buf, 0, -1); in tm_cfpr_set() 395 const void *kbuf, const void __user *ubuf) in tm_cvmx_set() argument [all …]
|
D | ptrace-view.c | 239 unsigned int pos, unsigned int count, const void *kbuf, in gpr_set() argument 248 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in gpr_set() 253 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ®, in gpr_set() 264 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in gpr_set() 270 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, in gpr_set() 275 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ®, in gpr_set() 283 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, in gpr_set() 300 unsigned int pos, unsigned int count, const void *kbuf, in ppr_set() argument 306 return user_regset_copyin(&pos, &count, &kbuf, &ubuf, in ppr_set() 316 unsigned int pos, unsigned int count, const void *kbuf, in dscr_set() argument [all …]
|
/linux-6.12.1/arch/sparc/kernel/ |
D | ptrace_32.c | 109 const void *kbuf, const void __user *ubuf) in genregs32_set() argument 119 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs32_set() 127 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs32_set() 137 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs32_set() 146 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs32_set() 151 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs32_set() 156 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs32_set() 161 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 36 * sizeof(u32), in genregs32_set() 185 const void *kbuf, const void __user *ubuf) in fpregs32_set() argument 194 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in fpregs32_set() [all …]
|
D | ptrace_64.c | 161 void *kbuf, int len) in get_from_target() argument 164 if (copy_from_user(kbuf, (void __user *) uaddr, len)) in get_from_target() 167 int len2 = access_process_vm(target, uaddr, kbuf, len, in get_from_target() 176 void *kbuf, int len) in set_to_target() argument 179 if (copy_to_user((void __user *) uaddr, kbuf, len)) in set_to_target() 182 int len2 = access_process_vm(target, uaddr, kbuf, len, in set_to_target() 270 const void *kbuf, const void __user *ubuf) in genregs64_set() argument 278 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs64_set() 287 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs64_set() 301 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs64_set() [all …]
|
/linux-6.12.1/arch/powerpc/platforms/pseries/ |
D | reconfig.c | 362 char *kbuf; in ofdt_write() local 369 kbuf = memdup_user_nul(buf, count); in ofdt_write() 370 if (IS_ERR(kbuf)) in ofdt_write() 371 return PTR_ERR(kbuf); in ofdt_write() 373 tmp = strchr(kbuf, ' '); in ofdt_write() 381 if (!strcmp(kbuf, "add_node")) in ofdt_write() 382 rv = do_add_node(tmp, count - (tmp - kbuf)); in ofdt_write() 383 else if (!strcmp(kbuf, "remove_node")) in ofdt_write() 385 else if (!strcmp(kbuf, "add_property")) in ofdt_write() 386 rv = do_add_property(tmp, count - (tmp - kbuf)); in ofdt_write() [all …]
|
/linux-6.12.1/arch/um/drivers/ |
D | hostaudio_kern.c | 74 void *kbuf; in hostaudio_read() local 81 kbuf = kmalloc(count, GFP_KERNEL); in hostaudio_read() 82 if (kbuf == NULL) in hostaudio_read() 85 err = os_read_file(state->fd, kbuf, count); in hostaudio_read() 89 if (copy_to_user(buffer, kbuf, err)) in hostaudio_read() 93 kfree(kbuf); in hostaudio_read() 101 void *kbuf; in hostaudio_write() local 108 kbuf = memdup_user(buffer, count); in hostaudio_write() 109 if (IS_ERR(kbuf)) in hostaudio_write() 110 return PTR_ERR(kbuf); in hostaudio_write() [all …]
|
/linux-6.12.1/drivers/char/xilinx_hwicap/ |
D | xilinx_hwicap.c | 357 u32 *kbuf; in hwicap_read() local 385 kbuf = (u32 *) get_zeroed_page(GFP_KERNEL); in hwicap_read() 386 if (!kbuf) { in hwicap_read() 411 kbuf, words); in hwicap_read() 415 free_page((unsigned long)kbuf); in hwicap_read() 420 if (copy_to_user(buf, kbuf, bytes_to_read)) { in hwicap_read() 421 free_page((unsigned long)kbuf); in hwicap_read() 426 kbuf, in hwicap_read() 429 free_page((unsigned long)kbuf); in hwicap_read() 444 u32 *kbuf; in hwicap_write() local [all …]
|
/linux-6.12.1/security/integrity/ima/ |
D | ima_kexec.c | 85 struct kexec_buf kbuf = { .image = image, .buf_align = PAGE_SIZE, in ima_add_kexec_buffer() local 119 kbuf.buffer = kexec_buffer; in ima_add_kexec_buffer() 120 kbuf.bufsz = kexec_buffer_size; in ima_add_kexec_buffer() 121 kbuf.memsz = kexec_segment_size; in ima_add_kexec_buffer() 122 ret = kexec_add_buffer(&kbuf); in ima_add_kexec_buffer() 129 image->ima_buffer_addr = kbuf.mem; in ima_add_kexec_buffer() 134 kbuf.mem); in ima_add_kexec_buffer()
|
/linux-6.12.1/include/linux/ |
D | regset.h | 120 const void *kbuf, const void __user *ubuf); 254 const void **kbuf, in user_regset_copyin() argument 265 if (*kbuf) { in user_regset_copyin() 266 memcpy(data, *kbuf, copy); in user_regset_copyin() 267 *kbuf += copy; in user_regset_copyin() 280 const void **kbuf, in user_regset_copyin_ignore() argument 291 if (*kbuf) in user_regset_copyin_ignore() 292 *kbuf += copy; in user_regset_copyin_ignore()
|
/linux-6.12.1/arch/openrisc/kernel/ |
D | ptrace.c | 67 const void *kbuf, const void __user * ubuf) in genregs_set() argument 73 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 0, 4); in genregs_set() 75 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs_set() 79 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs_set() 86 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 4*33, -1); in genregs_set() 107 const void *kbuf, const void __user *ubuf) in fpregs_set() argument 110 return user_regset_copyin(&pos, &count, &kbuf, &ubuf, in fpregs_set()
|
/linux-6.12.1/drivers/fpga/ |
D | versal-fpga.c | 26 char *kbuf; in versal_fpga_ops_write() local 29 kbuf = dma_alloc_coherent(mgr->dev.parent, size, &dma_addr, GFP_KERNEL); in versal_fpga_ops_write() 30 if (!kbuf) in versal_fpga_ops_write() 33 memcpy(kbuf, buf, size); in versal_fpga_ops_write() 35 dma_free_coherent(mgr->dev.parent, size, kbuf, dma_addr); in versal_fpga_ops_write()
|
/linux-6.12.1/net/qrtr/ |
D | tun.c | 91 void *kbuf; in qrtr_tun_write_iter() local 99 kbuf = kzalloc(len, GFP_KERNEL); in qrtr_tun_write_iter() 100 if (!kbuf) in qrtr_tun_write_iter() 103 if (!copy_from_iter_full(kbuf, len, from)) { in qrtr_tun_write_iter() 104 kfree(kbuf); in qrtr_tun_write_iter() 108 ret = qrtr_endpoint_post(&tun->ep, kbuf, len); in qrtr_tun_write_iter() 110 kfree(kbuf); in qrtr_tun_write_iter()
|
/linux-6.12.1/arch/loongarch/kernel/ |
D | ptrace.c | 93 const void *kbuf, const void __user *ubuf) in gpr_set() argument 101 err = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in gpr_set() 104 err |= user_regset_copyin(&pos, &count, &kbuf, &ubuf, in gpr_set() 107 err |= user_regset_copyin(&pos, &count, &kbuf, &ubuf, in gpr_set() 110 err |= user_regset_copyin(&pos, &count, &kbuf, &ubuf, in gpr_set() 166 const void **kbuf, const void __user **ubuf) in gfpr_set() argument 168 return user_regset_copyin(pos, count, kbuf, ubuf, in gfpr_set() 175 const void **kbuf, const void __user **ubuf) in gfpr_set_simd() argument 182 err = user_regset_copyin(pos, count, kbuf, ubuf, in gfpr_set_simd() 200 const void *kbuf, const void __user *ubuf) in fpr_set() argument [all …]
|