Lines Matching refs:page_sz
58 static unsigned int page_sz; variable
91 page_sz = getpagesize(); in setup()
102 addr = SAFE_MMAP(cleanup, 0, page_sz, PROT_READ | PROT_WRITE, in testfunc_protnone()
106 TEST(mprotect(addr, page_sz, PROT_NONE)); in testfunc_protnone()
128 SAFE_MUNMAP(cleanup, addr, page_sz); in testfunc_protnone()
212 uintptr_t page_sz = getpagesize(); in get_func() local
213 uintptr_t page_mask = ~(page_sz - 1); in get_func()
219 *func_page_offset = (uintptr_t)opd->entry & (page_sz - 1); in get_func()
223 *func_page_offset = (uintptr_t)&exec_func & (page_sz - 1); in get_func()
235 TEST(mprotect(page_to_copy, page_sz, PROT_READ | PROT_EXEC)); in get_func()
246 memcpy(mem, page_to_copy, page_sz); in get_func()
248 clear_cache(mem_start, page_sz); in get_func()
264 p = SAFE_MMAP(cleanup, 0, page_sz, PROT_READ | PROT_WRITE, in testfunc_protexec()
278 if (func_page_offset + 64 > page_sz) { in testfunc_protexec()
279 SAFE_MUNMAP(cleanup, p, page_sz); in testfunc_protexec()
285 TEST(mprotect(p, page_sz, PROT_EXEC)); in testfunc_protexec()
308 SAFE_MUNMAP(cleanup, p, page_sz); in testfunc_protexec()