Lines Matching refs:p
34 u8 *p = kmem_cache_alloc(s, GFP_KERNEL); in test_clobber_zone() local
37 p[64] = 0x12; in test_clobber_zone()
43 kmem_cache_free(s, p); in test_clobber_zone()
52 u8 *p = kmem_cache_alloc(s, GFP_KERNEL); in test_next_pointer() local
56 kmem_cache_free(s, p); in test_next_pointer()
58 ptr_addr = (unsigned long *)(p + s->offset); in test_next_pointer()
60 p[s->offset] = ~p[s->offset]; in test_next_pointer()
97 u8 *p = kmem_cache_alloc(s, GFP_KERNEL); in test_first_word() local
99 kmem_cache_free(s, p); in test_first_word()
100 *p = 0x78; in test_first_word()
112 u8 *p = kmem_cache_alloc(s, GFP_KERNEL); in test_clobber_50th_byte() local
114 kmem_cache_free(s, p); in test_clobber_50th_byte()
115 p[50] = 0x9a; in test_clobber_50th_byte()
128 u8 *p = kmem_cache_alloc(s, GFP_KERNEL); in test_clobber_redzone_free() local
131 kmem_cache_free(s, p); in test_clobber_redzone_free()
132 p[64] = 0xab; in test_clobber_redzone_free()
145 u8 *p = alloc_hooks(__kmalloc_cache_noprof(s, GFP_KERNEL, 18)); in test_kmalloc_redzone_access() local
150 OPTIMIZER_HIDE_VAR(p); in test_kmalloc_redzone_access()
151 p[18] = 0xab; in test_kmalloc_redzone_access()
152 p[19] = 0xab; in test_kmalloc_redzone_access()
158 kmem_cache_free(s, p); in test_kmalloc_redzone_access()
169 struct test_kfree_rcu_struct *p; in test_kfree_rcu() local
177 p = kmem_cache_alloc(s, GFP_KERNEL); in test_kfree_rcu()
179 kfree_rcu(p, rcu); in test_kfree_rcu()
202 struct test_kfree_rcu_struct *p; in test_kfree_rcu_wq_destroy() local
228 p = kmem_cache_alloc(s, GFP_KERNEL); in test_kfree_rcu_wq_destroy()
229 kfree_rcu(p, rcu); in test_kfree_rcu_wq_destroy()
255 u8 *p; in test_krealloc_redzone_zeroing() local
260 p = alloc_hooks(__kmalloc_cache_noprof(s, GFP_KERNEL, 48)); in test_krealloc_redzone_zeroing()
261 memset(p, 0xff, 48); in test_krealloc_redzone_zeroing()
264 OPTIMIZER_HIDE_VAR(p); in test_krealloc_redzone_zeroing()
267 p = krealloc(p, 40, GFP_KERNEL | __GFP_ZERO); in test_krealloc_redzone_zeroing()
269 KUNIT_EXPECT_EQ(test, p[i], SLUB_RED_ACTIVE); in test_krealloc_redzone_zeroing()
272 p = krealloc(p, 56, GFP_KERNEL | __GFP_ZERO); in test_krealloc_redzone_zeroing()
274 KUNIT_EXPECT_EQ(test, p[i], 0); in test_krealloc_redzone_zeroing()
276 KUNIT_EXPECT_EQ(test, p[i], SLUB_RED_ACTIVE); in test_krealloc_redzone_zeroing()
281 memset(p, 0xff, 56); in test_krealloc_redzone_zeroing()
283 p = krealloc(p, 112, GFP_KERNEL | __GFP_ZERO); in test_krealloc_redzone_zeroing()
285 KUNIT_EXPECT_EQ(test, p[i], 0xff); in test_krealloc_redzone_zeroing()
287 KUNIT_EXPECT_EQ(test, p[i], 0); in test_krealloc_redzone_zeroing()
289 kfree(p); in test_krealloc_redzone_zeroing()