Lines Matching +full:two +full:- +full:user
1 // SPDX-License-Identifier: GPL-2.0
17 * into choosing the non-const path to make sure we trigger the
28 * Instead of adding -Wno-return-local-addr, just pass the stack address
66 bad_stack -= sizeof(unsigned long); in do_usercopy_stack()
73 pr_warn("Failed to allocate user memory\n"); in do_usercopy_stack()
119 * This checks for whole-object size validation with hardened usercopy,
125 unsigned char *one, *two; in do_usercopy_heap_size() local
131 two = kmalloc(size, GFP_KERNEL); in do_usercopy_heap_size()
132 if (!one || !two) { in do_usercopy_heap_size()
141 pr_warn("Failed to allocate user memory\n"); in do_usercopy_heap_size()
146 memset(two, 'B', size); in do_usercopy_heap_size()
181 kfree(two); in do_usercopy_heap_size()
210 /* Allocate user memory we'll poke at. */ in do_usercopy_heap_whitelist()
215 pr_warn("Failed to allocate user memory\n"); in do_usercopy_heap_whitelist()
234 if (copy_to_user(user_addr, buf + offset - 1, size)) { in do_usercopy_heap_whitelist()
246 if (copy_from_user(buf + offset - 1, user_addr, size)) { in do_usercopy_heap_whitelist()
303 pr_warn("Failed to allocate user memory\n"); in lkdtm_USERCOPY_KERNEL()
332 kmem_cache_create_usercopy("lkdtm-usercopy", cache_size, in lkdtm_usercopy_init()