Home
last modified time | relevance | path

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

123

/linux/rust/kernel/
A Dsizes.rs8 pub const SZ_1K: usize = bindings::SZ_1K as usize;
10 pub const SZ_2K: usize = bindings::SZ_2K as usize;
12 pub const SZ_4K: usize = bindings::SZ_4K as usize;
14 pub const SZ_8K: usize = bindings::SZ_8K as usize;
16 pub const SZ_16K: usize = bindings::SZ_16K as usize;
18 pub const SZ_32K: usize = bindings::SZ_32K as usize;
20 pub const SZ_64K: usize = bindings::SZ_64K as usize;
22 pub const SZ_128K: usize = bindings::SZ_128K as usize;
24 pub const SZ_256K: usize = bindings::SZ_256K as usize;
26 pub const SZ_512K: usize = bindings::SZ_512K as usize;
A Dpage.rs15 pub const PAGE_SHIFT: usize = bindings::PAGE_SHIFT as usize;
18 pub const PAGE_SIZE: usize = bindings::PAGE_SIZE;
21 pub const PAGE_MASK: usize = !(PAGE_SIZE - 1);
138 off: usize, in with_pointer_into_page() argument
139 len: usize, in with_pointer_into_page() argument
165 pub unsafe fn read_raw(&self, dst: *mut u8, offset: usize, len: usize) -> Result { in read_raw() argument
187 pub unsafe fn write_raw(&self, src: *const u8, offset: usize, len: usize) -> Result { in write_raw() argument
207 pub unsafe fn fill_zero_raw(&self, offset: usize, len: usize) -> Result { in fill_zero_raw() argument
233 offset: usize, in copy_from_user_slice_raw() argument
234 len: usize, in copy_from_user_slice_raw() argument
A Dstr.rs19 pub const fn len(&self) -> usize { in len() argument
158 pub const fn len(&self) -> usize { in len() argument
164 pub const fn len_with_nul(&self) -> usize { in len_with_nul() argument
454 impl Index<ops::RangeFrom<usize>> for CStr {
482 impl CStrIndex for usize {} implementation
483 impl CStrIndex for ops::Range<usize> {}
642 beg: usize,
643 pos: usize,
644 end: usize,
680 let pos = buf as usize; in from_buffer()
[all …]
A Duaccess.rs19 pub type UserPtr = usize;
110 length: usize,
126 pub fn new(ptr: UserPtr, length: usize) -> Self { in new()
175 length: usize,
182 pub fn skip(&mut self, num_skip: usize) -> Result { in skip()
205 pub fn len(&self) -> usize { in len() argument
314 length: usize,
321 pub fn len(&self) -> usize { in len() argument
A Dioctl.rs13 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()
A Dtypes.rs489 unsafe impl FromBytes for usize {} implementation
498 unsafe impl<T: FromBytes, const N: usize> FromBytes for [T; N] {}
522 unsafe impl AsBytes for usize {} implementation
534 unsafe impl<T: AsBytes, const N: usize> AsBytes for [T; N] {}
/linux/lib/crypto/mpi/
A Dmpi-add.c24 usize = v->nlimbs; in mpi_add()
28 wsize = usize + 1; in mpi_add()
36 usize = u->nlimbs; in mpi_add()
40 wsize = usize + 1; in mpi_add()
53 wsize = usize; in mpi_add()
57 if (usize != vsize) { in mpi_add()
59 wsize = usize; in mpi_add()
64 wsize = usize; in mpi_add()
70 wsize = usize; in mpi_add()
77 wp[usize] = cy; in mpi_add()
[all …]
A Dmpi-cmp.c50 mpi_size_t usize, vsize; in mpi_cmp() local
55 usize = u->nlimbs; in mpi_cmp()
61 if (usize != vsize && !u->sign && !v->sign) in mpi_cmp()
62 return usize - vsize; in mpi_cmp()
63 if (usize != vsize && u->sign && v->sign) in mpi_cmp()
64 return vsize - usize; in mpi_cmp()
65 if (!usize) in mpi_cmp()
67 cmp = mpihelp_cmp(u->d, v->d, usize); in mpi_cmp()
A Dmpih-mul.c341 usize -= vsize; in mpihelp_mul_karatsuba_case()
342 if (usize >= vsize) { in mpihelp_mul_karatsuba_case()
363 usize -= vsize; in mpihelp_mul_karatsuba_case()
364 } while (usize >= vsize); in mpihelp_mul_karatsuba_case()
367 if (usize) { in mpihelp_mul_karatsuba_case()
381 up, usize, in mpihelp_mul_karatsuba_case()
448 MPN_COPY(prodp, up, usize); in mpihelp_mul()
450 MPN_ZERO(prodp, usize); in mpihelp_mul()
455 prodp[usize] = cy; in mpihelp_mul()
466 usize); in mpihelp_mul()
[all …]
A Dmpi-mul.c18 mpi_size_t usize, vsize, wsize; in mpi_mul() local
28 usize = v->nlimbs; in mpi_mul()
35 usize = u->nlimbs; in mpi_mul()
46 wsize = usize + vsize; in mpi_mul()
62 up = tmp_limb = mpi_alloc_limb_space(usize); in mpi_mul()
69 MPN_COPY(up, wp, usize); in mpi_mul()
83 err = mpihelp_mul(wp, up, usize, vp, vsize, &cy); in mpi_mul()
A 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()
A 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()
A Dmpi-internal.h172 int mpihelp_mul(mpi_ptr_t prodp, mpi_ptr_t up, mpi_size_t usize,
179 mpi_ptr_t up, mpi_size_t usize,
198 mpi_limb_t mpihelp_lshift(mpi_ptr_t wp, mpi_ptr_t up, mpi_size_t usize,
200 mpi_limb_t mpihelp_rshift(mpi_ptr_t wp, mpi_ptr_t up, mpi_size_t usize,
/linux/drivers/gpu/drm/
A Ddrm_panic_qr.rs33 struct Version(usize);
303 fn get_next_13b(data: &[u8], offset: usize) -> Option<(u16, usize)> { in get_next_13b() argument
408 offset: usize,
410 carry_len: usize,
470 ec_size: usize,
509 fn push(&mut self, offset: &mut usize, bits: (u16, usize)) { in push() argument
557 fn error_code_for_blocks(&mut self, offset: usize, size: usize, ec_offset: usize) { in error_code_for_blocks() argument
607 offset: usize,
684 let off = y as usize * self.stride as usize + x as usize / 8; in set()
692 let off = y as usize * self.stride as usize + x as usize / 8; in xor()
[all …]
/linux/drivers/acpi/apei/
A 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/rust/kernel/alloc/
A Dvec_ext.rs20 fn with_capacity(capacity: usize, flags: Flags) -> Result<Self, AllocError>; in with_capacity() argument
74 fn reserve(&mut self, additional: usize, flags: Flags) -> Result<(), AllocError>; in reserve() argument
78 fn with_capacity(capacity: usize, flags: Flags) -> Result<Self, AllocError> { in with_capacity() argument
113 fn reserve(&mut self, additional: usize, _flags: Flags) -> Result<(), AllocError> { in reserve() argument
119 fn reserve(&mut self, additional: usize, flags: Flags) -> Result<(), AllocError> { in reserve() argument
166 fn destructure<T>(v: &mut Vec<T>) -> (*mut T, usize, usize) { in destructure() argument
181 unsafe fn rebuild<T>(v: &mut Vec<T>, ptr: *mut T, len: usize, cap: usize) { in rebuild() argument
/linux/lib/
A Dusercopy_kunit.c112 size_t ksize, usize; in usercopy_test_copy_struct_from_user() local
127 usize = size; in usercopy_test_copy_struct_from_user()
132 KUNIT_EXPECT_EQ_MSG(test, copy_struct_from_user(kmem, ksize, umem, usize), 0, in usercopy_test_copy_struct_from_user()
139 usize = size / 2; in usercopy_test_copy_struct_from_user()
141 memcpy(expected, umem_src, usize); in usercopy_test_copy_struct_from_user()
142 memset(expected + usize, 0x0, ksize - usize); in usercopy_test_copy_struct_from_user()
145 KUNIT_EXPECT_EQ_MSG(test, copy_struct_from_user(kmem, ksize, umem, usize), 0, in usercopy_test_copy_struct_from_user()
152 usize = size; in usercopy_test_copy_struct_from_user()
160 usize = size; in usercopy_test_copy_struct_from_user()
163 KUNIT_EXPECT_EQ_MSG(test, clear_user(umem + ksize, usize - ksize), 0, in usercopy_test_copy_struct_from_user()
[all …]
/linux/tools/testing/selftests/bpf/progs/
A 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/arch/x86/kernel/cpu/mce/
A Ddev-mcelog.c162 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/include/linux/
A Dsockptr.h86 sockptr_t src, size_t usize) in copy_struct_from_sockptr() argument
88 size_t size = min(ksize, usize); in copy_struct_from_sockptr()
89 size_t rest = max(ksize, usize) - size; in copy_struct_from_sockptr()
94 if (usize < ksize) { in copy_struct_from_sockptr()
96 } else if (usize > ksize) { in copy_struct_from_sockptr()
A Duaccess.h383 size_t usize) in copy_struct_from_user() argument
385 size_t size = min(ksize, usize); in copy_struct_from_user()
386 size_t rest = max(ksize, usize) - size; in copy_struct_from_user()
393 if (usize < ksize) { in copy_struct_from_user()
395 } else if (usize > ksize) { in copy_struct_from_user()
/linux/rust/kernel/list/
A Dimpl_list_item_mod.rs22 const OFFSET: usize;
57 const OFFSET: usize = ::core::mem::offset_of!(Self, $($field).*) as usize;
100 const OFFSET: usize = ::core::mem::offset_of!(Self, $field) as usize;
/linux/fs/
A Dnsfs.c132 struct mnt_ns_info __user *uinfo, size_t usize, in copy_ns_info_to_user() argument
142 kinfo->size = min(usize, sizeof(*kinfo)); in copy_ns_info_to_user()
248 size_t usize = _IOC_SIZE(ioctl); in ns_ioctl() local
256 if (usize < MNT_NS_INFO_SIZE_VER0) in ns_ioctl()
259 return copy_ns_info_to_user(to_mnt_ns(ns), uinfo, usize, &kinfo); in ns_ioctl()
269 size_t usize = _IOC_SIZE(ioctl); in ns_ioctl() local
274 if (usize < MNT_NS_INFO_SIZE_VER0) in ns_ioctl()
303 ret = copy_ns_info_to_user(to_mnt_ns(ns), uinfo, usize, &kinfo); in ns_ioctl()
/linux/security/
A Dlsm_syscalls.c100 u32 usize; in SYSCALL_DEFINE3() local
106 if (get_user(usize, size)) in SYSCALL_DEFINE3()
112 if (usize < total_size) in SYSCALL_DEFINE3()
/linux/rust/kernel/block/mq/
A Draw_writer.rs15 pos: usize,
27 pub(crate) fn from_array<const N: usize>( in from_array()

Completed in 39 milliseconds

123