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()
185 uintptr_t page_sz = getpagesize(); in get_func() local
186 uintptr_t page_mask = ~(page_sz - 1); in get_func()
192 *func_page_offset = (uintptr_t)opd->entry & (page_sz - 1); in get_func()
196 *func_page_offset = (uintptr_t)&exec_func & (page_sz - 1); in get_func()
208 TEST(mprotect(page_to_copy, page_sz, PROT_READ | PROT_EXEC)); in get_func()
219 memcpy(mem, page_to_copy, page_sz); in get_func()
221 clear_cache(mem_start, page_sz); in get_func()
235 p = SAFE_MMAP(cleanup, 0, page_sz, PROT_READ | PROT_WRITE, in testfunc_protexec()
249 if (func_page_offset + 64 > page_sz) { in testfunc_protexec()
250 SAFE_MUNMAP(cleanup, p, page_sz); in testfunc_protexec()
256 TEST(mprotect(p, page_sz, PROT_EXEC)); in testfunc_protexec()
279 SAFE_MUNMAP(cleanup, p, page_sz); in testfunc_protexec()