Searched refs:ksize (Results 1 - 25 of 39) sorted by relevance

12

/linux-master/include/linux/
H A Dsockptr.h64 * @dst: Destination address, in kernel space. This buffer must be @ksize
66 * @ksize: Size of @dst struct.
71 * * -EINVAL: @optlen < @ksize
73 * * 0 : @ksize bytes were copied
75 static inline int copy_safe_from_sockptr(void *dst, size_t ksize, argument
78 if (optlen < ksize)
80 return copy_from_sockptr(dst, optval, ksize);
83 static inline int copy_struct_from_sockptr(void *dst, size_t ksize, argument
86 size_t size = min(ksize, usize);
87 size_t rest = max(ksize, usiz
[all...]
H A Duaccess.h302 * @dst: Destination address, in kernel space. This buffer must be @ksize
304 * @ksize: Size of @dst struct.
314 * @ksize is just sizeof(*dst), and @usize should've been passed by userspace.
335 * * If @usize == @ksize, then it's copied verbatim.
336 * * If @usize < @ksize, then the userspace has passed an old struct to a
337 * newer kernel. The rest of the trailing bytes in @dst (@ksize - @usize)
339 * * If @usize > @ksize, then the userspace has passed a new struct to an
340 * older kernel. The trailing bytes unknown to the kernel (@usize - @ksize)
344 * * -E2BIG: (@usize > @ksize) and there are non-zero trailing bytes in @src.
348 copy_struct_from_user(void *dst, size_t ksize, cons argument
[all...]
/linux-master/lib/
H A Dtest_user_copy.c110 size_t ksize, usize; local
127 /* Check basic case -- (usize == ksize). */
128 ksize = size;
131 memcpy(expected, umem_src, ksize);
134 ret |= test(copy_struct_from_user(kmem, ksize, umem, usize),
135 "copy_struct_from_user(usize == ksize) failed");
136 ret |= test(memcmp(kmem, expected, ksize),
137 "copy_struct_from_user(usize == ksize) gives unexpected copy");
139 /* Old userspace case -- (usize < ksize). */
140 ksize
[all...]
/linux-master/tools/testing/selftests/bpf/progs/
H A Dtest_get_stack_rawtp.c36 * ksize = bpf_get_stack(ctx, raw_data + usize, max_len - usize, 0);
62 long usize, ksize; local
91 ksize = bpf_get_stack(ctx, raw_data + usize, max_len - usize, 0);
92 if (ksize < 0)
95 total_size = usize + ksize;
/linux-master/arch/powerpc/platforms/powernv/
H A Dopal-secvar.c57 static int opal_get_variable(const char *key, u64 ksize, u8 *data, u64 *dsize) argument
66 rc = opal_secvar_get(key, ksize, data, dsize);
89 static int opal_set_variable(const char *key, u64 ksize, u8 *data, u64 dsize) argument
96 rc = opal_secvar_enqueue_update(key, ksize, data, dsize);
/linux-master/arch/alpha/boot/
H A Dmisc.c152 size_t ksize,
160 free_mem_ptr = (ulg)output_start + ksize;
161 free_mem_end_ptr = (ulg)output_start + ksize + 0x200000;
150 decompress_kernel(void *output_start, void *input_start, size_t ksize, size_t kzsize) argument
H A DMakefile46 $(obj)/main.o: $(obj)/ksize.h
47 $(obj)/bootp.o: $(obj)/ksize.h
50 $(obj)/ksize.h: $(obj)/vmlinux.nh FORCE
H A Dbootpz.c49 size_t ksize, size_t kzsize);
/linux-master/drivers/dma-buf/
H A Ddma-heap.c132 unsigned int in_size, out_size, drv_size, ksize; local
151 ksize = max(max(in_size, out_size), drv_size);
154 if (ksize > sizeof(stack_kdata)) {
155 kdata = kmalloc(ksize, GFP_KERNEL);
166 if (ksize > in_size)
167 memset(kdata + in_size, 0, ksize - in_size);
/linux-master/crypto/
H A Dtestmgr.h33 * @ksize: Length of @key in bytes (0 if no key)
43 unsigned short ksize; member in struct:hash_testvec
5741 .ksize = 32,
5760 .ksize = 32,
5912 .ksize = 32,
5926 .ksize = 37,
5940 .ksize = 32,
5949 .ksize = 4,
7128 .ksize = 16,
7137 .ksize
[all...]
/linux-master/security/landlock/
H A Dsyscalls.c54 * @ksize: Actual size of the data pointed to by @dst.
60 copy_min_struct_from_user(void *const dst, const size_t ksize, argument
70 BUILD_BUG_ON(ksize <= 0);
71 BUILD_BUG_ON(ksize < ksize_min);
78 return copy_struct_from_user(dst, ksize, src, usize);
/linux-master/arch/microblaze/mm/
H A Dinit.c194 unsigned int kstart, ksize; local
230 ksize = PAGE_ALIGN(((u32)_end - (u32)CONFIG_KERNEL_START));
231 memblock_reserve(kstart, ksize);
/linux-master/drivers/md/dm-vdo/
H A Dmemory-alloc.c244 add_kmalloc_block(ksize(p));
310 add_kmalloc_block(ksize(p));
322 remove_kmalloc_block(ksize(ptr));
/linux-master/drivers/gpu/drm/
H A Ddrm_ioctl.c772 unsigned int in_size, out_size, drv_size, ksize; local
807 ksize = max(max(in_size, out_size), drv_size);
823 if (ksize <= sizeof(stack_kdata)) {
826 kdata = kmalloc(ksize, GFP_KERNEL);
838 if (ksize > in_size)
839 memset(kdata + in_size, 0, ksize - in_size);
H A Ddrm_managed.c133 WARN_ON(dev + 1 > (struct drm_device *) (container + ksize(container)));
/linux-master/arch/x86/kernel/fpu/
H A Dxstate.c1490 * @ksize: The required size for the kernel buffer
1500 static int fpstate_realloc(u64 xfeatures, unsigned int ksize, argument
1508 fpsize = ksize + ALIGN(offsetof(struct fpstate, regs), 64);
1513 newfps->size = ksize;
1598 unsigned int ksize, usize; local
1611 ksize = xstate_calculate_size(mask, compacted);
1627 perm->__state_size = ksize;
1681 unsigned int ksize, usize; local
1701 ksize = perm->__state_size;
1716 if (fpstate_realloc(xfd_event, ksize, usiz
[all...]
/linux-master/drivers/s390/crypto/
H A Dpkey_api.c703 enum pkey_key_type ktype, enum pkey_key_size ksize,
731 switch (ksize) {
746 rc = ep11_genaeskey(card, dom, ksize, kflags,
749 rc = cca_genseckey(card, dom, ksize, keybuf);
753 rc = cca_gencipherkey(card, dom, ksize, kflags,
764 enum pkey_key_type ktype, enum pkey_key_size ksize,
793 switch (ksize) {
810 rc = ep11_clr2keyblob(card, dom, ksize, kflags,
814 rc = cca_clr2seckey(card, dom, ksize,
819 rc = cca_clr2cipherkey(card, dom, ksize, kflag
702 pkey_genseckey2(const struct pkey_apqn *apqns, size_t nr_apqns, enum pkey_key_type ktype, enum pkey_key_size ksize, u32 kflags, u8 *keybuf, size_t *keybufsize) argument
763 pkey_clr2seckey2(const struct pkey_apqn *apqns, size_t nr_apqns, enum pkey_key_type ktype, enum pkey_key_size ksize, u32 kflags, const u8 *clrkey, u8 *keybuf, size_t *keybufsize) argument
829 pkey_verifykey2(const u8 *key, size_t keylen, u16 *cardnr, u16 *domain, enum pkey_key_type *ktype, enum pkey_key_size *ksize, u32 *flags) argument
[all...]
/linux-master/drivers/nvmem/
H A Dcore.c88 unsigned int kend, ksize; local
104 ksize = kend - offset;
106 rc = __nvmem_reg_write(nvmem, offset, val, ksize);
108 rc = __nvmem_reg_read(nvmem, offset, val, ksize);
113 offset += ksize;
114 val += ksize;
122 ksize = kend - offset;
124 memset(val, keepout->value, ksize);
126 val += ksize;
127 offset += ksize;
[all...]
/linux-master/lib/kunit/
H A Dstring-stream-test.c482 actual_bytes_used = ksize(stream);
487 actual_bytes_used += ksize(frag_container);
492 actual_bytes_used += ksize(frag_container->fragment);
/linux-master/drivers/crypto/
H A Dpadlock-aes.c50 ksize:2; member in struct:cword
136 ctx->cword.encrypt.ksize = (key_len - 16) / 8;
137 ctx->cword.decrypt.ksize = ctx->cword.encrypt.ksize;
/linux-master/security/tomoyo/
H A Dmemory.c50 const size_t s = ksize(ptr);
/linux-master/net/sched/
H A Dact_pedit.c170 int i, ksize; local
219 ksize = parm->nkeys * sizeof(struct tc_pedit_key);
220 if (nla_len(pattr) < sizeof(*parm) + ksize) {
249 nparms->tcfp_keys = kmemdup(parm->keys, ksize, GFP_KERNEL);
/linux-master/drivers/net/ethernet/chelsio/inline_crypto/chtls/
H A Dchtls_hw.c161 int ksize; local
168 ksize = sizeof(*cdev->kmap.addr) * bsize;
169 cdev->kmap.addr = kvzalloc(ksize, GFP_KERNEL);
/linux-master/tools/testing/selftests/net/mptcp/
H A Dmptcp_connect.sh564 local ksize
574 ksize=$((SIZE / 1024))
575 rem=$((SIZE - (ksize * 1024)))
577 mptcp_lib_make_file $name 1024 $ksize
/linux-master/mm/
H A Dslab_common.c1169 /* Check for double-free before calling ksize. */
1173 ks = ksize(p);
1240 ks = ksize(mem);
1249 size_t ksize(const void *objp) function
1253 * The KASAN report printed from ksize() is more useful, then when
1261 * ksize() writing to and potentially corrupting the memory region.
1271 EXPORT_SYMBOL(ksize); variable

Completed in 664 milliseconds

12