/linux-master/arch/arm64/kernel/ |
H A D | machine_kexec_file.c | 97 struct kexec_buf kbuf; local 103 kbuf.image = image; 105 kbuf.buf_min = kernel_load_addr + kernel_size; 118 kbuf.buffer = headers; 119 kbuf.bufsz = headers_sz; 120 kbuf.mem = KEXEC_BUF_MEM_UNKNOWN; 121 kbuf.memsz = headers_sz; 122 kbuf.buf_align = SZ_64K; /* largest supported page size */ 123 kbuf.buf_max = ULONG_MAX; 124 kbuf [all...] |
H A D | kexec_image.c | 44 struct kexec_buf kbuf; local 75 kbuf.image = image; 76 kbuf.buf_min = 0; 77 kbuf.buf_max = ULONG_MAX; 78 kbuf.top_down = false; 80 kbuf.buffer = kernel; 81 kbuf.bufsz = kernel_len; 82 kbuf.mem = KEXEC_BUF_MEM_UNKNOWN; 83 kbuf.memsz = le64_to_cpu(h->image_size); 85 kbuf [all...] |
/linux-master/arch/parisc/kernel/ |
H A D | kexec_file.c | 25 struct kexec_buf kbuf = { .image = image, .buf_min = 0, local 32 ret = kexec_elf_load(image, &ehdr, &elf_info, &kbuf, &kernel_load_addr); 45 kbuf.buffer = initrd; 46 kbuf.bufsz = kbuf.memsz = initrd_len; 47 kbuf.buf_align = PAGE_SIZE; 48 kbuf.top_down = false; 49 kbuf.mem = KEXEC_BUF_MEM_UNKNOWN; 50 ret = kexec_add_buffer(&kbuf); 54 kexec_dprintk("Loaded initrd at 0x%lx\n", kbuf [all...] |
/linux-master/arch/powerpc/kexec/ |
H A D | elf_64.c | 40 struct kexec_buf kbuf = { .image = image, .buf_min = 0, local 52 kbuf.buf_min = pbuf.buf_min = crashk_res.start; 53 kbuf.buf_max = pbuf.buf_max = 58 ret = kexec_elf_load(image, &ehdr, &elf_info, &kbuf, &kernel_load_addr); 74 ret = load_crashdump_segments_ppc64(image, &kbuf); 92 kbuf.buffer = initrd; 93 kbuf.bufsz = kbuf.memsz = initrd_len; 94 kbuf.buf_align = PAGE_SIZE; 95 kbuf [all...] |
H A D | file_load_64.c | 130 * for the buffer. If found, sets kbuf->mem. 131 * @kbuf: Buffer contents and memory parameters. 137 static int __locate_mem_hole_top_down(struct kexec_buf *kbuf, argument 165 start = ALIGN(start, kbuf->buf_align); 166 if (start < end && (end - start + 1) >= kbuf->memsz) { 167 /* Suitable memory range found. Set kbuf->mem */ 168 kbuf->mem = ALIGN_DOWN(end - kbuf->memsz + 1, 169 kbuf->buf_align); 181 * @kbuf 188 locate_mem_hole_top_down_ppc64(struct kexec_buf *kbuf, u64 buf_min, u64 buf_max, const struct crash_mem *emem) argument 236 __locate_mem_hole_bottom_up(struct kexec_buf *kbuf, u64 buf_min, u64 buf_max) argument 286 locate_mem_hole_bottom_up_ppc64(struct kexec_buf *kbuf, u64 buf_min, u64 buf_max, const struct crash_mem *emem) argument 727 load_backup_segment(struct kimage *image, struct kexec_buf *kbuf) argument 795 load_elfcorehdr_segment(struct kimage *image, struct kexec_buf *kbuf) argument 843 load_crashdump_segments_ppc64(struct kimage *image, struct kexec_buf *kbuf) argument 1276 arch_kexec_locate_mem_hole(struct kexec_buf *kbuf) argument [all...] |
/linux-master/arch/riscv/kernel/ |
H A D | elf_kexec.c | 43 struct kexec_buf kbuf; local 46 kbuf.image = image; 57 kbuf.buffer = (void *) elf_info->buffer + phdr->p_offset; 58 kbuf.bufsz = size; 59 kbuf.buf_align = phdr->p_align; 60 kbuf.mem = phdr->p_paddr - old_pbase + new_pbase; 61 kbuf.memsz = phdr->p_memsz; 62 kbuf.top_down = false; 63 ret = kexec_add_buffer(&kbuf); 81 struct kexec_buf kbuf; local 207 struct kexec_buf kbuf; local [all...] |
/linux-master/kernel/ |
H A D | kexec_file.c | 436 struct kexec_buf *kbuf) 438 struct kimage *image = kbuf->image; 441 temp_end = min(end, kbuf->buf_max); 442 temp_start = temp_end - kbuf->memsz + 1; 446 temp_start = ALIGN_DOWN(temp_start, kbuf->buf_align); 448 if (temp_start < start || temp_start < kbuf->buf_min) 451 temp_end = temp_start + kbuf->memsz - 1; 467 kbuf->mem = temp_start; 474 struct kexec_buf *kbuf) 476 struct kimage *image = kbuf 435 locate_mem_hole_top_down(unsigned long start, unsigned long end, struct kexec_buf *kbuf) argument 473 locate_mem_hole_bottom_up(unsigned long start, unsigned long end, struct kexec_buf *kbuf) argument 509 struct kexec_buf *kbuf = (struct kexec_buf *)arg; local 535 kexec_walk_memblock(struct kexec_buf *kbuf, int (*func)(struct resource *, void *)) argument 586 kexec_walk_memblock(struct kexec_buf *kbuf, int (*func)(struct resource *, void *)) argument 602 kexec_walk_resources(struct kexec_buf *kbuf, int (*func)(struct resource *, void *)) argument 626 kexec_locate_mem_hole(struct kexec_buf *kbuf) argument 652 kexec_add_buffer(struct kexec_buf *kbuf) argument 829 kexec_purgatory_setup_kbuf(struct purgatory_info *pi, struct kexec_buf *kbuf) argument 890 kexec_purgatory_setup_sechdrs(struct purgatory_info *pi, struct kexec_buf *kbuf) argument 1033 kexec_load_purgatory(struct kimage *image, struct kexec_buf *kbuf) argument [all...] |
/linux-master/fs/ |
H A D | statfs.c | 267 static int put_compat_statfs(struct compat_statfs __user *ubuf, struct kstatfs *kbuf) argument 271 if ((kbuf->f_blocks | kbuf->f_bfree | kbuf->f_bavail | 272 kbuf->f_bsize | kbuf->f_frsize) & 0xffffffff00000000ULL) 276 if (kbuf->f_files != 0xffffffffffffffffULL 277 && (kbuf->f_files & 0xffffffff00000000ULL)) 279 if (kbuf->f_ffree != 0xffffffffffffffffULL 280 && (kbuf 323 put_compat_statfs64(struct compat_statfs64 __user *ubuf, struct kstatfs *kbuf) argument [all...] |
/linux-master/mm/damon/ |
H A D | dbgfs.c | 38 char *kbuf; local 45 kbuf = kmalloc(count + 1, GFP_KERNEL | __GFP_NOWARN); 46 if (!kbuf) 49 ret = simple_write_to_buffer(kbuf, count + 1, ppos, buf, count); 51 kfree(kbuf); 54 kbuf[ret] = '\0'; 56 return kbuf; 63 char kbuf[128]; local 67 ret = scnprintf(kbuf, ARRAY_SIZE(kbuf), " 81 char *kbuf; local 176 char *kbuf; local 301 char *kbuf; local 495 char *kbuf; local 578 char *kbuf; local 673 char *kbuf; local 701 char *kbuf; local 813 static const char kbuf[512] = DAMON_DBGFS_DEPRECATION_NOTICE; local 873 char *kbuf; local 979 char *kbuf; local 1026 char *kbuf; local [all...] |
/linux-master/drivers/fpga/ |
H A D | versal-fpga.c | 26 char *kbuf; local 29 kbuf = dma_alloc_coherent(mgr->dev.parent, size, &dma_addr, GFP_KERNEL); 30 if (!kbuf) 33 memcpy(kbuf, buf, size); 35 dma_free_coherent(mgr->dev.parent, size, kbuf, dma_addr);
|
H A D | zynqmp-fpga.c | 46 char *kbuf; local 51 kbuf = dma_alloc_coherent(priv->dev, size, &dma_addr, GFP_KERNEL); 52 if (!kbuf) 55 memcpy(kbuf, buf, size); 64 dma_free_coherent(priv->dev, size, kbuf, dma_addr);
|
/linux-master/security/integrity/ima/ |
H A D | ima_kexec.c | 84 struct kexec_buf kbuf = { .image = image, .buf_align = PAGE_SIZE, local 89 /* use more understandable variable names than defined in kbuf */ 118 kbuf.buffer = kexec_buffer; 119 kbuf.bufsz = kexec_buffer_size; 120 kbuf.memsz = kexec_segment_size; 121 ret = kexec_add_buffer(&kbuf); 128 image->ima_buffer_addr = kbuf.mem; 133 kbuf.mem);
|
/linux-master/arch/powerpc/kernel/ptrace/ |
H A 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, cons [all...] |
H A D | ptrace-novsx.c | 51 const void *kbuf, const void __user *ubuf) 59 return user_regset_copyin(&pos, &count, &kbuf, &ubuf, 49 fpr_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) argument
|
H A D | ptrace-altivec.c | 81 const void *kbuf, const void __user *ubuf) 90 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, 108 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &vrsave, 79 vr_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) argument
|
H A D | ptrace-spe.c | 41 const void *kbuf, const void __user *ubuf) 47 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, 55 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, 39 evr_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) argument
|
H A D | ptrace-tm.c | 120 * @kbuf: Kernel buffer to copy into. 136 const void *kbuf, const void __user *ubuf) 151 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, 156 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ®, 167 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, 173 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 178 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ®, 186 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 258 * @kbuf: Kernel buffer to copy into. 275 const void *kbuf, cons 134 tm_cgpr_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) argument 273 tm_cfpr_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) argument 393 tm_cvmx_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) argument 512 tm_cvsx_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) argument 616 tm_spr_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) argument 676 tm_tar_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) argument 717 tm_ppr_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) argument 757 tm_dscr_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) argument 782 tm_cgpr32_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) argument [all...] |
/linux-master/include/linux/ |
H A D | regset.h | 107 * @kbuf: if not %NULL, a kernel-space pointer to copy from 108 * @ubuf: if @kbuf is %NULL, a user-space pointer to copy from 112 * bytes, but must be properly aligned. If @kbuf is non-null, that 113 * buffer is used and @ubuf is ignored. If @kbuf is %NULL, then 120 const void *kbuf, const void __user *ubuf); 254 const void **kbuf, 265 if (*kbuf) { 266 memcpy(data, *kbuf, copy); 267 *kbuf += copy; 280 const void **kbuf, 253 user_regset_copyin(unsigned int *pos, unsigned int *count, const void **kbuf, const void __user **ubuf, void *data, const int start_pos, const int end_pos) argument [all...] |
/linux-master/arch/x86/kernel/ |
H A D | kexec-bzimage64.c | 408 struct kexec_buf kbuf = { .image = image, .buf_max = ULONG_MAX, local 472 kbuf.bufsz = params_cmdline_sz + ALIGN(efi_map_sz, 16) + 479 kbuf.bufsz += sizeof(struct setup_data) + 482 params = kzalloc(kbuf.bufsz, GFP_KERNEL); 494 kbuf.buffer = params; 495 kbuf.memsz = kbuf.bufsz; 496 kbuf.buf_align = 16; 497 kbuf.buf_min = MIN_BOOTPARAM_ADDR; 498 ret = kexec_add_buffer(&kbuf); [all...] |
H A D | crash.c | 352 struct kexec_buf kbuf = { .image = image, .buf_min = 0, local 356 ret = prepare_elf_headers(&kbuf.buffer, &kbuf.bufsz, &pnum); 360 image->elf_headers = kbuf.buffer; 361 image->elf_headers_sz = kbuf.bufsz; 362 kbuf.memsz = kbuf.bufsz; 375 kbuf.memsz = pnum * sizeof(Elf64_Phdr); 376 kbuf.memsz += sizeof(Elf64_Ehdr); 381 image->elf_headers_sz = kbuf [all...] |
/linux-master/arch/um/drivers/ |
H A D | hostaudio_kern.c | 74 void *kbuf; local 81 kbuf = kmalloc(count, GFP_KERNEL); 82 if (kbuf == NULL) 85 err = os_read_file(state->fd, kbuf, count); 89 if (copy_to_user(buffer, kbuf, err)) 93 kfree(kbuf); 101 void *kbuf; local 108 kbuf = memdup_user(buffer, count); 109 if (IS_ERR(kbuf)) 110 return PTR_ERR(kbuf); [all...] |
/linux-master/arch/powerpc/platforms/pseries/ |
H A D | reconfig.c | 362 char *kbuf; local 369 kbuf = memdup_user_nul(buf, count); 370 if (IS_ERR(kbuf)) 371 return PTR_ERR(kbuf); 373 tmp = strchr(kbuf, ' '); 381 if (!strcmp(kbuf, "add_node")) 382 rv = do_add_node(tmp, count - (tmp - kbuf)); 383 else if (!strcmp(kbuf, "remove_node")) 385 else if (!strcmp(kbuf, "add_property")) 386 rv = do_add_property(tmp, count - (tmp - kbuf)); [all...] |
/linux-master/net/qrtr/ |
H A D | tun.c | 91 void *kbuf; local 99 kbuf = kzalloc(len, GFP_KERNEL); 100 if (!kbuf) 103 if (!copy_from_iter_full(kbuf, len, from)) { 104 kfree(kbuf); 108 ret = qrtr_endpoint_post(&tun->ep, kbuf, len); 110 kfree(kbuf);
|
/linux-master/arch/openrisc/kernel/ |
H A D | ptrace.c | 67 const void *kbuf, const void __user * ubuf) 73 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 0, 4); 75 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, 79 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, 86 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 4*33, -1); 108 const void *kbuf, const void __user *ubuf) 114 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, 64 genregs_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user * ubuf) argument 105 fpregs_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) argument
|
/linux-master/arch/sparc/kernel/ |
H A D | ptrace_32.c | 109 const void *kbuf, const void __user *ubuf) 119 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, 127 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, 137 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, 146 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, 151 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, 156 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, 161 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 36 * sizeof(u32), 185 const void *kbuf, const void __user *ubuf) 194 ret = user_regset_copyin(&pos, &count, &kbuf, 106 genregs32_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) argument 182 fpregs32_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) argument 260 setregs_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) argument 300 setfpregs_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) argument [all...] |