Home
last modified time | relevance | path

Searched refs:mmap_ptr (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/tools/testing/selftests/bpf/prog_tests/
H A Dringbuf.c93 void *mmap_ptr, *tmp_ptr; in ringbuf_subtest() local
107 mmap_ptr = mmap(NULL, page_size, PROT_READ | PROT_WRITE, MAP_SHARED, rb_fd, 0); in ringbuf_subtest()
108 ASSERT_OK_PTR(mmap_ptr, "rw_cons_pos"); in ringbuf_subtest()
109 tmp_ptr = mremap(mmap_ptr, page_size, 2 * page_size, MREMAP_MAYMOVE); in ringbuf_subtest()
112 ASSERT_ERR(mprotect(mmap_ptr, page_size, PROT_EXEC), "exec_cons_pos_protect"); in ringbuf_subtest()
113 ASSERT_OK(munmap(mmap_ptr, page_size), "unmap_rw"); in ringbuf_subtest()
116 mmap_ptr = mmap(NULL, page_size, PROT_WRITE, MAP_SHARED, rb_fd, page_size); in ringbuf_subtest()
118 ASSERT_ERR_PTR(mmap_ptr, "wr_prod_pos"); in ringbuf_subtest()
122 mmap_ptr = mmap(NULL, page_size, PROT_WRITE, MAP_SHARED, rb_fd, 2 * page_size); in ringbuf_subtest()
124 ASSERT_ERR_PTR(mmap_ptr, "wr_data_page_one"); in ringbuf_subtest()
[all …]
H A Duser_ringbuf.c103 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 …]