Lines Matching refs:kmem
53 char *kmem; in test_user_copy_init() local
64 kmem = kmalloc(PAGE_SIZE * 2, GFP_KERNEL); in test_user_copy_init()
65 if (!kmem) in test_user_copy_init()
73 kfree(kmem); in test_user_copy_init()
83 memset(kmem, 0x3a, PAGE_SIZE * 2); in test_user_copy_init()
84 ret |= test(copy_to_user(usermem, kmem, PAGE_SIZE), in test_user_copy_init()
86 memset(kmem, 0x0, PAGE_SIZE); in test_user_copy_init()
87 ret |= test(copy_from_user(kmem, usermem, PAGE_SIZE), in test_user_copy_init()
89 ret |= test(memcmp(kmem, kmem + PAGE_SIZE, PAGE_SIZE), in test_user_copy_init()
122 memset(kmem, 0x5a, PAGE_SIZE); in test_user_copy_init()
123 memset(kmem + PAGE_SIZE, 0, PAGE_SIZE); in test_user_copy_init()
126 ret |= test(!copy_from_user(kmem, (char __user *)(kmem + PAGE_SIZE), in test_user_copy_init()
131 ret |= test(memcmp(kmem + PAGE_SIZE, kmem, PAGE_SIZE), in test_user_copy_init()
141 ret |= test(!copy_from_user(bad_usermem, (char __user *)kmem, in test_user_copy_init()
145 ret |= test(!copy_to_user((char __user *)kmem, kmem + PAGE_SIZE, in test_user_copy_init()
148 ret |= test(!copy_to_user((char __user *)kmem, bad_usermem, in test_user_copy_init()
155 ret |= test(!get_user(val_##size, (size __user *)kmem), \ in test_user_copy_init()
163 ret |= test(!put_user(val_##size, (size __user *)kmem), \ in test_user_copy_init()
176 kfree(kmem); in test_user_copy_init()