Searched refs:mmap_ptr (Results 1 – 2 of 2) sorted by relevance
/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | ringbuf.c | 93 size_t *mmap_ptr; in ringbuf_subtest() 108 mmap_ptr = mmap(NULL, page_size, PROT_READ | PROT_WRITE, MAP_SHARED, rb_fd, 0); in ringbuf_subtest() 109 if (!ASSERT_OK_PTR(mmap_ptr, "rw_cons_pos")) in ringbuf_subtest() 111 *mmap_ptr = 0x3000; in ringbuf_subtest() 112 ASSERT_OK(munmap(mmap_ptr, page_size), "unmap_rw"); in ringbuf_subtest() 148 void *mmap_ptr, *tmp_ptr; in ringbuf_subtest() 165 mmap_ptr = mmap(NULL, page_size, PROT_READ | PROT_WRITE, MAP_SHARED, rb_fd, 0); in ringbuf_subtest() 166 ASSERT_OK_PTR(mmap_ptr, "rw_cons_pos"); in ringbuf_subtest() 167 tmp_ptr = mremap(mmap_ptr, page_size, 2 * page_size, MREMAP_MAYMOVE); in ringbuf_subtest() 170 ASSERT_ERR(mprotect(mmap_ptr, page_siz in ringbuf_subtest() 94 void *mmap_ptr, *tmp_ptr; ringbuf_subtest() local [all...] |
H A D | user_ringbuf.c | 103 void *mmap_ptr; in test_user_ringbuf_mappings() local 112 mmap_ptr = mmap(NULL, page_size, PROT_READ, MAP_SHARED, rb_fd, 0); in test_user_ringbuf_mappings() 113 ASSERT_OK_PTR(mmap_ptr, "ro_cons_pos"); in test_user_ringbuf_mappings() 114 ASSERT_ERR(mprotect(mmap_ptr, page_size, PROT_WRITE), "write_cons_pos_protect"); in test_user_ringbuf_mappings() 115 ASSERT_ERR(mprotect(mmap_ptr, page_size, PROT_EXEC), "exec_cons_pos_protect"); in test_user_ringbuf_mappings() 116 ASSERT_ERR_PTR(mremap(mmap_ptr, 0, 4 * page_size, MREMAP_MAYMOVE), "wr_prod_pos"); in test_user_ringbuf_mappings() 119 ASSERT_OK(munmap(mmap_ptr, page_size), "unmap_ro_cons"); in test_user_ringbuf_mappings() 122 mmap_ptr = mmap(NULL, page_size, PROT_READ | PROT_WRITE, MAP_SHARED, in test_user_ringbuf_mappings() 124 ASSERT_OK_PTR(mmap_ptr, "rw_prod_pos"); in test_user_ringbuf_mappings() 125 ASSERT_ERR(mprotect(mmap_ptr, page_size, PROT_EXEC), "exec_prod_pos_protect"); in test_user_ringbuf_mappings() [all …]
|