Home
last modified time | relevance | path

Searched refs:PROT_READ (Results 1 – 25 of 102) sorted by relevance

12345

/system/core/libcutils/
Dashmem_test.cpp76 ASSERT_NO_FATAL_FAILURE(TestCreateRegion(size, fd, PROT_READ | PROT_WRITE)); in TEST()
79 ASSERT_NO_FATAL_FAILURE(TestMmap(fd, size, PROT_READ | PROT_WRITE, &region1)); in TEST()
87 ASSERT_NO_FATAL_FAILURE(TestMmap(fd, size, PROT_READ, &region2)); in TEST()
98 ASSERT_NO_FATAL_FAILURE(TestCreateRegion(size, fd, PROT_READ | PROT_WRITE)); in TEST()
101 ASSERT_NO_FATAL_FAILURE(TestMmap(fd, size, PROT_READ | PROT_WRITE, &region1)); in TEST()
112 void* region2 = mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in TEST()
127 ASSERT_NO_FATAL_FAILURE(TestMmap(fd, size, PROT_READ | PROT_WRITE, &region2)); in TEST()
140 ASSERT_NO_FATAL_FAILURE(TestCreateRegion(size, fd, PROT_READ | PROT_WRITE)); in TEST()
141 ASSERT_NO_FATAL_FAILURE(TestMmap(fd, dataSize, PROT_READ | PROT_WRITE, &region, holeSize)); in TEST()
195 ASSERT_NO_FATAL_FAILURE(TestCreateRegion(size, fd, PROT_READ)); in TEST()
[all …]
/system/unwinding/libunwindstack/tests/
DLocalUpdatableMapsTest.cpp64 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 …]
DMapsTest.cpp49 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 …]
DUnwinderTest.cpp74 AddMapInfo(0x1000, 0x8000, 0, PROT_READ | PROT_WRITE, "/system/fake/libc.so", elf); in SetUpTestSuite()
76 AddMapInfo(0x10000, 0x12000, 0, PROT_READ | PROT_WRITE, "[stack]"); in SetUpTestSuite()
78 AddMapInfo(0x13000, 0x15000, 0, PROT_READ | PROT_WRITE | MAPS_FLAGS_DEVICE_MAP, in SetUpTestSuite()
83 AddMapInfo(0x20000, 0x22000, 0, PROT_READ | PROT_WRITE, "/system/fake/libunwind.so", elf); in SetUpTestSuite()
87 AddMapInfo(0x23000, 0x24000, 0, PROT_READ | PROT_WRITE, "/fake/libanother.so", elf); in SetUpTestSuite()
91 AddMapInfo(0x33000, 0x34000, 0, PROT_READ | PROT_WRITE, "/fake/compressed.so", elf); in SetUpTestSuite()
97 map_info = AddMapInfo(0x43000, 0x44000, 0x1d000, PROT_READ | PROT_WRITE, "/fake/fake.apk", elf); in SetUpTestSuite()
100 AddMapInfo(0x53000, 0x54000, 0, PROT_READ | PROT_WRITE, "/fake/fake.oat"); in SetUpTestSuite()
103 AddMapInfo(0xa3000, 0xa4000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, "/fake/fake.vdex"); in SetUpTestSuite()
109 AddMapInfo(0xa5000, 0xa6000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, "/fake/fake_load_bias.so", in SetUpTestSuite()
[all …]
DMapInfoGetElfTest.cpp73 MapInfo info(nullptr, nullptr, 0x1000, 0x2000, 0, PROT_READ, ""); in TEST_F()
82 MapInfo info(nullptr, nullptr, 0x3000, 0x4000, 0, PROT_READ, ""); in TEST_F()
102 MapInfo info(nullptr, nullptr, 0x8000, 0x9000, 0, PROT_READ, ""); in TEST_F()
116 MapInfo info(nullptr, nullptr, 0x3000, 0x4000, 0, PROT_READ, ""); in TEST_F()
128 MapInfo info(nullptr, nullptr, 0x2000, 0x3000, 0, PROT_READ, ""); in TEST_F()
144 MapInfo info(nullptr, nullptr, 0x5000, 0x8000, 0, PROT_READ, ""); in TEST_F()
160 MapInfo info(nullptr, nullptr, 0x1000, 0x1000, 0, PROT_READ, elf_.path); in TEST_F()
187 MapInfo info(nullptr, nullptr, 0x1000, 0x2000, 0x100, PROT_READ, elf_.path); in TEST_F()
216 MapInfo info(nullptr, nullptr, 0x1000, 0x2000, 0x2000, PROT_READ, elf_.path); in TEST_F()
246 MapInfo info(nullptr, nullptr, 0x5000, 0x6000, 0x1000, PROT_READ, elf_.path); in TEST_F()
[all …]
DMapInfoCreateMemoryTest.cpp157 prev_info.set_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 …]
DMapInfoGetBuildIDTest.cpp54 new MapInfo(nullptr, nullptr, 0x1000, 0x20000, 0, PROT_READ | PROT_WRITE, tf_->path)); in SetUp()
70 MapInfo info(nullptr, nullptr, 0x1000, 0x2000, 0, PROT_READ, ""); in TEST_F()
200 MapInfo map_info(nullptr, nullptr, 0x1000, 0x20000, 0, PROT_READ | PROT_WRITE, in TEST_F()
DMemoryRemoteTest.cpp96 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()
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/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()
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/
Dcrash_dump.policy.def46 Define the values of PROT_READ and PROT_WRITE ourselves to maintain backwards compatibility.
48 #define PROT_READ 0x1
53 mprotect: arg2 in PROT_READ|PROT_WRITE
59 mmap: arg2 in PROT_READ|PROT_WRITE
63 mmap2: arg2 in PROT_READ|PROT_WRITE
/system/incremental_delivery/incfs/tests/
Dhardening_benchmark.cpp37 auto mapping = android::base::MappedFile::FromFd(tmp->fd, 0, 1, PROT_READ); in makeEmptyFileMapping()
52 auto mapping = android::base::MappedFile::FromFd(tmp->fd, 0, 1, PROT_READ); in TestSignal()
100 auto mapping = android::base::MappedFile::FromFd(tmp->fd, 0, 1, PROT_READ); in TestAccess()
110 auto mapping = android::base::MappedFile::FromFd(tmp->fd, 0, 1, PROT_READ); in TestAccessFast()
122 auto mapping = android::base::MappedFile::FromFd(tmp->fd, 0, 1, PROT_READ); in TestAccessVal()
132 auto mapping = android::base::MappedFile::FromFd(tmp->fd, 0, 1, PROT_READ); in TestAccessNested()
144 auto mapping = android::base::MappedFile::FromFd(tmp->fd, 0, 1, PROT_READ); in TestAccessDoubleNested()
/system/libprocinfo/
Dprocess_map_test.cpp38 ASSERT_EQ(maps[0].flags, PROT_READ | PROT_WRITE); in TEST()
44 ASSERT_EQ(maps[876].flags, PROT_READ | PROT_EXEC); in TEST()
50 ASSERT_EQ(maps[1260].flags, PROT_READ); in TEST()
147 expected_info.emplace_back(0x12c00000, 0x2ac00000, PROT_READ | PROT_WRITE, 0x100, 10267643, in TEST()
156 expected_info.emplace_back(0x12c00000, 0x2ac00000, PROT_READ | PROT_WRITE, 0x100, 10267643, in TEST()
165 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()
175 expected_info.emplace_back(0xd0000, 0xe0000, PROT_READ, 2, 101, "/lib/libsomething1.so", false); in TEST()
179 expected_info.emplace_back(0x130000, 0x140000, PROT_READ, 5, 104, "/lib/libsomething3.so", true); in TEST()
198 expected_info.emplace_back(start, start + 0x1000, PROT_READ, i, 1000 + i, "fake.so", false); in TEST()
/system/memory/libion/tests/
Dmap_test.cpp40 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()
Dexit_test.cpp88 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/libbase/
Dmapped_file_test.cpp34 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/
Dtombstone_test.cpp117 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/unwinding/libunwindstack/
DGlobal.cpp81 (info->flags() & (PROT_READ | PROT_WRITE)) == (PROT_READ | PROT_WRITE) && in FindAndReadVariable()
/system/unwinding/libbacktrace/
DBacktracePtrace.cpp56 if (!BacktraceMap::IsValid(map) || !(map.flags & PROT_READ)) { in ReadWord()
71 if (!BacktraceMap::IsValid(map) || !(map.flags & PROT_READ)) { in Read()
/system/memory/libdmabufheap/tests/
Ddmabuf_heap_test.cpp41 void* ptr = mmap(NULL, kAllocSizeInBytes, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in DoAlloc()
206 void* ptr = mmap(NULL, kAllocSizeInBytes, PROT_READ, MAP_SHARED, map_fd, 0); in TEST_F()
228 void* ptr = mmap(NULL, kAllocSizeInBytes, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
263 void* ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
316 void* ptr = mmap(NULL, kAllocSizeInBytes, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
/system/bt/osi/test/
Dwakelock_test.cc104 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/
Dkexecload.c126 atag_buffer = (char*)mmap(NULL, atag_size, PROT_READ, MAP_POPULATE | MAP_PRIVATE, atag_file, 0); in main()
128 (char*)mmap(NULL, zimage_size, PROT_READ, MAP_POPULATE | MAP_PRIVATE, zimage_file, 0); 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/extras/memory_replay/
DFile.cpp81 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/memory/libmeminfo/
Dlibmeminfo_test.cpp142 void* ptr = mmap(nullptr, pagesize * (kNumPages + 2), PROT_READ | PROT_WRITE, in TEST()
383 EXPECT_EQ(vmas[0].flags, PROT_READ | PROT_EXEC); in TEST()
384 EXPECT_EQ(vmas[1].flags, PROT_READ | PROT_WRITE); in TEST()
385 EXPECT_EQ(vmas[2].flags, PROT_READ | PROT_WRITE); in TEST()
386 EXPECT_EQ(vmas[3].flags, PROT_READ | PROT_EXEC); in TEST()
387 EXPECT_EQ(vmas[4].flags, PROT_READ | PROT_EXEC); in TEST()
388 EXPECT_EQ(vmas[5].flags, PROT_READ | PROT_EXEC); in TEST()
527 EXPECT_EQ(vmas[0].flags, PROT_READ | PROT_EXEC); in TEST()
528 EXPECT_EQ(vmas[1].flags, PROT_READ | PROT_WRITE); in TEST()
529 EXPECT_EQ(vmas[2].flags, PROT_READ | PROT_WRITE); in TEST()
[all …]

12345