Home
last modified time | relevance | path

Searched refs:kbuf (Results 1 – 25 of 44) sorted by relevance

12

/arch/parisc/kernel/
Dkexec_file.c25 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 …]
Dptrace.c396 void *kbuf, void __user *ubuf) in fpr_get() argument
399 __u64 *k = kbuf; in fpr_get()
406 if (kbuf) in fpr_get()
414 kbuf = k; in fpr_get()
418 return user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, in fpr_get()
425 const void *kbuf, const void __user *ubuf) in fpr_set() argument
428 const __u64 *k = kbuf; in fpr_set()
435 if (kbuf) in fpr_set()
445 kbuf = k; in fpr_set()
449 return user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, in fpr_set()
[all …]
/arch/powerpc/kernel/
Dkexec_elf_64.c39 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 …]
Dptrace.c339 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, &reg, 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/
Dmachine_kexec_file.c183 struct kexec_buf kbuf; in load_other_segments() local
188 kbuf.image = image; in load_other_segments()
190 kbuf.buf_min = kernel_load_addr + kernel_size; in load_other_segments()
194 kbuf.buffer = initrd; in load_other_segments()
195 kbuf.bufsz = initrd_len; in load_other_segments()
196 kbuf.mem = KEXEC_BUF_MEM_UNKNOWN; in load_other_segments()
197 kbuf.memsz = initrd_len; in load_other_segments()
198 kbuf.buf_align = 0; in load_other_segments()
200 kbuf.buf_max = round_down(kernel_load_addr, SZ_1G) in load_other_segments()
202 kbuf.top_down = false; in load_other_segments()
[all …]
Dkexec_image.c45 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 …]
Dptrace.c479 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/
Dptrace.c49 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/
Dkexec-bzimage64.c351 struct kexec_buf kbuf = { .image = image, .buf_max = ULONG_MAX, in bzImage64_load() local
413 kbuf.bufsz = params_cmdline_sz + ALIGN(efi_map_sz, 16) + in bzImage64_load()
417 params = kzalloc(kbuf.bufsz, GFP_KERNEL); in bzImage64_load()
429 kbuf.buffer = params; in bzImage64_load()
430 kbuf.memsz = kbuf.bufsz; in bzImage64_load()
431 kbuf.buf_align = 16; in bzImage64_load()
432 kbuf.buf_min = MIN_BOOTPARAM_ADDR; in bzImage64_load()
433 ret = kexec_add_buffer(&kbuf); in bzImage64_load()
436 bootparam_load_addr = kbuf.mem; in bzImage64_load()
438 bootparam_load_addr, kbuf.bufsz, kbuf.bufsz); in bzImage64_load()
[all …]
Dcrash.c426 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/x86/kernel/fpu/
Dregset.c31 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 …]
/arch/sparc/kernel/
Dptrace_64.c163 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 …]
Dptrace_32.c52 void *kbuf, void __user *ubuf) in genregs32_get() argument
56 unsigned long *k = kbuf; in genregs32_get()
66 if (kbuf) { in genregs32_get()
112 if (kbuf) in genregs32_get()
123 return user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, in genregs32_get()
130 const void *kbuf, const void __user *ubuf) in genregs32_set() argument
134 const unsigned long *k = kbuf; in genregs32_set()
144 if (kbuf) { in genregs32_set()
172 if (kbuf) in genregs32_set()
207 return user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, in genregs32_set()
[all …]
/arch/riscv/kernel/
Dptrace.c34 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/
Dpicvue_proc.c69 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/
Dptrace.c25 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/
Dptrace_32.c139 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 …]
Dptrace_64.c149 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/
Dreconfig.c362 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/
Dhostaudio_kern.c74 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/
Dptrace.c215 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/s390/kernel/
Dptrace.c895 void *kbuf, void __user *ubuf) in s390_regs_get() argument
900 if (kbuf) { in s390_regs_get()
901 unsigned long *k = kbuf; in s390_regs_get()
922 const void *kbuf, const void __user *ubuf) in s390_regs_set() argument
929 if (kbuf) { in s390_regs_set()
930 const unsigned long *k = kbuf; in s390_regs_set()
957 unsigned int count, void *kbuf, void __user *ubuf) in s390_fpregs_get() argument
967 return user_regset_copyout(&pos, &count, &kbuf, &ubuf, in s390_fpregs_get()
973 unsigned int count, const void *kbuf, in s390_fpregs_set() argument
990 rc = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &ufpc, in s390_fpregs_set()
[all …]
/arch/hexagon/kernel/
Dptrace.c39 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/arc/kernel/
Dptrace.c22 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, &regs->r30, in arcv2regs_get()
[all …]
/arch/csky/kernel/
Dptrace.c75 void *kbuf, void __user *ubuf) in gpr_get() argument
84 return user_regset_copyout(&pos, &count, &kbuf, &ubuf, regs, 0, -1); in gpr_get()
90 const void *kbuf, const void __user *ubuf) in gpr_set() argument
95 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &regs, 0, -1); in gpr_set()
113 void *kbuf, void __user *ubuf) in fpr_get() argument
129 return user_regset_copyout(&pos, &count, &kbuf, &ubuf, &tmp, 0, -1); in fpr_get()
131 return user_regset_copyout(&pos, &count, &kbuf, &ubuf, regs, 0, -1); in fpr_get()
138 const void *kbuf, const void __user *ubuf) in fpr_set() argument
147 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &tmp, 0, -1); in fpr_set()
159 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs, 0, -1); in fpr_set()

12