Home
last modified time | relevance | path

Searched refs:usize (Results 1 – 25 of 47) sorted by relevance

12

/Linux-v6.1/lib/mpi/
Dmpi-add.c23 mpi_size_t usize, wsize; in mpi_add_ui() local
26 usize = u->nlimbs; in mpi_add_ui()
31 wsize = usize + 1; in mpi_add_ui()
39 if (!usize) { /* simple */ in mpi_add_ui()
44 cy = mpihelp_add_1(wp, up, usize, v); in mpi_add_ui()
45 wp[usize] = cy; in mpi_add_ui()
46 wsize = usize + cy; in mpi_add_ui()
51 if (usize == 1 && up[0] < v) { in mpi_add_ui()
55 mpihelp_sub_1(wp, up, usize, v); in mpi_add_ui()
57 wsize = usize - (wp[usize-1] == 0); in mpi_add_ui()
[all …]
Dmpi-cmp.c46 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()
Dmpih-mul.c347 mpi_ptr_t up, mpi_size_t usize, in mpihelp_mul_karatsuba_case() argument
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()
393 if (usize < KARATSUBA_THRESHOLD) { in mpihelp_mul_karatsuba_case()
395 if (mpihelp_mul(ctx->tspace, vp, vsize, up, usize, &tmp) in mpihelp_mul_karatsuba_case()
406 up, usize, in mpihelp_mul_karatsuba_case()
412 mpihelp_add_1(prodp + vsize, ctx->tspace + vsize, usize, cy); in mpihelp_mul_karatsuba_case()
[all …]
Dmpi-mul.c18 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()
Dgeneric_mpih-lshift.c28 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()
Dgeneric_mpih-rshift.c29 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()
Dmpi-internal.h179 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,
Dmpiutil.c253 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-v6.1/rust/alloc/
Draw_vec.rs56 cap: usize,
94 pub fn with_capacity(capacity: usize) -> Self { in with_capacity()
102 pub fn with_capacity_zeroed(capacity: usize) -> Self { in with_capacity_zeroed()
113 pub(crate) const MIN_NON_ZERO_CAP: usize = if mem::size_of::<T>() == 1 {
132 pub fn with_capacity_in(capacity: usize, alloc: A) -> Self { in with_capacity_in() argument
140 pub fn with_capacity_zeroed_in(capacity: usize, alloc: A) -> Self { in with_capacity_zeroed_in() argument
156 pub unsafe fn into_box(self, len: usize) -> Box<[MaybeUninit<T>], A> { in into_box()
171 fn allocate_in(capacity: usize, init: AllocInit, alloc: A) -> Self { in allocate_in() argument
217 pub unsafe fn from_raw_parts_in(ptr: *mut T, capacity: usize, alloc: A) -> Self { in from_raw_parts_in() argument
233 pub fn capacity(&self) -> usize { in capacity() argument
[all …]
Dalloc.rs34 fn __rust_alloc(size: usize, align: usize) -> *mut u8; in __rust_alloc() argument
36 fn __rust_dealloc(ptr: *mut u8, size: usize, align: usize); in __rust_dealloc() argument
38 fn __rust_realloc(ptr: *mut u8, old_size: usize, align: usize, new_size: usize) -> *mut u8; in __rust_realloc() argument
40 fn __rust_alloc_zeroed(size: usize, align: usize) -> *mut u8; in __rust_alloc_zeroed() argument
127 pub unsafe fn realloc(ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 { in realloc()
320 unsafe fn exchange_malloc(size: usize, align: usize) -> *mut u8 { in exchange_malloc() argument
355 fn __rust_alloc_error_handler(size: usize, align: usize) -> !; in __rust_alloc_error_handler() argument
403 pub unsafe extern "C-unwind" fn __rdl_oom(size: usize, _align: usize) -> ! { in __rdl_oom() argument
409 pub unsafe extern "C-unwind" fn __rg_oom(size: usize, align: usize) -> ! { in __rg_oom() argument
Dslice.rs194 num_init: usize, in to_vec()
435 while (index as usize) < i { in sort_by_cached_key()
436 index = indices[index as usize].1; in sort_by_cached_key()
439 $slice.swap(i, index as usize); in sort_by_cached_key()
447 let sz_usize = mem::size_of::<(K, usize)>(); in sort_by_cached_key()
453 if sz_u8 < sz_u16 && len <= (u8::MAX as usize) { in sort_by_cached_key()
456 if sz_u16 < sz_u32 && len <= (u16::MAX as usize) { in sort_by_cached_key()
459 if sz_u32 < sz_usize && len <= (u32::MAX as usize) { in sort_by_cached_key()
462 sort_by_key!(usize, self, f) in sort_by_cached_key()
556 pub fn repeat(&self, n: usize) -> Vec<T> in repeat()
[all …]
Dboxed.rs616 pub fn new_uninit_slice(len: usize) -> Box<[mem::MaybeUninit<T>]> { in new_uninit_slice()
641 pub fn new_zeroed_slice(len: usize) -> Box<[mem::MaybeUninit<T>]> { in new_zeroed_slice()
667 pub fn try_new_uninit_slice(len: usize) -> Result<Box<[mem::MaybeUninit<T>]>, AllocError> { in try_new_uninit_slice()
699 pub fn try_new_zeroed_slice(len: usize) -> Result<Box<[mem::MaybeUninit<T>]>, AllocError> { in try_new_zeroed_slice()
738 pub fn new_uninit_slice_in(len: usize, alloc: A) -> Box<[mem::MaybeUninit<T>], A> { in new_uninit_slice_in() argument
766 pub fn new_zeroed_slice_in(len: usize, alloc: A) -> Box<[mem::MaybeUninit<T>], A> { in new_zeroed_slice_in() argument
1355 fn write_usize(&mut self, i: usize) { in write_usize() argument
1376 fn write_length_prefix(&mut self, len: usize) { in write_length_prefix() argument
1545 impl<T, const N: usize> From<[T; N]> for Box<[T]> {
1562 impl<T, const N: usize> TryFrom<Box<[T]>> for Box<[T; N]> {
[all …]
/Linux-v6.1/rust/kernel/
Dallocator.rs35 fn __rust_alloc(size: usize, _align: usize) -> *mut u8 { in __rust_alloc() argument
40 fn __rust_dealloc(ptr: *mut u8, _size: usize, _align: usize) { in __rust_dealloc() argument
45 fn __rust_realloc(ptr: *mut u8, _old_size: usize, _align: usize, new_size: usize) -> *mut u8 { in __rust_realloc() argument
56 fn __rust_alloc_zeroed(size: usize, _align: usize) -> *mut u8 { in __rust_alloc_zeroed() argument
Dstr.rs19 beg: usize,
20 pos: usize,
21 end: usize,
/Linux-v6.1/rust/alloc/vec/
Dmod.rs404 len: usize,
471 pub fn with_capacity(capacity: usize) -> Self { in with_capacity()
545 pub unsafe fn from_raw_parts(ptr: *mut T, length: usize, capacity: usize) -> Self { in from_raw_parts() argument
616 pub fn with_capacity_in(capacity: usize, alloc: A) -> Self { in with_capacity_in() argument
692 pub unsafe fn from_raw_parts_in(ptr: *mut T, length: usize, capacity: usize, alloc: A) -> Self { in from_raw_parts_in() argument
729 pub fn into_raw_parts(self) -> (*mut T, usize, usize) { in into_raw_parts() argument
773 pub fn into_raw_parts_with_alloc(self) -> (*mut T, usize, usize, A) { in into_raw_parts_with_alloc() argument
793 pub fn capacity(&self) -> usize { in capacity() argument
816 pub fn reserve(&mut self, additional: usize) { in reserve() argument
844 pub fn reserve_exact(&mut self, additional: usize) { in reserve_exact() argument
[all …]
Dinto_iter.rs38 pub(super) cap: usize,
172 fn size_hint(&self) -> (usize, Option<usize>) { in size_hint() argument
182 fn advance_by(&mut self, n: usize) -> Result<(), usize> { in advance_by() argument
205 fn count(self) -> usize { in count() argument
209 unsafe fn __iterator_get_unchecked(&mut self, i: usize) -> Self::Item in __iterator_get_unchecked()
247 fn advance_back_by(&mut self, n: usize) -> Result<(), usize> { in advance_back_by() argument
Ddrain_filter.rs34 pub(super) idx: usize,
36 pub(super) del: usize,
38 pub(super) old_len: usize,
94 fn size_hint(&self) -> (usize, Option<usize>) { in size_hint() argument
Ddrain.rs30 pub(super) tail_start: usize,
32 pub(super) tail_len: usize,
93 fn size_hint(&self) -> (usize, Option<usize>) { in size_hint() argument
/Linux-v6.1/drivers/acpi/apei/
Derst-dbg.c83 size_t usize, loff_t *off) in erst_dbg_read() argument
140 if (len > usize) in erst_dbg_read()
153 size_t usize, loff_t *off) in erst_dbg_write() argument
161 if (usize > ERST_DBG_RECORD_LEN_MAX) { in erst_dbg_write()
168 if (usize > erst_dbg_buf_len) { in erst_dbg_write()
171 p = kmalloc(usize, GFP_KERNEL); in erst_dbg_write()
176 erst_dbg_buf_len = usize; in erst_dbg_write()
178 rc = copy_from_user(erst_dbg_buf, ubuf, usize); in erst_dbg_write()
185 if (rcd->record_length != usize) in erst_dbg_write()
192 return rc < 0 ? rc : usize; in erst_dbg_write()
/Linux-v6.1/lib/
Dtest_user_copy.c110 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()
157 ret |= test(copy_struct_from_user(kmem, ksize, umem, usize) != -E2BIG, in test_copy_struct_from_user()
162 usize = size; in test_copy_struct_from_user()
[all …]
/Linux-v6.1/tools/testing/selftests/bpf/progs/
Dtest_get_stack_rawtp.c62 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-v6.1/arch/x86/kernel/cpu/mce/
Ddev-mcelog.c163 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-v6.1/include/linux/
Duaccess.h327 size_t usize) in copy_struct_from_user() argument
329 size_t size = min(ksize, usize); in copy_struct_from_user()
330 size_t rest = max(ksize, usize) - size; in copy_struct_from_user()
333 if (usize < ksize) { in copy_struct_from_user()
335 } else if (usize > ksize) { in copy_struct_from_user()
/Linux-v6.1/security/landlock/
Dsyscalls.c49 const size_t usize) in copy_min_struct_from_user() argument
59 if (usize < ksize_min) in copy_min_struct_from_user()
61 if (usize > PAGE_SIZE) in copy_min_struct_from_user()
65 return copy_struct_from_user(dst, ksize, src, usize); in copy_min_struct_from_user()
/Linux-v6.1/arch/x86/kernel/fpu/
Dxstate.c1453 unsigned int usize, struct fpu_guest *guest_fpu) in fpstate_realloc() argument
1466 newfps->user_size = usize; in fpstate_realloc()
1483 guest_fpu->uabi_size = usize; in fpstate_realloc()
1525 static int validate_sigaltstack(unsigned int usize) in validate_sigaltstack() argument
1534 framesize += usize; in validate_sigaltstack()
1553 unsigned int ksize, usize; in __xstate_request_perm() local
1570 usize = xstate_calculate_size(mask, false); in __xstate_request_perm()
1573 ret = validate_sigaltstack(usize); in __xstate_request_perm()
1583 perm->__user_state_size = usize; in __xstate_request_perm()
1636 unsigned int ksize, usize; in __xfd_enable_feature() local
[all …]

12