Home
last modified time | relevance | path

Searched refs:PROT_WRITE (Results 1 – 25 of 60) sorted by relevance

123

/system/core/libcutils/
Dashmem_test.cpp71 ASSERT_NO_FATAL_FAILURE(TestCreateRegion(size, fd, PROT_READ | PROT_WRITE)); in TEST()
74 ASSERT_NO_FATAL_FAILURE(TestMmap(fd, size, PROT_READ | PROT_WRITE, &region1)); in TEST()
93 ASSERT_NO_FATAL_FAILURE(TestCreateRegion(size, fd, PROT_READ | PROT_WRITE)); in TEST()
96 ASSERT_NO_FATAL_FAILURE(TestMmap(fd, size, PROT_READ | PROT_WRITE, &region1)); in TEST()
107 void* region2 = mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in TEST()
122 ASSERT_NO_FATAL_FAILURE(TestMmap(fd, size, PROT_READ | PROT_WRITE, &region2)); in TEST()
135 ASSERT_NO_FATAL_FAILURE(TestCreateRegion(size, fd, PROT_READ | PROT_WRITE)); in TEST()
136 ASSERT_NO_FATAL_FAILURE(TestMmap(fd, dataSize, PROT_READ | PROT_WRITE, &region, holeSize)); in TEST()
191 TestProtDenied(fd, size, PROT_WRITE); in TEST()
196 ASSERT_NO_FATAL_FAILURE(TestCreateRegion(size, fd, PROT_WRITE)); in TEST()
[all …]
/system/core/debuggerd/seccomp_policy/
Dcrash_dump.policy.def40 Define the values of PROT_READ and PROT_WRITE ourselves to maintain backwards compatibility.
43 #define PROT_WRITE 0x2
47 mprotect: arg2 in PROT_READ|PROT_WRITE
53 mmap: arg2 in PROT_READ|PROT_WRITE
57 mmap2: arg2 in PROT_READ|PROT_WRITE
/system/core/libion/tests/
Dmap_test.cpp42 …ASSERT_EQ(0, ion_map(m_ionFd, handle, size, PROT_READ | PROT_WRITE, MAP_SHARED, 0, &ptr, &map_fd)); in TEST_F()
70 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
92 … ptr = (unsigned char *)mmap(NULL, PAGE_SIZE * 2, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
100 …ptr = (unsigned char *)mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, PAGE_SIZE… in TEST_F()
126 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
152 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
Dexit_test.cpp102 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
125 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
149 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
172 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
196 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
219 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
Ddevice_test.cpp149 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
184 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
213 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
246 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
275 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
310 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
339 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
374 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
404 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
439 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
[all …]
/system/core/libunwindstack/tests/
DUnwinderTest.cpp64 AddMapInfo(0x1000, 0x8000, 0, PROT_READ | PROT_WRITE, "/system/fake/libc.so", elf); in SetUpTestCase()
66 AddMapInfo(0x10000, 0x12000, 0, PROT_READ | PROT_WRITE, "[stack]"); in SetUpTestCase()
68 AddMapInfo(0x13000, 0x15000, 0, PROT_READ | PROT_WRITE | MAPS_FLAGS_DEVICE_MAP, in SetUpTestCase()
73 AddMapInfo(0x20000, 0x22000, 0, PROT_READ | PROT_WRITE, "/system/fake/libunwind.so", elf); in SetUpTestCase()
77 AddMapInfo(0x23000, 0x24000, 0, PROT_READ | PROT_WRITE, "/fake/libanother.so", elf); in SetUpTestCase()
81 AddMapInfo(0x33000, 0x34000, 0, PROT_READ | PROT_WRITE, "/fake/compressed.so", elf); in SetUpTestCase()
87 AddMapInfo(0x43000, 0x44000, 0x1d000, PROT_READ | PROT_WRITE, "/fake/fake.apk", elf); in SetUpTestCase()
92 AddMapInfo(0x53000, 0x54000, 0, PROT_READ | PROT_WRITE, "/fake/fake.oat"); in SetUpTestCase()
94 AddMapInfo(0xa3000, 0xa4000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, "/fake/fake.vdex"); in SetUpTestCase()
101 AddMapInfo(0xa5000, 0xa6000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, "/fake/fake_load_bias.so", in SetUpTestCase()
[all …]
DMapsTest.cpp90 EXPECT_EQ(PROT_READ | PROT_WRITE | PROT_EXEC, info.flags); in TEST()
104 EXPECT_EQ(PROT_READ | PROT_WRITE | PROT_EXEC, info.flags); in TEST()
163 EXPECT_EQ(PROT_READ | PROT_WRITE | PROT_EXEC, info.flags); in TEST()
169 EXPECT_EQ(PROT_READ | PROT_WRITE | PROT_EXEC, info.flags); in TEST()
203 EXPECT_EQ(PROT_WRITE, info->flags); in TEST()
219 EXPECT_EQ(PROT_READ | PROT_WRITE | PROT_EXEC, info->flags); in TEST()
243 EXPECT_EQ(PROT_READ | PROT_WRITE, info->flags); in TEST()
251 EXPECT_EQ(PROT_READ | PROT_WRITE, info->flags); in TEST()
259 EXPECT_EQ(PROT_READ | PROT_WRITE, info->flags); in TEST()
277 EXPECT_EQ(PROT_READ | PROT_WRITE, info->flags); in TEST()
[all …]
DMemoryRemoteTest.cpp113 mmap(nullptr, 4 * getpagesize(), PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0)); in TEST_F()
157 void* src = mmap(nullptr, pagesize * 2, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE,-1, 0); in TEST_F()
238 mmap(nullptr, 3 * getpagesize(), PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); in TEST_F()
271 mmap(nullptr, 3 * getpagesize(), PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); in TEST_F()
307 mmap(nullptr, 2 * getpagesize(), PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); in TEST_F()
DMemoryLocalTest.cpp73 mmap(nullptr, 2 * getpagesize(), PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0)); in TEST()
94 mmap(nullptr, 3 * 4096, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); in TEST()
/system/core/debuggerd/libdebuggerd/test/
Dtombstone_test.cpp150 unwinder_mock_->MockAddMap(0xa434000, 0xa435000, 0x1000, PROT_WRITE, "", 0xd000); in TEST_F()
152 unwinder_mock_->MockAddMap(0xa634000, 0xa635000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, in TEST_F()
185 unwinder_mock_->MockAddMap(0xa434000, 0xa435000, 0x1000, PROT_WRITE, "", 0xd000); in TEST_F()
187 unwinder_mock_->MockAddMap(0xa634000, 0xa635000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, in TEST_F()
218 unwinder_mock_->MockAddMap(0xa434000, 0xa435000, 0x1000, PROT_WRITE, "", 0xd000); in TEST_F()
220 unwinder_mock_->MockAddMap(0xa634000, 0xa635000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, in TEST_F()
251 unwinder_mock_->MockAddMap(0xa434000, 0xa435000, 0x1000, PROT_WRITE, "", 0xd000); in TEST_F()
253 unwinder_mock_->MockAddMap(0xa634000, 0xa635000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, in TEST_F()
282 unwinder_mock_->MockAddMap(0xa434000, 0xa435000, 0x1000, PROT_WRITE, "", 0xd000); in TEST_F()
284 unwinder_mock_->MockAddMap(0xa634000, 0xa635000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, in TEST_F()
/system/core/libunwindstack/
DGlobal.cpp84 (info->flags & (PROT_READ | PROT_WRITE)) == (PROT_READ | PROT_WRITE)) { in FindAndReadVariable()
/system/core/base/
Dmapped_file.cpp43 (prot & PROT_WRITE) ? PAGE_READWRITE : PAGE_READONLY, 0, 0, nullptr); in FromFd()
52 void* base = MapViewOfFile(handle, (prot & PROT_WRITE) ? FILE_MAP_ALL_ACCESS : FILE_MAP_READ, 0, in FromFd()
/system/media/audio_utils/tests/
Dfifo_multiprocess.cpp50 sizeof(audio_utils_fifo_index), PROT_READ | PROT_WRITE, MAP_SHARED, frontFd, (off_t) 0); in main()
55 sizeof(audio_utils_fifo_index), PROT_READ | PROT_WRITE, MAP_SHARED, rearFd, (off_t) 0); in main()
59 int16_t *data = (int16_t *) mmap(NULL, sizeof(audio_utils_fifo_index), PROT_READ | PROT_WRITE, in main()
/system/libhidl/transport/memory/1.0/default/
DAshmemMapper.cpp49 void* data = mmap(0, mem.size(), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); in mapMemory()
/system/core/base/include/android-base/
Dmapped_file.h29 #define PROT_WRITE 2 macro
/system/core/libbacktrace/include/backtrace/
DBacktraceMap.h26 #define PROT_WRITE 0x2 macro
138 bool IsWritable(uint64_t pc) { return GetFlags(pc) & PROT_WRITE; } in IsWritable()
/system/core/libmemunreachable/
DProcessMappings.cpp36 mappings_.emplace_back(start, end, flags & PROT_READ, flags & PROT_WRITE, flags & PROT_EXEC, in operator ()()
/system/extras/tests/pagingtest/
Dmmap_test.c24 buf = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); in mmap_test()
/system/core/lmkd/tests/
Dlmkd_test.cpp138 PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_SHARED, -1, 0); in init_state_sync_obj()
195 ptr = mmap(NULL, data->step_size, PROT_READ | PROT_WRITE, in add_pressure()
230 PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_SHARED, -1, 0); in runMemStressTest()
/system/sepolicy/tools/sepolicy-analyze/
Dutils.c42 map = mmap(NULL, sb.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); in load_policy()
/system/extras/alloc-stress/
Dmem-pressure.cpp91 shared = (size_t *)mmap(NULL, sizeof(size_t), PROT_READ | PROT_WRITE, in main()
/system/core/toolbox/
Dr.c70 void* page = mmap64(0, mmap_size, PROT_READ | PROT_WRITE, in main()
/system/core/libion/
Dion_test.c34 int prot = PROT_READ | PROT_WRITE;
247 map_flags |= strstr(optarg, "PROT_WRITE") ? PROT_WRITE: 0; in main()
/system/ashmemd/tests/
Dashmemd_test.cpp77 void* data = mmap(NULL, testSize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in TEST_F()
/system/core/libprocinfo/
Dprocess_map_test.cpp35 ASSERT_EQ(maps[0].flags, PROT_READ | PROT_WRITE); in TEST()

123