/linux-6.6.21/lib/crypto/mpi/ |
D | mpi-add.c | 23 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 …]
|
D | mpi-cmp.c | 50 mpi_size_t usize; in do_mpi_cmp() local 59 usize = u->nlimbs; in do_mpi_cmp() 73 if (usize != vsize && !usign && !vsign) in do_mpi_cmp() 74 return usize - vsize; in do_mpi_cmp() 75 if (usize != vsize && usign && vsign) in do_mpi_cmp() 76 return vsize + usize; in do_mpi_cmp() 77 if (!usize) in do_mpi_cmp() 79 cmp = mpihelp_cmp(u->d, v->d, usize); in do_mpi_cmp()
|
D | mpih-mul.c | 347 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 …]
|
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()
|
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()
|
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()
|
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,
|
/linux-6.6.21/rust/alloc/ |
D | raw_vec.rs | 55 cap: usize, 93 pub fn with_capacity(capacity: usize) -> Self { in with_capacity() 101 pub fn with_capacity_zeroed(capacity: usize) -> Self { in with_capacity_zeroed() 112 pub(crate) const MIN_NON_ZERO_CAP: usize = if mem::size_of::<T>() == 1 { 131 pub fn with_capacity_in(capacity: usize, alloc: A) -> Self { in with_capacity_in() argument 138 pub fn try_with_capacity_in(capacity: usize, alloc: A) -> Result<Self, TryReserveError> { in try_with_capacity_in() argument 146 pub fn with_capacity_zeroed_in(capacity: usize, alloc: A) -> Self { in with_capacity_zeroed_in() argument 162 pub unsafe fn into_box(self, len: usize) -> Box<[MaybeUninit<T>], A> { in into_box() 177 fn allocate_in(capacity: usize, init: AllocInit, alloc: A) -> Self { in allocate_in() argument 212 … fn try_allocate_in(capacity: usize, init: AllocInit, alloc: A) -> Result<Self, TryReserveError> { in try_allocate_in() argument [all …]
|
D | alloc.rs | 30 fn __rust_alloc(size: usize, align: usize) -> *mut u8; in __rust_alloc() argument 33 fn __rust_dealloc(ptr: *mut u8, size: usize, align: usize); in __rust_dealloc() argument 36 fn __rust_realloc(ptr: *mut u8, old_size: usize, align: usize, new_size: usize) -> *mut u8; in __rust_realloc() argument 39 fn __rust_alloc_zeroed(size: usize, align: usize) -> *mut u8; in __rust_alloc_zeroed() argument 137 pub unsafe fn realloc(ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 { in realloc() 330 unsafe fn exchange_malloc(size: usize, align: usize) -> *mut u8 { in exchange_malloc() argument 345 fn __rust_alloc_error_handler(size: usize, align: usize) -> !; in __rust_alloc_error_handler() argument 390 pub unsafe fn __rdl_oom(size: usize, _align: usize) -> ! { in __rdl_oom() argument
|
D | slice.rs | 129 num_init: usize, in to_vec() 370 while (index as usize) < i { in sort_by_cached_key() 371 index = indices[index as usize].1; in sort_by_cached_key() 374 $slice.swap(i, index as usize); in sort_by_cached_key() 382 let sz_usize = mem::size_of::<(K, usize)>(); in sort_by_cached_key() 388 if sz_u8 < sz_u16 && len <= (u8::MAX as usize) { in sort_by_cached_key() 391 if sz_u16 < sz_u32 && len <= (u16::MAX as usize) { in sort_by_cached_key() 394 if sz_u32 < sz_usize && len <= (u32::MAX as usize) { in sort_by_cached_key() 397 sort_by_key!(usize, self, f) in sort_by_cached_key() 491 pub fn repeat(&self, n: usize) -> Vec<T> in repeat() [all …]
|
D | boxed.rs | 638 pub fn new_uninit_slice(len: usize) -> Box<[mem::MaybeUninit<T>]> { in new_uninit_slice() 663 pub fn new_zeroed_slice(len: usize) -> Box<[mem::MaybeUninit<T>]> { in new_zeroed_slice() 689 pub fn try_new_uninit_slice(len: usize) -> Result<Box<[mem::MaybeUninit<T>]>, AllocError> { in try_new_uninit_slice() 723 pub fn try_new_zeroed_slice(len: usize) -> Result<Box<[mem::MaybeUninit<T>]>, AllocError> { in try_new_zeroed_slice() 764 pub fn new_uninit_slice_in(len: usize, alloc: A) -> Box<[mem::MaybeUninit<T>], A> { in new_uninit_slice_in() argument 792 pub fn new_zeroed_slice_in(len: usize, alloc: A) -> Box<[mem::MaybeUninit<T>], A> { in new_zeroed_slice_in() argument 1413 fn write_usize(&mut self, i: usize) { in write_usize() argument 1434 fn write_length_prefix(&mut self, len: usize) { in write_length_prefix() argument 1633 impl<T, const N: usize> From<[T; N]> for Box<[T]> { 1654 unsafe fn boxed_slice_as_array_unchecked<T, A: Allocator, const N: usize>( in boxed_slice_as_array_unchecked() [all …]
|
/linux-6.6.21/rust/alloc/vec/ |
D | mod.rs | 401 len: usize, 481 pub fn with_capacity(capacity: usize) -> Self { in with_capacity() 536 pub fn try_with_capacity(capacity: usize) -> Result<Self, TryReserveError> { in try_with_capacity() 643 pub unsafe fn from_raw_parts(ptr: *mut T, length: usize, capacity: usize) -> Self { in from_raw_parts() argument 727 pub fn with_capacity_in(capacity: usize, alloc: A) -> Self { in with_capacity_in() argument 787 pub fn try_with_capacity_in(capacity: usize, alloc: A) -> Result<Self, TryReserveError> { in try_with_capacity_in() argument 901 pub unsafe fn from_raw_parts_in(ptr: *mut T, length: usize, capacity: usize, alloc: A) -> Self { in from_raw_parts_in() argument 938 pub fn into_raw_parts(self) -> (*mut T, usize, usize) { in into_raw_parts() argument 982 pub fn into_raw_parts_with_alloc(self) -> (*mut T, usize, usize, A) { in into_raw_parts_with_alloc() argument 1003 pub fn capacity(&self) -> usize { in capacity() argument [all …]
|
D | set_len_on_drop.rs | 9 len: &'a mut usize, 10 local_len: usize, 15 pub(super) fn new(len: &'a mut usize) -> Self { in new() 20 pub(super) fn increment_len(&mut self, increment: usize) { in increment_len() argument 25 pub(super) fn current_len(&self) -> usize { in current_len() argument
|
D | extract_if.rs | 35 pub(super) idx: usize, 37 pub(super) del: usize, 39 pub(super) old_len: usize, 87 fn size_hint(&self) -> (usize, Option<usize>) { in size_hint() argument
|
D | into_iter.rs | 41 pub(super) cap: usize, 209 fn size_hint(&self) -> (usize, Option<usize>) { in size_hint() argument 219 fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { in advance_by() 237 fn count(self) -> usize { in count() argument 242 fn next_chunk<const N: usize>(&mut self) -> Result<[T; N], core::array::IntoIter<T, N>> { in next_chunk() 278 unsafe fn __iterator_get_unchecked(&mut self, i: usize) -> Self::Item in __iterator_get_unchecked() 316 fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { in advance_back_by()
|
D | drain.rs | 30 pub(super) tail_start: usize, 32 pub(super) tail_len: usize, 162 fn size_hint(&self) -> (usize, Option<usize>) { in size_hint() argument
|
D | is_zero.rs | 37 impl_is_zero!(usize, |x| x == 0); 59 unsafe impl<T: IsZero, const N: usize> IsZero for [T; N] { 168 impl_is_zero_option_of_num!(u8, u16, u32, u64, u128, i8, i16, i32, i64, i128, usize, isize,);
|
/linux-6.6.21/drivers/acpi/apei/ |
D | erst-dbg.c | 83 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-6.6.21/rust/kernel/ |
D | str.rs | 68 pub const fn len(&self) -> usize { in len() argument 74 pub const fn len_with_nul(&self) -> usize { in len_with_nul() argument 287 impl Index<ops::RangeFrom<usize>> for CStr { 291 fn index(&self, index: ops::RangeFrom<usize>) -> &Self::Output { in index() 315 impl CStrIndex for usize {} implementation 316 impl CStrIndex for ops::Range<usize> {} 317 impl CStrIndex for ops::RangeInclusive<usize> {} 318 impl CStrIndex for ops::RangeToInclusive<usize> {} 397 beg: usize, 398 pos: usize, [all …]
|
D | ioctl.rs | 13 const fn _IOC(dir: u32, ty: u32, nr: u32, size: usize) -> u32 { in _IOC() 17 build_assert!(size <= (uapi::_IOC_SIZEMASK as usize)); in _IOC() 70 pub const fn _IOC_SIZE(nr: u32) -> usize { in _IOC_SIZE() argument 71 ((nr >> uapi::_IOC_SIZESHIFT) & uapi::_IOC_SIZEMASK) as usize in _IOC_SIZE()
|
/linux-6.6.21/lib/ |
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() 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-6.6.21/tools/testing/selftests/bpf/progs/ |
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-6.6.21/arch/x86/kernel/cpu/mce/ |
D | dev-mcelog.c | 162 static int __mce_read_apei(char __user **ubuf, size_t usize) in __mce_read_apei() argument 168 if (usize < sizeof(struct mce)) in __mce_read_apei() 203 size_t usize, loff_t *off) in mce_chrdev_read() argument 212 err = __mce_read_apei(&buf, usize); in mce_chrdev_read() 219 if (*off != 0 || usize < mcelog->len * sizeof(struct mce)) in mce_chrdev_read() 294 size_t usize, loff_t *off) in mce_chrdev_write() argument 307 if ((unsigned long)usize > sizeof(struct mce)) in mce_chrdev_write() 308 usize = sizeof(struct mce); in mce_chrdev_write() 309 if (copy_from_user(&m, ubuf, usize)) in mce_chrdev_write() 323 return usize; in mce_chrdev_write()
|
/linux-6.6.21/include/linux/ |
D | uaccess.h | 349 size_t usize) in copy_struct_from_user() argument 351 size_t size = min(ksize, usize); in copy_struct_from_user() 352 size_t rest = max(ksize, usize) - size; in copy_struct_from_user() 359 if (usize < ksize) { in copy_struct_from_user() 361 } else if (usize > ksize) { in copy_struct_from_user()
|
/linux-6.6.21/security/landlock/ |
D | syscalls.c | 49 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()
|