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
51 return trick_compiler(&buf[(128/2)-32]); in do_usercopy_stack_callee()
71 bad_stack -= sizeof(unsigned long); in do_usercopy_stack()
77 pr_info("good_stack: %px-%px\n", good_stack, good_stack + sizeof(good_stack)); in do_usercopy_stack()
78 pr_info("bad_stack : %px-%px\n", bad_stack, bad_stack + sizeof(good_stack)); in do_usercopy_stack()
84 pr_warn("Failed to allocate user memory\n"); in do_usercopy_stack()
130 * This checks for whole-object size validation with hardened usercopy,
136 unsigned char *one, *two; in do_usercopy_heap_size() local
142 two = kmalloc(size, GFP_KERNEL); in do_usercopy_heap_size()
143 if (!one || !two) { in do_usercopy_heap_size()
152 pr_warn("Failed to allocate user memory\n"); in do_usercopy_heap_size()
157 memset(two, 'B', size); in do_usercopy_heap_size()
192 kfree(two); in do_usercopy_heap_size()
221 /* Allocate user memory we'll poke at. */ in do_usercopy_heap_whitelist()
226 pr_warn("Failed to allocate user memory\n"); in do_usercopy_heap_whitelist()
245 if (copy_to_user(user_addr, buf + offset - 1, size)) { in do_usercopy_heap_whitelist()
257 if (copy_from_user(buf + offset - 1, user_addr, size)) { in do_usercopy_heap_whitelist()
314 pr_warn("Failed to allocate user memory\n"); in lkdtm_USERCOPY_KERNEL()
343 kmem_cache_create_usercopy("lkdtm-usercopy", cache_size, in lkdtm_usercopy_init()