/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/core/libunwindstack/tests/ |
D | LocalUpdatableMapsTest.cpp | 64 EXPECT_EQ(PROT_READ | PROT_EXEC, map_info->flags); in SetUp() 72 EXPECT_EQ(PROT_READ | PROT_EXEC, map_info->flags); in SetUp() 93 EXPECT_EQ(PROT_READ | PROT_EXEC, map_info->flags); in TEST_F() 101 EXPECT_EQ(PROT_READ | PROT_EXEC, map_info->flags); in TEST_F() 121 EXPECT_EQ(PROT_READ | PROT_WRITE | PROT_EXEC, map_info->flags); in TEST_F() 129 EXPECT_EQ(PROT_READ | PROT_EXEC, map_info->flags); in TEST_F() 139 EXPECT_EQ(PROT_READ | PROT_EXEC, map_info->flags); in TEST_F() 159 EXPECT_EQ(PROT_READ | PROT_EXEC, map_info->flags); in TEST_F() 167 EXPECT_EQ(PROT_READ | PROT_EXEC, map_info->flags); in TEST_F() 177 EXPECT_EQ(PROT_READ | PROT_EXEC, map_info->flags); in TEST_F() [all …]
|
D | MapInfoGetElfTest.cpp | 71 MapInfo info(nullptr, nullptr, 0x1000, 0x2000, 0, PROT_READ, ""); in TEST_F() 80 MapInfo info(nullptr, nullptr, 0x3000, 0x4000, 0, PROT_READ, ""); in TEST_F() 100 MapInfo info(nullptr, nullptr, 0x8000, 0x9000, 0, PROT_READ, ""); in TEST_F() 114 MapInfo info(nullptr, nullptr, 0x3000, 0x4000, 0, PROT_READ, ""); in TEST_F() 126 MapInfo info(nullptr, nullptr, 0x2000, 0x3000, 0, PROT_READ, ""); in TEST_F() 142 MapInfo info(nullptr, nullptr, 0x5000, 0x8000, 0, PROT_READ, ""); in TEST_F() 158 MapInfo info(nullptr, nullptr, 0x1000, 0x1000, 0, PROT_READ, elf_.path); in TEST_F() 185 MapInfo info(nullptr, nullptr, 0x1000, 0x2000, 0x100, PROT_READ, elf_.path); in TEST_F() 214 MapInfo info(nullptr, nullptr, 0x1000, 0x2000, 0x2000, PROT_READ, elf_.path); in TEST_F() 244 MapInfo info(nullptr, 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 SetUpTestSuite() 66 AddMapInfo(0x10000, 0x12000, 0, PROT_READ | PROT_WRITE, "[stack]"); in SetUpTestSuite() 68 AddMapInfo(0x13000, 0x15000, 0, PROT_READ | PROT_WRITE | MAPS_FLAGS_DEVICE_MAP, in SetUpTestSuite() 73 AddMapInfo(0x20000, 0x22000, 0, PROT_READ | PROT_WRITE, "/system/fake/libunwind.so", elf); in SetUpTestSuite() 77 AddMapInfo(0x23000, 0x24000, 0, PROT_READ | PROT_WRITE, "/fake/libanother.so", elf); in SetUpTestSuite() 81 AddMapInfo(0x33000, 0x34000, 0, PROT_READ | PROT_WRITE, "/fake/compressed.so", elf); in SetUpTestSuite() 87 AddMapInfo(0x43000, 0x44000, 0x1d000, PROT_READ | PROT_WRITE, "/fake/fake.apk", elf); in SetUpTestSuite() 92 AddMapInfo(0x53000, 0x54000, 0, PROT_READ | PROT_WRITE, "/fake/fake.oat"); in SetUpTestSuite() 94 AddMapInfo(0xa3000, 0xa4000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, "/fake/fake.vdex"); in SetUpTestSuite() 101 AddMapInfo(0xa5000, 0xa6000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, "/fake/fake_load_bias.so", in SetUpTestSuite() [all …]
|
D | MapInfoCreateMemoryTest.cpp | 157 prev_info.flags = PROT_READ; in TEST_F() 254 MapInfo info(nullptr, nullptr, 0x2000, 0x3000, 0, PROT_READ, ""); in TEST_F() 285 maps.Add(0x500, 0x600, 0, PROT_READ, "something_else", 0); in TEST_F() 286 maps.Add(0x1000, 0x2600, 0, PROT_READ, "/only/in/memory.so", 0); in TEST_F() 287 maps.Add(0x3000, 0x5000, 0x4000, PROT_READ | PROT_EXEC, "/only/in/memory.so", 0); in TEST_F() 325 maps.Add(0x500, 0x600, 0, PROT_READ, "something_else", 0); in TEST_F() 326 maps.Add(0x1000, 0x2000, 0, PROT_READ, "/only/in/memory.apk", 0); in TEST_F() 327 maps.Add(0x2000, 0x3000, 0x1000, PROT_READ | PROT_EXEC, "/only/in/memory.apk", 0); in TEST_F() 328 maps.Add(0x3000, 0x4000, 0xa000, PROT_READ, "/only/in/memory.apk", 0); in TEST_F() 329 maps.Add(0x4000, 0x5000, 0xb000, PROT_READ | PROT_EXEC, "/only/in/memory.apk", 0); in TEST_F() [all …]
|
D | MapInfoGetBuildIDTest.cpp | 54 new MapInfo(nullptr, nullptr, 0x1000, 0x20000, 0, PROT_READ | PROT_WRITE, tf_->path)); in SetUp() 68 MapInfo info(nullptr, nullptr, 0x1000, 0x2000, 0, PROT_READ, ""); in TEST_F() 198 MapInfo map_info(nullptr, nullptr, 0x1000, 0x20000, 0, PROT_READ | PROT_WRITE, in TEST_F()
|
D | MemoryRemoteTest.cpp | 96 mmap(nullptr, 4 * getpagesize(), PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0)); in TEST() 140 void* src = mmap(nullptr, pagesize * 2, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE,-1, 0); in TEST() 221 mmap(nullptr, 3 * getpagesize(), PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); in TEST() 256 mmap(nullptr, 3 * getpagesize(), PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); in TEST() 294 mmap(nullptr, 2 * getpagesize(), PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); in TEST()
|
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, nullptr, 0x1000, 0x20000, 0, PROT_READ | PROT_WRITE, "")); in SetUp() 66 MapInfo info(nullptr, nullptr, 0x1000, 0x2000, 0, PROT_READ, ""); in TEST_F()
|
/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/memory/libion/tests/ |
D | map_test.cpp | 40 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 61 ptr = (unsigned char*)mmap(NULL, getpagesize() * 2, PROT_READ | PROT_WRITE, MAP_SHARED, in TEST_F() 70 ptr = (unsigned char*)mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, in TEST_F() 94 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 119 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
|
D | exit_test.cpp | 88 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 112 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 139 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 164 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 192 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 218 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
|
/system/core/libprocinfo/ |
D | process_map_test.cpp | 40 ASSERT_EQ(maps[0].flags, PROT_READ | PROT_WRITE); in TEST() 46 ASSERT_EQ(maps[876].flags, PROT_READ | PROT_EXEC); in TEST() 52 ASSERT_EQ(maps[1260].flags, PROT_READ); in TEST() 148 expected_info.emplace_back(0x12c00000, 0x2ac00000, PROT_READ | PROT_WRITE, 0x100, 10267643, in TEST() 157 expected_info.emplace_back(0x12c00000, 0x2ac00000, PROT_READ | PROT_WRITE, 0x100, 10267643, in TEST() 166 expected_info.emplace_back(0xa0000, 0xc0000, PROT_READ | PROT_WRITE | PROT_EXEC, 0xb00, 101, ""); in TEST() 173 expected_info.emplace_back(0xa0000, 0xc0000, PROT_READ | PROT_WRITE | PROT_EXEC, 1, 100, ""); in TEST() 174 expected_info.emplace_back(0xd0000, 0xe0000, PROT_READ, 2, 101, "/lib/libsomething1.so"); in TEST() 194 expected_info.emplace_back(start, start + 0x1000, PROT_READ, i, 1000 + i, "fake.so"); in TEST()
|
/system/libbase/ |
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/debuggerd/libdebuggerd/test/ |
D | tombstone_test.cpp | 117 unwinder_mock_->MockAddMap(build_id_offset, 0x123456789abdf000UL, 0, PROT_READ, in TEST_F() 121 unwinder_mock_->MockAddMap(0x1234000, 0x1235000, 0, PROT_READ, "/system/lib/libfake.so", 0); in TEST_F() 155 unwinder_mock_->MockAddMap(0xa334000, 0xa335000, 0xf000, PROT_READ, "", 0); in TEST_F() 158 unwinder_mock_->MockAddMap(0xa634000, 0xa635000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, in TEST_F() 193 unwinder_mock_->MockAddMap(0xa634000, 0xa635000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, in TEST_F() 226 unwinder_mock_->MockAddMap(0xa634000, 0xa635000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, in TEST_F() 259 unwinder_mock_->MockAddMap(0xa634000, 0xa635000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, in TEST_F() 290 unwinder_mock_->MockAddMap(0xa634000, 0xa635000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, in TEST_F()
|
/system/core/libunwindstack/ |
D | Global.cpp | 80 if (info->offset != 0 && (info->flags & (PROT_READ | PROT_WRITE)) == (PROT_READ | PROT_WRITE) && in FindAndReadVariable()
|
/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/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/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/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/extras/memory_replay/ |
D | File.cpp | 81 mmap(nullptr, sizeof(size_t), PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_SHARED, -1, 0); in GetUnwindInfo() 125 mem = mmap(nullptr, *num_entries * sizeof(AllocEntry), PROT_READ | PROT_WRITE, in GetUnwindInfo()
|
/system/core/libbacktrace/include/backtrace/ |
D | BacktraceMap.h | 25 #define PROT_READ 0x1 macro 135 bool IsReadable(uint64_t pc) { return GetFlags(pc) & PROT_READ; } in IsReadable()
|
/system/memory/libdmabufheap/tests/ |
D | dmabuf_heap_test.cpp | 128 ptr = mmap(NULL, kAllocSizeInBytes, PROT_READ, MAP_SHARED, map_fd, 0); in TEST_F() 151 ptr = mmap(NULL, kAllocSizeInBytes, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 240 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
|