Home
last modified time | relevance | path

Searched refs:ubuf (Results 1 – 25 of 48) sorted by relevance

12

/arch/x86/kernel/
Dsys_ia32.c68 SYSCALL_DEFINE5(ia32_pread64, unsigned int, fd, char __user *, ubuf, in SYSCALL_DEFINE5() argument
71 return ksys_pread64(fd, ubuf, count, in SYSCALL_DEFINE5()
75 SYSCALL_DEFINE5(ia32_pwrite64, unsigned int, fd, const char __user *, ubuf, in SYSCALL_DEFINE5() argument
78 return ksys_pwrite64(fd, ubuf, count, in SYSCALL_DEFINE5()
132 static int cp_stat64(struct stat64 __user *ubuf, struct kstat *stat) in cp_stat64() argument
134 typeof(ubuf->st_uid) uid = 0; in cp_stat64()
135 typeof(ubuf->st_gid) gid = 0; in cp_stat64()
138 if (!user_write_access_begin(ubuf, sizeof(struct stat64))) in cp_stat64()
140 unsafe_put_user(huge_encode_dev(stat->dev), &ubuf->st_dev, Efault); in cp_stat64()
141 unsafe_put_user(stat->ino, &ubuf->__st_ino, Efault); in cp_stat64()
[all …]
/arch/powerpc/kernel/ptrace/
Dptrace-decl.h75 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 …]
Dptrace-tm.c136 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, &reg, 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, &reg, 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 …]
Dptrace-view.c240 const void __user *ubuf) 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, &reg, 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, &reg, in gpr_set()
283 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, in gpr_set()
301 const void __user *ubuf) in ppr_set() argument
306 return user_regset_copyin(&pos, &count, &kbuf, &ubuf, in ppr_set()
317 const void __user *ubuf) in dscr_set() argument
[all …]
Dptrace-spe.c41 const void *kbuf, const void __user *ubuf) in evr_set() argument
47 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in evr_set()
55 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in evr_set()
Dptrace-vsx.c51 const void *kbuf, const void __user *ubuf) in fpr_set() argument
63 i = user_regset_copyin(&pos, &count, &kbuf, &ubuf, buf, 0, -1); in fpr_set()
128 const void *kbuf, const void __user *ubuf) in vsr_set() argument
141 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in vsr_set()
Dptrace-altivec.c81 const void *kbuf, const void __user *ubuf) in vr_set() argument
90 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in vr_set()
108 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &vrsave, in vr_set()
Dptrace-novsx.c51 const void *kbuf, const void __user *ubuf) in fpr_set() argument
59 return user_regset_copyin(&pos, &count, &kbuf, &ubuf, in fpr_set()
/arch/sparc/kernel/
Dptrace_32.c109 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 …]
Dptrace_64.c270 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()
317 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs64_set()
326 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs64_set()
335 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, in genregs64_set()
374 const void *kbuf, const void __user *ubuf) in fpregs64_set() argument
383 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in fpregs64_set()
387 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in fpregs64_set()
[all …]
/arch/openrisc/kernel/
Dptrace.c67 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()
108 const void *kbuf, const void __user *ubuf) in fpregs_set() argument
114 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in fpregs_set()
/arch/powerpc/platforms/powernv/
Dopal-lpc.c184 static ssize_t lpc_debug_read(struct file *filp, char __user *ubuf, in lpc_debug_read() argument
191 if (!access_ok(ubuf, count)) in lpc_debug_read()
250 rc = __put_user((u32)data, (u32 __user *)ubuf); in lpc_debug_read()
256 rc = __put_user((u16)data, (u16 __user *)ubuf); in lpc_debug_read()
262 rc = __put_user((u8)data, (u8 __user *)ubuf); in lpc_debug_read()
268 ubuf += len; in lpc_debug_read()
275 static ssize_t lpc_debug_write(struct file *filp, const char __user *ubuf, in lpc_debug_write() argument
282 if (!access_ok(ubuf, count)) in lpc_debug_write()
320 rc = __get_user(data, (u32 __user *)ubuf); in lpc_debug_write()
324 rc = __get_user(data, (u16 __user *)ubuf); in lpc_debug_write()
[all …]
/arch/x86/kernel/cpu/mce/
Ddev-mcelog.c162 static int __mce_read_apei(char __user **ubuf, size_t usize) in __mce_read_apei() argument
184 if (copy_to_user(*ubuf, &m, sizeof(struct mce))) in __mce_read_apei()
197 *ubuf += sizeof(struct mce); in __mce_read_apei()
202 static ssize_t mce_chrdev_read(struct file *filp, char __user *ubuf, in mce_chrdev_read() argument
205 char __user *buf = ubuf; in mce_chrdev_read()
213 if (err || buf != ubuf) in mce_chrdev_read()
241 return err ? err : buf - ubuf; in mce_chrdev_read()
293 static ssize_t mce_chrdev_write(struct file *filp, const char __user *ubuf, in mce_chrdev_write() argument
309 if (copy_from_user(&m, ubuf, usize)) in mce_chrdev_write()
/arch/loongarch/kernel/
Dptrace.c93 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 …]
/arch/riscv/kernel/
Dptrace.c44 const void *kbuf, const void __user *ubuf) in riscv_gpr_set() argument
49 return user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs, 0, -1); in riscv_gpr_set()
70 const void *kbuf, const void __user *ubuf) in riscv_fpr_set() argument
75 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, fstate, 0, in riscv_fpr_set()
78 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, fstate, 0, in riscv_fpr_set()
124 const void *kbuf, const void __user *ubuf) in riscv_vr_set() argument
134 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &ptrace_vstate, 0, in riscv_vr_set()
149 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, vstate->datap, in riscv_vr_set()
327 const void *kbuf, const void __user *ubuf) in compat_riscv_gpr_set() argument
332 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &cregs, 0, -1); in compat_riscv_gpr_set()
/arch/arm64/kernel/
Dptrace.c510 const void *kbuf, const void __user *ubuf) in hw_break_set() argument
519 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 0, offset); in hw_break_set()
526 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &addr, in hw_break_set()
537 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &ctrl, in hw_break_set()
546 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, in hw_break_set()
566 const void *kbuf, const void __user *ubuf) in gpr_set() argument
571 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &newregs, 0, -1); in gpr_set()
620 const void *kbuf, const void __user *ubuf, in __fpr_set() argument
634 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &newstate, in __fpr_set()
646 const void *kbuf, const void __user *ubuf) in fpr_set() argument
[all …]
/arch/powerpc/kernel/
Dsys_ppc32.c72 char __user *, ubuf, compat_size_t, count, in PPC32_SYSCALL_DEFINE6() argument
75 return ksys_pread64(fd, ubuf, count, merge_64(pos1, pos2)); in PPC32_SYSCALL_DEFINE6()
80 const char __user *, ubuf, compat_size_t, count, in PPC32_SYSCALL_DEFINE6() argument
83 return ksys_pwrite64(fd, ubuf, count, merge_64(pos1, pos2)); in PPC32_SYSCALL_DEFINE6()
/arch/sh/kernel/
Dptrace_32.c146 const void *kbuf, const void __user *ubuf) in genregs_set() argument
151 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs_set()
155 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs_set()
160 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, in genregs_set()
184 const void *kbuf, const void __user *ubuf) in fpregs_set() argument
195 return user_regset_copyin(&pos, &count, &kbuf, &ubuf, in fpregs_set()
198 return user_regset_copyin(&pos, &count, &kbuf, &ubuf, in fpregs_set()
223 const void *kbuf, const void __user *ubuf) in dspregs_set() argument
229 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs, in dspregs_set()
232 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, in dspregs_set()
/arch/nios2/kernel/
Dptrace.c49 const void *kbuf, const void __user *ubuf) in genregs_set() argument
57 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, \ in genregs_set()
62 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, \ in genregs_set()
67 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, \ in genregs_set()
83 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, in genregs_set()
/arch/x86/kernel/fpu/
Dregset.c92 const void *kbuf, const void __user *ubuf) in xfpregs_set() argument
105 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &newstate, 0, -1); in xfpregs_set()
144 const void *kbuf, const void __user *ubuf) in xstateregs_set() argument
164 if (copy_from_user(tmpbuf, ubuf, count)) { in xstateregs_set()
214 const void *kbuf, const void __user *ubuf) in ssp_set() argument
229 r = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &user_ssp, 0, -1); in ssp_set()
433 const void *kbuf, const void __user *ubuf) in fpregs_set() argument
444 return fpregs_soft_set(target, regset, pos, count, kbuf, ubuf); in fpregs_set()
446 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &env, 0, -1); in fpregs_set()
/arch/mips/kernel/
Dptrace.c231 const void *kbuf, const void __user *ubuf) in gpr32_set() argument
244 err = user_regset_copyin(&pos, &count, &kbuf, &ubuf, uregs, 0, in gpr32_set()
296 const void *kbuf, const void __user *ubuf) in gpr64_set() argument
309 err = user_regset_copyin(&pos, &count, &kbuf, &ubuf, uregs, 0, in gpr64_set()
461 const void **kbuf, const void __user **ubuf) in fpr_set_fpa() argument
463 return user_regset_copyin(pos, count, kbuf, ubuf, in fpr_set_fpa()
476 const void **kbuf, const void __user **ubuf) in fpr_set_msa() argument
484 err = user_regset_copyin(pos, count, kbuf, ubuf, in fpr_set_msa()
510 const void *kbuf, const void __user *ubuf) in fpr_set() argument
525 err = fpr_set_fpa(target, &pos, &count, &kbuf, &ubuf); in fpr_set()
[all …]
/arch/arm64/kvm/
Dhyp_trace.c343 hyp_tracing_on(struct file *filp, const char __user *ubuf, size_t cnt, loff_t *ppos) in hyp_tracing_on() argument
351 if (get_user(c, ubuf)) in hyp_tracing_on()
368 static ssize_t hyp_tracing_on_read(struct file *filp, char __user *ubuf, in hyp_tracing_on_read() argument
378 return simple_read_from_buffer(ubuf, cnt, ppos, buf, r); in hyp_tracing_on_read()
386 static ssize_t hyp_buffer_size(struct file *filp, const char __user *ubuf, in hyp_buffer_size() argument
392 ret = kstrtoul_from_user(ubuf, cnt, 10, &val); in hyp_buffer_size()
406 static ssize_t hyp_buffer_size_read(struct file *filp, char __user *ubuf, in hyp_buffer_size_read() argument
416 return simple_read_from_buffer(ubuf, cnt, ppos, buf, r); in hyp_buffer_size_read()
518 hyp_trace_pipe_read(struct file *file, char __user *ubuf, in hyp_trace_pipe_read() argument
542 ret = trace_seq_to_user(&iter->seq, ubuf, cnt); in hyp_trace_pipe_read()
[all …]
/arch/parisc/kernel/
Dptrace.c414 const void *kbuf, const void __user *ubuf) in fpr_set() argument
418 const __u64 __user *u = ubuf; in fpr_set()
435 ubuf = u; in fpr_set()
438 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, in fpr_set()
534 const void *kbuf, const void __user *ubuf) in gpr_set() argument
538 const unsigned long __user *u = ubuf; in gpr_set()
555 ubuf = u; in gpr_set()
558 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, in gpr_set()
598 const void *kbuf, const void __user *ubuf) in gpr32_set() argument
602 const compat_ulong_t __user *u = ubuf; in gpr32_set()
[all …]
/arch/powerpc/include/asm/
Dsyscalls.h94 char __user *ubuf, compat_size_t count,
97 const char __user *ubuf, compat_size_t count,
120 char __user *ubuf, compat_size_t count,
123 const char __user *ubuf, compat_size_t count,
/arch/hexagon/kernel/
Dptrace.c75 const void *kbuf, const void __user *ubuf) in genregs_set() argument
84 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs_set()
89 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, \ in genregs_set()
118 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, in genregs_set()

12