/linux/lib/mpi/ |
A D | mpi-add.c | 26 usize = u->nlimbs; in mpi_add_ui() 31 wsize = usize + 1; in mpi_add_ui() 45 wp[usize] = cy; in mpi_add_ui() 57 wsize = usize - (wp[usize-1] == 0); in mpi_add_ui() 74 usize = v->nlimbs; in mpi_add() 78 wsize = usize + 1; in mpi_add() 99 wsize = usize; in mpi_add() 105 wsize = usize; in mpi_add() 110 wsize = usize; in mpi_add() 116 wsize = usize; in mpi_add() [all …]
|
A D | mpi-cmp.c | 46 mpi_size_t usize; in do_mpi_cmp() local 55 usize = u->nlimbs; in do_mpi_cmp() 69 if (usize != vsize && !usign && !vsign) in do_mpi_cmp() 70 return usize - vsize; in do_mpi_cmp() 71 if (usize != vsize && usign && vsign) in do_mpi_cmp() 72 return vsize + usize; in do_mpi_cmp() 73 if (!usize) in do_mpi_cmp() 75 cmp = mpihelp_cmp(u->d, v->d, usize); in do_mpi_cmp()
|
A D | mpih-mul.c | 366 usize -= vsize; in mpihelp_mul_karatsuba_case() 367 if (usize >= vsize) { in mpihelp_mul_karatsuba_case() 388 usize -= vsize; in mpihelp_mul_karatsuba_case() 389 } while (usize >= vsize); in mpihelp_mul_karatsuba_case() 392 if (usize) { in mpihelp_mul_karatsuba_case() 406 up, usize, in mpihelp_mul_karatsuba_case() 473 MPN_COPY(prodp, up, usize); in mpihelp_mul() 475 MPN_ZERO(prodp, usize); in mpihelp_mul() 480 prodp[usize] = cy; in mpihelp_mul() 491 usize); in mpihelp_mul() [all …]
|
A D | mpi-mul.c | 18 mpi_size_t usize, vsize, wsize; in mpi_mul() local 27 usize = v->nlimbs; in mpi_mul() 34 usize = u->nlimbs; in mpi_mul() 45 wsize = usize + vsize; in mpi_mul() 57 up = tmp_limb = mpi_alloc_limb_space(usize); in mpi_mul() 62 MPN_COPY(up, wp, usize); in mpi_mul() 74 mpihelp_mul(wp, up, usize, vp, vsize, &cy); in mpi_mul()
|
A D | generic_mpih-lshift.c | 28 mpihelp_lshift(mpi_ptr_t wp, mpi_ptr_t up, mpi_size_t usize, unsigned int cnt) in mpihelp_lshift() argument 38 i = usize - 1; in mpihelp_lshift()
|
A D | generic_mpih-rshift.c | 29 mpihelp_rshift(mpi_ptr_t wp, mpi_ptr_t up, mpi_size_t usize, unsigned cnt) in mpihelp_rshift() argument 42 for (i = 1; i < usize; i++) { in mpihelp_rshift()
|
A D | mpi-internal.h | 179 int mpihelp_mul(mpi_ptr_t prodp, mpi_ptr_t up, mpi_size_t usize, 188 mpi_ptr_t up, mpi_size_t usize, 207 mpi_limb_t mpihelp_lshift(mpi_ptr_t wp, mpi_ptr_t up, mpi_size_t usize, 209 mpi_limb_t mpihelp_rshift(mpi_ptr_t wp, mpi_ptr_t up, mpi_size_t usize,
|
A D | mpiutil.c | 253 mpi_size_t usize = u->nlimbs; in mpi_set() local 258 RESIZE_IF_NEEDED(w, usize); in mpi_set() 261 MPN_COPY(wp, up, usize); in mpi_set() 262 w->nlimbs = usize; in mpi_set()
|
/linux/drivers/acpi/apei/ |
A D | erst-dbg.c | 83 size_t usize, loff_t *off) in erst_dbg_read() argument 139 if (len > usize) in erst_dbg_read() 152 size_t usize, loff_t *off) in erst_dbg_write() argument 160 if (usize > ERST_DBG_RECORD_LEN_MAX) { in erst_dbg_write() 167 if (usize > erst_dbg_buf_len) { in erst_dbg_write() 170 p = kmalloc(usize, GFP_KERNEL); in erst_dbg_write() 175 erst_dbg_buf_len = usize; in erst_dbg_write() 177 rc = copy_from_user(erst_dbg_buf, ubuf, usize); in erst_dbg_write() 184 if (rcd->record_length != usize) in erst_dbg_write() 191 return rc < 0 ? rc : usize; in erst_dbg_write()
|
/linux/lib/ |
A D | test_user_copy.c | 110 size_t ksize, usize; in test_copy_struct_from_user() local 129 usize = size; in test_copy_struct_from_user() 134 ret |= test(copy_struct_from_user(kmem, ksize, umem, usize), in test_copy_struct_from_user() 141 usize = size / 2; in test_copy_struct_from_user() 143 memcpy(expected, umem_src, usize); in test_copy_struct_from_user() 144 memset(expected + usize, 0x0, ksize - usize); in test_copy_struct_from_user() 147 ret |= test(copy_struct_from_user(kmem, ksize, umem, usize), in test_copy_struct_from_user() 154 usize = size; in test_copy_struct_from_user() 162 usize = size; in test_copy_struct_from_user() 165 ret |= test(clear_user(umem + ksize, usize - ksize), in test_copy_struct_from_user() [all …]
|
/linux/tools/testing/selftests/bpf/progs/ |
A D | test_get_stack_rawtp.c | 62 long usize, ksize; in bpf_prog1() local 87 usize = bpf_get_stack(ctx, raw_data, max_len, BPF_F_USER_STACK); in bpf_prog1() 88 if (usize < 0) in bpf_prog1() 91 ksize = bpf_get_stack(ctx, raw_data + usize, max_len - usize, 0); in bpf_prog1() 95 total_size = usize + ksize; in bpf_prog1()
|
/linux/arch/x86/kernel/cpu/mce/ |
A D | dev-mcelog.c | 163 static int __mce_read_apei(char __user **ubuf, size_t usize) in __mce_read_apei() argument 169 if (usize < sizeof(struct mce)) in __mce_read_apei() 204 size_t usize, loff_t *off) in mce_chrdev_read() argument 213 err = __mce_read_apei(&buf, usize); in mce_chrdev_read() 220 if (*off != 0 || usize < mcelog->len * sizeof(struct mce)) in mce_chrdev_read() 295 size_t usize, loff_t *off) in mce_chrdev_write() argument 308 if ((unsigned long)usize > sizeof(struct mce)) in mce_chrdev_write() 309 usize = sizeof(struct mce); in mce_chrdev_write() 310 if (copy_from_user(&m, ubuf, usize)) in mce_chrdev_write() 324 return usize; in mce_chrdev_write()
|
/linux/include/linux/ |
A D | uaccess.h | 336 size_t usize) in copy_struct_from_user() argument 338 size_t size = min(ksize, usize); in copy_struct_from_user() 339 size_t rest = max(ksize, usize) - size; in copy_struct_from_user() 342 if (usize < ksize) { in copy_struct_from_user() 344 } else if (usize > ksize) { in copy_struct_from_user()
|
/linux/security/landlock/ |
A D | syscalls.c | 48 const void __user *const src, const size_t usize) in copy_min_struct_from_user() argument 58 if (usize < ksize_min) in copy_min_struct_from_user() 60 if (usize > PAGE_SIZE) in copy_min_struct_from_user() 64 return copy_struct_from_user(dst, ksize, src, usize); in copy_min_struct_from_user()
|
/linux/arch/x86/kernel/fpu/ |
A D | xstate.c | 1540 unsigned int usize) in fpstate_realloc() argument 1553 newfps->user_size = usize; in fpstate_realloc() 1581 static int validate_sigaltstack(unsigned int usize) in validate_sigaltstack() argument 1590 framesize += usize; in validate_sigaltstack() 1608 unsigned int ksize, usize; in __xstate_request_perm() local 1622 usize = xstate_calculate_size(mask, false); in __xstate_request_perm() 1624 ret = validate_sigaltstack(usize); in __xstate_request_perm() 1632 fpu->perm.__user_state_size = usize; in __xstate_request_perm() 1679 unsigned int ksize, usize; in xfd_enable_feature() local 1698 usize = fpu->perm.__user_state_size; in xfd_enable_feature() [all …]
|
/linux/drivers/pci/pcie/ |
A D | aer_inject.c | 487 size_t usize, loff_t *off) in aer_inject_write() argument 494 if (usize < offsetof(struct aer_error_inj, domain) || in aer_inject_write() 495 usize > sizeof(einj)) in aer_inject_write() 499 if (copy_from_user(&einj, ubuf, usize)) in aer_inject_write() 503 return ret ? ret : usize; in aer_inject_write()
|
/linux/tools/perf/util/ |
A D | jitdump.c | 441 int ret, csize, usize; in jit_repipe_code_load() local 452 usize = jd->unwinding_mapped_size; in jit_repipe_code_load() 502 event->mmap2.len = usize ? ALIGN_8(csize) + usize : csize; in jit_repipe_code_load() 553 int usize; in jit_repipe_code_move() local 565 usize = jd->unwinding_mapped_size; in jit_repipe_code_move() 594 event->mmap2.len = usize ? ALIGN_8(jr->move.code_size) + usize in jit_repipe_code_move()
|
/linux/drivers/misc/habanalabs/common/ |
A D | habanalabs_ioctl.c | 656 unsigned int usize, asize; in _hl_ioctl() local 677 usize = asize = _IOC_SIZE(cmd); in _hl_ioctl() 696 if (copy_from_user(kdata, (void __user *)arg, usize)) { in _hl_ioctl() 701 memset(kdata, 0, usize); in _hl_ioctl() 706 if ((cmd & IOC_OUT) && copy_to_user((void __user *)arg, kdata, usize)) in _hl_ioctl()
|
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ |
A D | ramgf100.c | 501 u64 total = 0, lcomm = ~0, lower, ubase, usize; in gf100_ram_ctor() local 520 usize = total - lower; in gf100_ram_ctor() 523 nvkm_debug(subdev, "Upper: %4lld MiB @ %010llx\n", usize >> 20, ubase); in gf100_ram_ctor() 550 (usize - rsvd_tail) >> NVKM_RAM_MM_SHIFT, 1); in gf100_ram_ctor()
|
/linux/drivers/xen/ |
A D | mcelog.c | 107 size_t usize, loff_t *off) in xen_mce_chrdev_read() argument 119 if (*off != 0 || usize < XEN_MCE_LOG_LEN*sizeof(struct xen_mce)) in xen_mce_chrdev_read()
|
/linux/arch/parisc/kernel/ |
A D | cache.c | 521 unsigned long usize = 0; in mm_total_size() local 524 usize += vma->vm_end - vma->vm_start; in mm_total_size() 525 return usize; in mm_total_size()
|
/linux/drivers/gpu/drm/amd/amdkfd/ |
A D | kfd_chardev.c | 1974 unsigned int usize, asize; in kfd_ioctl() local 1986 usize = asize = _IOC_SIZE(cmd); in kfd_ioctl() 2026 if (asize > usize) in kfd_ioctl() 2027 memset(kdata + usize, 0, asize - usize); in kfd_ioctl() 2031 if (copy_from_user(kdata, (void __user *)arg, usize) != 0) { in kfd_ioctl() 2036 memset(kdata, 0, usize); in kfd_ioctl() 2042 if (copy_to_user((void __user *)arg, kdata, usize) != 0) in kfd_ioctl()
|
/linux/fs/fat/ |
A D | namei_vfat.c | 593 int err, ulen, usize, i; in vfat_build_slots() local 602 err = xlate_to_uni(name, len, (unsigned char *)uname, &ulen, &usize, in vfat_build_slots() 624 *nr_slots = usize / 13; in vfat_build_slots()
|
/linux/fs/ |
A D | open.c | 1248 struct open_how __user *, how, size_t, usize) in SYSCALL_DEFINE4() argument 1256 if (unlikely(usize < OPEN_HOW_SIZE_VER0)) in SYSCALL_DEFINE4() 1259 err = copy_struct_from_user(&tmp, sizeof(tmp), how, usize); in SYSCALL_DEFINE4()
|
A D | namespace.c | 4098 static int build_mount_idmapped(const struct mount_attr *attr, size_t usize, in build_mount_idmapped() argument 4153 static int build_mount_kattr(const struct mount_attr *attr, size_t usize, in build_mount_kattr() argument 4217 return build_mount_idmapped(attr, usize, kattr, flags); in build_mount_kattr() 4228 size_t, usize) in SYSCALL_DEFINE5() argument 4243 if (unlikely(usize > PAGE_SIZE)) in SYSCALL_DEFINE5() 4245 if (unlikely(usize < MOUNT_ATTR_SIZE_VER0)) in SYSCALL_DEFINE5() 4251 err = copy_struct_from_user(&attr, sizeof(attr), uattr, usize); in SYSCALL_DEFINE5() 4261 err = build_mount_kattr(&attr, usize, &kattr, flags); in SYSCALL_DEFINE5()
|