Home
last modified time | relevance | path

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

123456789

/linux-6.6.21/drivers/dma-buf/
Dudmabuf.c36 struct udmabuf *ubuf = vma->vm_private_data; in udmabuf_vm_fault() local
39 if (pgoff >= ubuf->pagecount) in udmabuf_vm_fault()
41 vmf->page = ubuf->pages[pgoff]; in udmabuf_vm_fault()
52 struct udmabuf *ubuf = buf->priv; in mmap_udmabuf() local
58 vma->vm_private_data = ubuf; in mmap_udmabuf()
64 struct udmabuf *ubuf = buf->priv; in vmap_udmabuf() local
69 vaddr = vm_map_ram(ubuf->pages, ubuf->pagecount, -1); in vmap_udmabuf()
79 struct udmabuf *ubuf = buf->priv; in vunmap_udmabuf() local
83 vm_unmap_ram(map->vaddr, ubuf->pagecount); in vunmap_udmabuf()
89 struct udmabuf *ubuf = buf->priv; in get_sg_table() local
[all …]
/linux-6.6.21/drivers/misc/sgi-gru/
Dgrukdump.c37 void __user *ubuf, int ctxnum, int dsrcnt, in gru_dump_context_data() argument
51 if (gru_user_copy_handle(&ubuf, cb)) in gru_dump_context_data()
53 if (gru_user_copy_handle(&ubuf, tfh + i * GRU_HANDLE_STRIDE)) in gru_dump_context_data()
55 if (gru_user_copy_handle(&ubuf, cbe + i * GRU_HANDLE_STRIDE)) in gru_dump_context_data()
60 memcpy(ubuf, gseg + GRU_DS_BASE, dsrcnt * GRU_HANDLE_STRIDE); in gru_dump_context_data()
68 void __user *ubuf, void __user *ubufend) in gru_dump_tfm() argument
73 if (GRU_NUM_TFM * GRU_CACHE_LINE_BYTES > ubufend - ubuf) in gru_dump_tfm()
78 if (gru_user_copy_handle(&ubuf, tfm)) in gru_dump_tfm()
88 void __user *ubuf, void __user *ubufend) in gru_dump_tgh() argument
93 if (GRU_NUM_TGH * GRU_CACHE_LINE_BYTES > ubufend - ubuf) in gru_dump_tgh()
[all …]
/linux-6.6.21/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 …]
/linux-6.6.21/kernel/bpf/
Dlog.c16 if (!!log->ubuf != !!log->len_total) in bpf_verifier_log_attr_valid()
19 if (log->ubuf && log->level == 0) in bpf_verifier_log_attr_valid()
32 log->ubuf = log_buf; in bpf_vlog_init()
86 if (log->ubuf && new_n && in bpf_verifier_vlog()
87 copy_to_user(log->ubuf + cur_pos, log->kbuf, new_n)) in bpf_verifier_vlog()
102 if (!log->ubuf) in bpf_verifier_vlog()
124 if (copy_to_user(log->ubuf + buf_start, in bpf_verifier_vlog()
130 if (copy_to_user(log->ubuf + buf_start, in bpf_verifier_vlog()
134 if (copy_to_user(log->ubuf, in bpf_verifier_vlog()
143 log->ubuf = NULL; in bpf_verifier_vlog()
[all …]
/linux-6.6.21/drivers/media/pci/saa7164/
Dsaa7164-vbi.c33 struct saa7164_user_buffer *ubuf; in saa7164_vbi_buffers_dealloc() local
47 ubuf = list_entry(p, struct saa7164_user_buffer, list); in saa7164_vbi_buffers_dealloc()
49 saa7164_buffer_dealloc_user(ubuf); in saa7164_vbi_buffers_dealloc()
54 ubuf = list_entry(l, struct saa7164_user_buffer, list); in saa7164_vbi_buffers_dealloc()
56 saa7164_buffer_dealloc_user(ubuf); in saa7164_vbi_buffers_dealloc()
70 struct saa7164_user_buffer *ubuf; in saa7164_vbi_buffers_alloc() local
124 ubuf = saa7164_buffer_alloc_user(dev, len); in saa7164_vbi_buffers_alloc()
125 if (ubuf) { in saa7164_vbi_buffers_alloc()
127 list_add_tail(&ubuf->list, &port->list_buf_free.list); in saa7164_vbi_buffers_alloc()
274 struct saa7164_user_buffer *ubuf; in saa7164_vbi_stop_streaming() local
[all …]
Dsaa7164-encoder.c64 struct saa7164_user_buffer *ubuf; in saa7164_encoder_buffers_dealloc() local
78 ubuf = list_entry(p, struct saa7164_user_buffer, list); in saa7164_encoder_buffers_dealloc()
80 saa7164_buffer_dealloc_user(ubuf); in saa7164_encoder_buffers_dealloc()
85 ubuf = list_entry(l, struct saa7164_user_buffer, list); in saa7164_encoder_buffers_dealloc()
87 saa7164_buffer_dealloc_user(ubuf); in saa7164_encoder_buffers_dealloc()
101 struct saa7164_user_buffer *ubuf; in saa7164_encoder_buffers_alloc() local
171 ubuf = saa7164_buffer_alloc_user(dev, len); in saa7164_encoder_buffers_alloc()
172 if (ubuf) { in saa7164_encoder_buffers_alloc()
174 list_add_tail(&ubuf->list, &port->list_buf_free.list); in saa7164_encoder_buffers_alloc()
590 struct saa7164_user_buffer *ubuf; in saa7164_encoder_stop_streaming() local
[all …]
/linux-6.6.21/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 …]
/linux-6.6.21/drivers/ntb/test/
Dntb_tool.c341 static ssize_t tool_fn_read(struct tool_ctx *tc, char __user *ubuf, in tool_fn_read() argument
356 return simple_read_from_buffer(ubuf, size, offp, buf, pos); in tool_fn_read()
360 const char __user *ubuf, in tool_fn_write() argument
373 buf = memdup_user_nul(ubuf, size); in tool_fn_write()
405 static ssize_t tool_port_read(struct file *filep, char __user *ubuf, in tool_port_read() argument
414 return simple_read_from_buffer(ubuf, size, offp, buf, pos); in tool_port_read()
421 static ssize_t tool_peer_port_read(struct file *filep, char __user *ubuf, in tool_peer_port_read() argument
432 return simple_read_from_buffer(ubuf, size, offp, buf, pos); in tool_peer_port_read()
462 static ssize_t tool_link_write(struct file *filep, const char __user *ubuf, in tool_link_write() argument
469 ret = kstrtobool_from_user(ubuf, size, &val); in tool_link_write()
[all …]
/linux-6.6.21/drivers/net/wireless/marvell/mwifiex/
Ddebugfs.c62 mwifiex_info_read(struct file *file, char __user *ubuf, in mwifiex_info_read() argument
136 ret = simple_read_from_buffer(ubuf, count, ppos, (char *) page, in mwifiex_info_read()
166 mwifiex_getlog_read(struct file *file, char __user *ubuf, in mwifiex_getlog_read() argument
223 ret = simple_read_from_buffer(ubuf, count, ppos, (char *) page, in mwifiex_getlog_read()
242 mwifiex_histogram_read(struct file *file, char __user *ubuf, in mwifiex_histogram_read() argument
312 ret = simple_read_from_buffer(ubuf, count, ppos, (char *)page, in mwifiex_histogram_read()
321 mwifiex_histogram_write(struct file *file, const char __user *ubuf, in mwifiex_histogram_write() argument
381 mwifiex_debug_read(struct file *file, char __user *ubuf, in mwifiex_debug_read() argument
399 ret = simple_read_from_buffer(ubuf, count, ppos, (char *) page, in mwifiex_debug_read()
418 const char __user *ubuf, size_t count, loff_t *ppos) in mwifiex_regrdwr_write() argument
[all …]
/linux-6.6.21/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 …]
/linux-6.6.21/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 …]
/linux-6.6.21/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()
/linux-6.6.21/drivers/crypto/xilinx/
Dzynqmp-sha.c44 static char *ubuf, *fbuf; variable
138 memzero_explicit(ubuf, ZYNQMP_DMA_ALLOC_FIXED_SIZE); in zynqmp_sha_digest()
146 memcpy(ubuf, data, update_size); in zynqmp_sha_digest()
147 flush_icache_range((unsigned long)ubuf, (unsigned long)ubuf + update_size); in zynqmp_sha_digest()
218 ubuf = dma_alloc_coherent(dev, ZYNQMP_DMA_ALLOC_FIXED_SIZE, &update_dma_addr, GFP_KERNEL); in zynqmp_sha_probe()
219 if (!ubuf) { in zynqmp_sha_probe()
233 dma_free_coherent(sha3_drv_ctx.dev, ZYNQMP_DMA_ALLOC_FIXED_SIZE, ubuf, update_dma_addr); in zynqmp_sha_probe()
245 dma_free_coherent(sha3_drv_ctx.dev, ZYNQMP_DMA_ALLOC_FIXED_SIZE, ubuf, update_dma_addr); in zynqmp_sha_remove()
/linux-6.6.21/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 …]
/linux-6.6.21/arch/arm64/kernel/
Dptrace.c508 const void *kbuf, const void __user *ubuf) in hw_break_set() argument
517 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 0, offset); in hw_break_set()
524 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &addr, in hw_break_set()
535 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &ctrl, in hw_break_set()
544 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, in hw_break_set()
564 const void *kbuf, const void __user *ubuf) in gpr_set() argument
569 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &newregs, 0, -1); in gpr_set()
618 const void *kbuf, const void __user *ubuf, in __fpr_set() argument
632 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &newstate, in __fpr_set()
644 const void *kbuf, const void __user *ubuf) in fpr_set() argument
[all …]
/linux-6.6.21/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()
/linux-6.6.21/drivers/scsi/fnic/
Dfnic_debugfs.c99 char __user *ubuf, in fnic_trace_ctrl_read() argument
116 return simple_read_from_buffer(ubuf, cnt, ppos, buf, len); in fnic_trace_ctrl_read()
137 const char __user *ubuf, in fnic_trace_ctrl_write() argument
149 if (copy_from_user(&buf, ubuf, cnt)) in fnic_trace_ctrl_write()
271 char __user *ubuf, in fnic_trace_debugfs_read() argument
277 rc = simple_read_from_buffer(ubuf, nbytes, pos, in fnic_trace_debugfs_read()
463 char __user *ubuf, in fnic_reset_stats_read() argument
473 return simple_read_from_buffer(ubuf, cnt, ppos, buf, len); in fnic_reset_stats_read()
491 const char __user *ubuf, in fnic_reset_stats_write() argument
506 if (copy_from_user(&buf, ubuf, cnt)) in fnic_reset_stats_write()
[all …]
/linux-6.6.21/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()
121 const void *kbuf, const void __user *ubuf) in riscv_vr_set() argument
131 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &ptrace_vstate, 0, in riscv_vr_set()
146 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, vstate->datap, in riscv_vr_set()
324 const void *kbuf, const void __user *ubuf) in compat_riscv_gpr_set() argument
329 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &cregs, 0, -1); in compat_riscv_gpr_set()
/linux-6.6.21/drivers/gpu/drm/i915/
Di915_debugfs_params.c50 const char __user *ubuf, size_t len, in i915_param_int_write() argument
57 ret = kstrtoint_from_user(ubuf, len, 0, value); in i915_param_int_write()
62 ret = kstrtobool_from_user(ubuf, len, &b); in i915_param_int_write()
103 const char __user *ubuf, size_t len, in i915_param_uint_write() argument
112 ret = kstrtouint_from_user(ubuf, len, 0, value); in i915_param_uint_write()
117 ret = kstrtobool_from_user(ubuf, len, &b); in i915_param_uint_write()
166 const char __user *ubuf, size_t len, in i915_param_charp_write() argument
174 new = strndup_user(ubuf, PAGE_SIZE); in i915_param_charp_write()
/linux-6.6.21/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()
/linux-6.6.21/include/linux/
Dregset.h120 const void *kbuf, const void __user *ubuf);
255 const void __user **ubuf, void *data, in user_regset_copyin() argument
268 } else if (__copy_from_user(data, *ubuf, copy)) in user_regset_copyin()
271 *ubuf += copy; in user_regset_copyin()
281 const void __user **ubuf, in user_regset_copyin_ignore() argument
294 *ubuf += copy; in user_regset_copyin_ignore()
/linux-6.6.21/drivers/s390/char/
Dhmcdrv_dev.c59 static ssize_t hmcdrv_dev_read(struct file *fp, char __user *ubuf,
61 static ssize_t hmcdrv_dev_write(struct file *fp, const char __user *ubuf,
221 static ssize_t hmcdrv_dev_read(struct file *fp, char __user *ubuf, in hmcdrv_dev_read() argument
232 *pos, ubuf, len); in hmcdrv_dev_read()
246 static ssize_t hmcdrv_dev_write(struct file *fp, const char __user *ubuf, in hmcdrv_dev_write() argument
260 if (!copy_from_user(fp->private_data, ubuf, len)) { in hmcdrv_dev_write()
271 *pos, (char __user *) ubuf, len); in hmcdrv_dev_write()

123456789