/system/core/libcutils/ |
D | ashmem_test.cpp | 71 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, ®ion1)); in TEST() 82 ASSERT_NO_FATAL_FAILURE(TestMmap(fd, size, PROT_READ, ®ion2)); 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, ®ion1)); 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, ®ion2)); 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, ®ion, holeSize)); in TEST() 190 ASSERT_NO_FATAL_FAILURE(TestCreateRegion(size, fd, PROT_READ)); in TEST() [all …]
|
/system/media/audio_utils/tests/ |
D | fifo_multiprocess.cpp | 50 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() 79 ok = ashmem_set_prot_region(frontFd, PROT_READ); in main() 83 sizeof(audio_utils_fifo_index), PROT_READ, MAP_SHARED | MAP_FIXED, frontFd, in main() 142 ok = ashmem_set_prot_region(rearFd, PROT_READ); in main() 146 sizeof(audio_utils_fifo_index), PROT_READ, MAP_SHARED | MAP_FIXED, rearFd, in main() 153 ok = ashmem_set_prot_region(dataFd, PROT_READ); in main() 156 data = (int16_t *) mmap((char *) data + pageSize * 8, BUFFER_SIZE, PROT_READ, in main()
|
/system/core/debuggerd/seccomp_policy/ |
D | crash_dump.policy.def | 40 Define the values of PROT_READ and PROT_WRITE ourselves to maintain backwards compatibility. 42 #define PROT_READ 0x1 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/ |
D | invalid_values_test.cpp | 121 int ret = ion_map(0, m_validHandle, 4096, PROT_READ, 0, 0, &ptr, &map_fd); in TEST_F() 124 EXPECT_EQ(-EBADF, ion_map(-1, m_validHandle, 4096, PROT_READ, 0, 0, &ptr, &map_fd)); in TEST_F() 126 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, 0, 4096, PROT_READ, 0, 0, &ptr, &map_fd)); in TEST_F() 128 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, m_badHandle, 4096, PROT_READ, 0, 0, &ptr, &map_fd)); in TEST_F() 130 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, m_validHandle, 0, PROT_READ, 0, 0, &ptr, &map_fd)); in TEST_F() 134 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, m_validHandle, 4096, PROT_READ, 0, -1, &ptr, &map_fd)); in TEST_F() 136 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, m_validHandle, 4096, PROT_READ, 0, 0, NULL, &map_fd)); in TEST_F() 138 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, m_validHandle, 4096, PROT_READ, 0, 0, &ptr, NULL)); in TEST_F()
|
D | map_test.cpp | 42 …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()
|
D | exit_test.cpp | 102 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()
|
D | device_test.cpp | 149 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 …]
|
D | formerly_valid_handle_test.cpp | 55 ASSERT_EQ(-EINVAL, ion_map(m_ionFd, m_handle, 4096, PROT_READ, 0, 0, &ptr, &map_fd)); in TEST_F()
|
/system/core/libunwindstack/tests/ |
D | MapInfoGetElfTest.cpp | 71 MapInfo info(nullptr, 0x1000, 0x2000, 0, PROT_READ, ""); in TEST_F() 80 MapInfo info(nullptr, 0x3000, 0x4000, 0, PROT_READ, ""); in TEST_F() 100 MapInfo info(nullptr, 0x8000, 0x9000, 0, PROT_READ, ""); in TEST_F() 114 MapInfo info(nullptr, 0x3000, 0x4000, 0, PROT_READ, ""); in TEST_F() 126 MapInfo info(nullptr, 0x2000, 0x3000, 0, PROT_READ, ""); in TEST_F() 142 MapInfo info(nullptr, 0x5000, 0x8000, 0, PROT_READ, ""); in TEST_F() 158 MapInfo info(nullptr, 0x1000, 0x1000, 0, PROT_READ, elf_.path); in TEST_F() 185 MapInfo info(nullptr, 0x1000, 0x2000, 0x100, PROT_READ, elf_.path); in TEST_F() 214 MapInfo info(nullptr, 0x1000, 0x2000, 0x2000, PROT_READ, elf_.path); in TEST_F() 244 MapInfo info(nullptr, 0x5000, 0x6000, 0x1000, PROT_READ, elf_.path); in TEST_F() [all …]
|
D | MapsTest.cpp | 49 maps.Add(0x1000, 0x2000, 0, PROT_READ, "fake_map", 0); in TEST() 58 ASSERT_EQ(PROT_READ, info->flags); in TEST() 67 maps.Add(0x1000, 0x2000, 0, PROT_READ, "fake_map", 0); in TEST() 78 ASSERT_EQ(PROT_READ, info->flags); in TEST() 90 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() 195 EXPECT_EQ(PROT_READ, info->flags); in TEST() 219 EXPECT_EQ(PROT_READ | PROT_WRITE | PROT_EXEC, info->flags); in TEST() [all …]
|
D | UnwinderTest.cpp | 64 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 …]
|
D | MapInfoCreateMemoryTest.cpp | 162 prev_info.flags = PROT_READ; in TEST_F() 259 MapInfo info(nullptr, 0x2000, 0x3000, 0, PROT_READ, ""); in TEST_F() 290 maps.Add(0x500, 0x600, 0, PROT_READ, "something_else", 0); in TEST_F() 291 maps.Add(0x1000, 0x2600, 0, PROT_READ, "/only/in/memory.so", 0); in TEST_F() 292 maps.Add(0x3000, 0x5000, 0x4000, PROT_READ | PROT_EXEC, "/only/in/memory.so", 0); in TEST_F() 330 maps.Add(0x500, 0x600, 0, PROT_READ, "something_else", 0); in TEST_F() 331 maps.Add(0x1000, 0x2000, 0, PROT_READ, "/only/in/memory.apk", 0); in TEST_F() 332 maps.Add(0x2000, 0x3000, 0x1000, PROT_READ | PROT_EXEC, "/only/in/memory.apk", 0); in TEST_F() 333 maps.Add(0x3000, 0x4000, 0xa000, PROT_READ, "/only/in/memory.apk", 0); in TEST_F() 334 maps.Add(0x4000, 0x5000, 0xb000, PROT_READ | PROT_EXEC, "/only/in/memory.apk", 0); in TEST_F() [all …]
|
D | MemoryRemoteTest.cpp | 113 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()
|
D | MemoryLocalTest.cpp | 73 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()
|
D | MapInfoGetLoadBiasTest.cpp | 53 map_info_.reset(new MapInfo(nullptr, 0x1000, 0x20000, 0, PROT_READ | PROT_WRITE, "")); in SetUp() 66 MapInfo info(nullptr, 0x1000, 0x2000, 0, PROT_READ, ""); in TEST_F()
|
/system/core/libunwindstack/ |
D | Global.cpp | 84 (info->flags & (PROT_READ | PROT_WRITE)) == (PROT_READ | PROT_WRITE)) { in FindAndReadVariable() 97 if (map_start == nullptr && (info->flags & PROT_READ) && info->offset == 0 && in FindAndReadVariable()
|
/system/core/base/ |
D | mapped_file_test.cpp | 34 auto m = android::base::MappedFile::FromFd(tf.fd, 3, 2, PROT_READ); in TEST() 46 auto m = android::base::MappedFile::FromFd(tf.fd, 4096, 0, PROT_READ); in TEST()
|
/system/core/libprocinfo/ |
D | process_map_test.cpp | 35 ASSERT_EQ(maps[0].flags, PROT_READ | PROT_WRITE); in TEST() 41 ASSERT_EQ(maps[876].flags, PROT_READ | PROT_EXEC); in TEST() 47 ASSERT_EQ(maps[1260].flags, PROT_READ); in TEST()
|
/system/core/debuggerd/libdebuggerd/test/ |
D | tombstone_test.cpp | 111 unwinder_mock_->MockAddMap(build_id_offset, 0x123456789abdf000UL, 0, PROT_READ, in TEST_F() 115 unwinder_mock_->MockAddMap(0x1234000, 0x1235000, 0, PROT_READ, "/system/lib/libfake.so", 0); in TEST_F() 149 unwinder_mock_->MockAddMap(0xa334000, 0xa335000, 0xf000, PROT_READ, "", 0); in TEST_F() 152 unwinder_mock_->MockAddMap(0xa634000, 0xa635000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, in TEST_F() 187 unwinder_mock_->MockAddMap(0xa634000, 0xa635000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, in TEST_F() 220 unwinder_mock_->MockAddMap(0xa634000, 0xa635000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, in TEST_F() 253 unwinder_mock_->MockAddMap(0xa634000, 0xa635000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, in TEST_F() 284 unwinder_mock_->MockAddMap(0xa634000, 0xa635000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, in TEST_F()
|
/system/core/libbacktrace/ |
D | BacktracePtrace.cpp | 56 if (!BacktraceMap::IsValid(map) || !(map.flags & PROT_READ)) { in ReadWord() 71 if (!BacktraceMap::IsValid(map) || !(map.flags & PROT_READ)) { in Read()
|
/system/bt/osi/test/ |
D | wakelock_test.cc | 104 mmap(nullptr, lock_stat.st_size, PROT_READ, MAP_PRIVATE, lock_fd, 0); in IsFileWakeLockAcquired() 106 void* unlock_file = mmap(nullptr, unlock_stat.st_size, PROT_READ, in IsFileWakeLockAcquired()
|
/system/extras/kexec_tools/ |
D | kexecload.c | 133 … atag_buffer = (char *) mmap(NULL, atag_size, PROT_READ, MAP_POPULATE | MAP_PRIVATE, atag_file, 0); in main() 134 …zimage_buffer = (char *) mmap(NULL, zimage_size, PROT_READ, MAP_POPULATE | MAP_PRIVATE, zimage_fil… in main()
|
/system/libhidl/transport/memory/1.0/default/ |
D | AshmemMapper.cpp | 49 void* data = mmap(0, mem.size(), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); in mapMemory()
|
/system/core/base/include/android-base/ |
D | mapped_file.h | 28 #define PROT_READ 1 macro
|
/system/core/libbacktrace/include/backtrace/ |
D | BacktraceMap.h | 25 #define PROT_READ 0x1 macro 137 bool IsReadable(uint64_t pc) { return GetFlags(pc) & PROT_READ; } in IsReadable()
|