/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 pr_debug("Loaded initrd at 0x%lx\n", kbuf.mem); in elf_load() 55 image->arch.initrd_start = kbuf.mem; in elf_load() [all …]
|
D | ptrace.c | 407 void *kbuf, void __user *ubuf) in fpr_get() argument 410 __u64 *k = kbuf; in fpr_get() 417 if (kbuf) in fpr_get() 425 kbuf = k; in fpr_get() 429 return user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, in fpr_get() 436 const void *kbuf, const void __user *ubuf) in fpr_set() argument 439 const __u64 *k = kbuf; in fpr_set() 446 if (kbuf) in fpr_set() 456 kbuf = k; in fpr_set() 460 return user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, in fpr_set() [all …]
|
/arch/powerpc/kernel/ |
D | kexec_elf_64.c | 39 struct kexec_buf kbuf = { .image = image, .buf_min = 0, in elf64_load() local 49 ret = kexec_elf_load(image, &ehdr, &elf_info, &kbuf, &kernel_load_addr); in elf64_load() 64 kbuf.buffer = initrd; in elf64_load() 65 kbuf.bufsz = kbuf.memsz = initrd_len; in elf64_load() 66 kbuf.buf_align = PAGE_SIZE; in elf64_load() 67 kbuf.top_down = false; in elf64_load() 68 kbuf.mem = KEXEC_BUF_MEM_UNKNOWN; in elf64_load() 69 ret = kexec_add_buffer(&kbuf); in elf64_load() 72 initrd_load_addr = kbuf.mem; in elf64_load() 97 kbuf.buffer = fdt; in elf64_load() [all …]
|
D | ptrace.c | 339 void *kbuf, void __user *ubuf) in gpr_get() argument 352 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in gpr_get() 357 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &msr, in gpr_get() 367 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in gpr_get() 372 ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, in gpr_get() 380 const void *kbuf, const void __user *ubuf) in gpr_set() argument 390 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in gpr_set() 395 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ®, in gpr_set() 406 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in gpr_set() 413 &pos, &count, &kbuf, &ubuf, in gpr_set() [all …]
|
/arch/arm64/kernel/ |
D | machine_kexec_file.c | 185 struct kexec_buf kbuf; in load_other_segments() local 190 kbuf.image = image; in load_other_segments() 192 kbuf.buf_min = kernel_load_addr + kernel_size; in load_other_segments() 196 kbuf.buffer = initrd; in load_other_segments() 197 kbuf.bufsz = initrd_len; in load_other_segments() 198 kbuf.mem = KEXEC_BUF_MEM_UNKNOWN; in load_other_segments() 199 kbuf.memsz = initrd_len; in load_other_segments() 200 kbuf.buf_align = 0; in load_other_segments() 202 kbuf.buf_max = round_down(kernel_load_addr, SZ_1G) in load_other_segments() 204 kbuf.top_down = false; in load_other_segments() [all …]
|
D | kexec_image.c | 45 struct kexec_buf kbuf; in image_load() local 80 kbuf.image = image; in image_load() 81 kbuf.buf_min = 0; in image_load() 82 kbuf.buf_max = ULONG_MAX; in image_load() 83 kbuf.top_down = false; in image_load() 85 kbuf.buffer = kernel; in image_load() 86 kbuf.bufsz = kernel_len; in image_load() 87 kbuf.mem = KEXEC_BUF_MEM_UNKNOWN; in image_load() 88 kbuf.memsz = le64_to_cpu(h->image_size); in image_load() 90 kbuf.buf_align = MIN_KIMG_ALIGN; in image_load() [all …]
|
D | ptrace.c | 479 void *kbuf, void __user *ubuf) in hw_break_get() argument 491 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &info, 0, in hw_break_get() 498 ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, offset, in hw_break_get() 510 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &addr, in hw_break_get() 519 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &ctrl, in hw_break_get() 525 ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, in hw_break_get() 540 const void *kbuf, const void __user *ubuf) in hw_break_set() argument 549 ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 0, offset); in hw_break_set() 558 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &addr, in hw_break_set() 569 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &ctrl, in hw_break_set() [all …]
|
/arch/openrisc/kernel/ |
D | ptrace.c | 49 void *kbuf, void __user * ubuf) in genregs_get() argument 55 ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, 0, 4); in genregs_get() 58 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in genregs_get() 61 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in genregs_get() 64 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in genregs_get() 67 ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, in genregs_get() 79 const void *kbuf, const void __user * ubuf) in genregs_set() argument 85 ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 0, 4); in genregs_set() 88 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs_set() 92 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs_set() [all …]
|
/arch/x86/kernel/ |
D | kexec-bzimage64.c | 350 struct kexec_buf kbuf = { .image = image, .buf_max = ULONG_MAX, in bzImage64_load() local 412 kbuf.bufsz = params_cmdline_sz + ALIGN(efi_map_sz, 16) + in bzImage64_load() 416 params = kzalloc(kbuf.bufsz, GFP_KERNEL); in bzImage64_load() 428 kbuf.buffer = params; in bzImage64_load() 429 kbuf.memsz = kbuf.bufsz; in bzImage64_load() 430 kbuf.buf_align = 16; in bzImage64_load() 431 kbuf.buf_min = MIN_BOOTPARAM_ADDR; in bzImage64_load() 432 ret = kexec_add_buffer(&kbuf); in bzImage64_load() 435 bootparam_load_addr = kbuf.mem; in bzImage64_load() 437 bootparam_load_addr, kbuf.bufsz, kbuf.bufsz); in bzImage64_load() [all …]
|
D | crash.c | 426 struct kexec_buf kbuf = { .image = image, .buf_min = 0, in crash_load_segments() local 443 kbuf.buffer = &crash_zero_bytes; in crash_load_segments() 444 kbuf.bufsz = sizeof(crash_zero_bytes); in crash_load_segments() 445 kbuf.memsz = image->arch.backup_src_sz; in crash_load_segments() 446 kbuf.buf_align = PAGE_SIZE; in crash_load_segments() 452 ret = kexec_add_buffer(&kbuf); in crash_load_segments() 455 image->arch.backup_load_addr = kbuf.mem; in crash_load_segments() 458 image->arch.backup_src_start, kbuf.memsz); in crash_load_segments() 462 ret = prepare_elf_headers(image, &kbuf.buffer, &kbuf.bufsz); in crash_load_segments() 466 image->arch.elf_headers = kbuf.buffer; in crash_load_segments() [all …]
|
/arch/sparc/kernel/ |
D | ptrace_32.c | 88 void *kbuf, void __user *ubuf) in genregs32_get() argument 97 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in genregs32_get() 106 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in genregs32_get() 119 return user_regset_copyout(&pos, &count, &kbuf, &ubuf, in genregs32_get() 127 const void *kbuf, const void __user *ubuf) in genregs32_set() argument 137 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs32_set() 146 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs32_set() 156 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs32_set() 165 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs32_set() 170 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs32_set() [all …]
|
D | ptrace_64.c | 163 void *kbuf, int len) in get_from_target() argument 166 if (copy_from_user(kbuf, (void __user *) uaddr, len)) in get_from_target() 169 int len2 = access_process_vm(target, uaddr, kbuf, len, in get_from_target() 178 void *kbuf, int len) in set_to_target() argument 181 if (copy_to_user((void __user *) uaddr, kbuf, len)) in set_to_target() 184 int len2 = access_process_vm(target, uaddr, kbuf, len, in set_to_target() 251 void *kbuf, void __user *ubuf) in genregs64_get() argument 259 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in genregs64_get() 267 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in genregs64_get() 275 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in genregs64_get() [all …]
|
/arch/x86/kernel/fpu/ |
D | regset.c | 31 void *kbuf, void __user *ubuf) in xfpregs_get() argument 41 return user_regset_copyout(&pos, &count, &kbuf, &ubuf, in xfpregs_get() 47 const void *kbuf, const void __user *ubuf) in xfpregs_set() argument 58 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in xfpregs_set() 78 void *kbuf, void __user *ubuf) in xstateregs_get() argument 92 if (kbuf) in xstateregs_get() 93 ret = copy_xstate_to_kernel(kbuf, xsave, pos, count); in xstateregs_get() 108 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, xsave, 0, -1); in xstateregs_get() 115 const void *kbuf, const void __user *ubuf) in xstateregs_set() argument 135 if (kbuf) in xstateregs_set() [all …]
|
D | xstate.c | 1000 static void fill_gap(unsigned to, void **kbuf, unsigned *pos, unsigned *count) in fill_gap() argument 1007 memcpy(*kbuf, (void *)&init_fpstate.xsave + *pos, size); in fill_gap() 1008 *kbuf += size; in fill_gap() 1015 void **kbuf, unsigned *pos, unsigned *count) in copy_part() argument 1017 fill_gap(offset, kbuf, pos, count); in copy_part() 1021 memcpy(*kbuf, from, size); in copy_part() 1022 *kbuf += size; in copy_part() 1035 int copy_xstate_to_kernel(void *kbuf, struct xregs_state *xsave, unsigned int offset_start, unsigne… in copy_xstate_to_kernel() argument 1057 &xsave->i387, &kbuf, &offset_start, &count); in copy_xstate_to_kernel() 1060 &xsave->i387.mxcsr, &kbuf, &offset_start, &count); in copy_xstate_to_kernel() [all …]
|
/arch/riscv/kernel/ |
D | ptrace.c | 34 void *kbuf, void __user *ubuf) in riscv_gpr_get() argument 39 return user_regset_copyout(&pos, &count, &kbuf, &ubuf, regs, 0, -1); in riscv_gpr_get() 45 const void *kbuf, const void __user *ubuf) in riscv_gpr_set() argument 51 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs, 0, -1); in riscv_gpr_set() 59 void *kbuf, void __user *ubuf) in riscv_fpr_get() argument 64 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, fstate, 0, in riscv_fpr_get() 67 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, fstate, 0, in riscv_fpr_get() 78 const void *kbuf, const void __user *ubuf) in riscv_fpr_set() argument 83 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, fstate, 0, in riscv_fpr_set() 86 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, fstate, 0, in riscv_fpr_set()
|
/arch/mips/lasat/ |
D | picvue_proc.c | 69 char kbuf[PVC_LINELEN]; in pvc_line_proc_write() local 74 len = min(count, sizeof(kbuf) - 1); in pvc_line_proc_write() 75 if (copy_from_user(kbuf, buf, len)) in pvc_line_proc_write() 77 kbuf[len] = '\0'; in pvc_line_proc_write() 79 if (len > 0 && kbuf[len - 1] == '\n') in pvc_line_proc_write() 83 strncpy(pvc_lines[lineno], kbuf, len); in pvc_line_proc_write() 104 char kbuf[42]; in pvc_scroll_proc_write() local 108 len = min(count, sizeof(kbuf) - 1); in pvc_scroll_proc_write() 109 if (copy_from_user(kbuf, buf, len)) in pvc_scroll_proc_write() 111 kbuf[len] = '\0'; in pvc_scroll_proc_write() [all …]
|
/arch/nios2/kernel/ |
D | ptrace.c | 25 void *kbuf, void __user *ubuf) in genregs_get() argument 33 ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, \ in genregs_get() 38 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, PTR, \ in genregs_get() 43 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, PTR, \ in genregs_get() 59 ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, in genregs_get() 71 const void *kbuf, const void __user *ubuf) in genregs_set() argument 79 ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, \ in genregs_set() 84 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, \ in genregs_set() 89 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, \ in genregs_set() 105 ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, in genregs_set()
|
/arch/sh/kernel/ |
D | ptrace_32.c | 139 void *kbuf, void __user *ubuf) in genregs_get() argument 144 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in genregs_get() 149 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in genregs_get() 154 ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, in genregs_get() 163 const void *kbuf, const void __user *ubuf) in genregs_set() argument 168 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs_set() 172 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs_set() 177 ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, in genregs_set() 187 void *kbuf, void __user *ubuf) in fpregs_get() argument 196 return user_regset_copyout(&pos, &count, &kbuf, &ubuf, in fpregs_get() [all …]
|
D | ptrace_64.c | 149 void *kbuf, void __user *ubuf) in genregs_get() argument 155 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in genregs_get() 161 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in genregs_get() 167 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in genregs_get() 173 ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, in genregs_get() 182 const void *kbuf, const void __user *ubuf) in genregs_set() argument 188 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs_set() 194 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs_set() 201 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs_set() 207 ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, in genregs_set() [all …]
|
/arch/powerpc/platforms/pseries/ |
D | reconfig.c | 362 char *kbuf; in ofdt_write() local 365 kbuf = memdup_user_nul(buf, count); in ofdt_write() 366 if (IS_ERR(kbuf)) in ofdt_write() 367 return PTR_ERR(kbuf); in ofdt_write() 369 tmp = strchr(kbuf, ' '); in ofdt_write() 377 if (!strcmp(kbuf, "add_node")) in ofdt_write() 378 rv = do_add_node(tmp, count - (tmp - kbuf)); in ofdt_write() 379 else if (!strcmp(kbuf, "remove_node")) in ofdt_write() 381 else if (!strcmp(kbuf, "add_property")) in ofdt_write() 382 rv = do_add_property(tmp, count - (tmp - kbuf)); in ofdt_write() [all …]
|
/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 …]
|
/arch/mips/kernel/ |
D | ptrace.c | 215 void *kbuf, void __user *ubuf) in gpr32_get() argument 221 return user_regset_copyout(&pos, &count, &kbuf, &ubuf, uregs, 0, in gpr32_get() 228 const void *kbuf, const void __user *ubuf) in gpr32_set() argument 241 err = user_regset_copyin(&pos, &count, &kbuf, &ubuf, uregs, 0, in gpr32_set() 282 void *kbuf, void __user *ubuf) in gpr64_get() argument 288 return user_regset_copyout(&pos, &count, &kbuf, &ubuf, uregs, 0, in gpr64_get() 295 const void *kbuf, const void __user *ubuf) in gpr64_set() argument 308 err = user_regset_copyin(&pos, &count, &kbuf, &ubuf, uregs, 0, in gpr64_set() 414 void **kbuf, void __user **ubuf) in fpr_get_fpa() argument 416 return user_regset_copyout(pos, count, kbuf, ubuf, in fpr_get_fpa() [all …]
|
/arch/hexagon/kernel/ |
D | ptrace.c | 39 void *kbuf, void __user *ubuf) in genregs_get() argument 55 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in genregs_get() 60 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, \ in genregs_get() 87 ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, in genregs_get() 95 const void *kbuf, const void __user *ubuf) in genregs_set() argument 104 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs_set() 109 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, \ in genregs_set() 138 ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, in genregs_set()
|
/arch/s390/kernel/ |
D | ptrace.c | 927 void *kbuf, void __user *ubuf) in s390_regs_get() argument 932 if (kbuf) { in s390_regs_get() 933 unsigned long *k = kbuf; in s390_regs_get() 954 const void *kbuf, const void __user *ubuf) in s390_regs_set() argument 961 if (kbuf) { in s390_regs_set() 962 const unsigned long *k = kbuf; in s390_regs_set() 989 unsigned int count, void *kbuf, void __user *ubuf) in s390_fpregs_get() argument 999 return user_regset_copyout(&pos, &count, &kbuf, &ubuf, in s390_fpregs_get() 1005 unsigned int count, const void *kbuf, in s390_fpregs_set() argument 1020 rc = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &ufpc, in s390_fpregs_set() [all …]
|
/arch/arc/kernel/ |
D | ptrace.c | 22 void *kbuf, void __user *ubuf) in genregs_get() argument 31 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, PTR, \ in genregs_get() 37 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, PTR, \ in genregs_get() 43 ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, \ in genregs_get() 108 const void *kbuf, const void __user *ubuf) in genregs_set() argument 116 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, \ in genregs_set() 123 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, \ in genregs_set() 130 ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, \ in genregs_set() 188 void *kbuf, void __user *ubuf) in arcv2regs_get() argument 202 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, ®s->r30, in arcv2regs_get() [all …]
|