Home
last modified time | relevance | path

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

123

/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()
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()
196 TestProtDenied(fd, size, PROT_WRITE); in TEST()
201 ASSERT_NO_FATAL_FAILURE(TestCreateRegion(size, fd, PROT_WRITE)); in TEST()
[all …]
/system/core/debuggerd/seccomp_policy/
Dcrash_dump.policy.def46 Define the values of PROT_READ and PROT_WRITE ourselves to maintain backwards compatibility.
49 #define PROT_WRITE 0x2
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/unwinding/libunwindstack/tests/
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 …]
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.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()
DMemoryMteTest.cpp35 reinterpret_cast<uintptr_t>(mmap(nullptr, getpagesize(), PROT_READ | PROT_WRITE | PROT_MTE, in CreateTagMapping()
DMapInfoGetBuildIDTest.cpp54 new MapInfo(nullptr, nullptr, 0x1000, 0x20000, 0, PROT_READ | PROT_WRITE, tf_->path)); in SetUp()
200 MapInfo map_info(nullptr, nullptr, 0x1000, 0x20000, 0, PROT_READ | PROT_WRITE, in TEST_F()
/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/core/debuggerd/libdebuggerd/test/
Dtombstone_test.cpp156 unwinder_mock_->MockAddMap(0xa434000, 0xa435000, 0x1000, PROT_WRITE, "", 0xd000); in TEST_F()
158 unwinder_mock_->MockAddMap(0xa634000, 0xa635000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, in TEST_F()
191 unwinder_mock_->MockAddMap(0xa434000, 0xa435000, 0x1000, PROT_WRITE, "", 0xd000); in TEST_F()
193 unwinder_mock_->MockAddMap(0xa634000, 0xa635000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, in TEST_F()
224 unwinder_mock_->MockAddMap(0xa434000, 0xa435000, 0x1000, PROT_WRITE, "", 0xd000); in TEST_F()
226 unwinder_mock_->MockAddMap(0xa634000, 0xa635000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, in TEST_F()
257 unwinder_mock_->MockAddMap(0xa434000, 0xa435000, 0x1000, PROT_WRITE, "", 0xd000); in TEST_F()
259 unwinder_mock_->MockAddMap(0xa634000, 0xa635000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, in TEST_F()
288 unwinder_mock_->MockAddMap(0xa434000, 0xa435000, 0x1000, PROT_WRITE, "", 0xd000); in TEST_F()
290 unwinder_mock_->MockAddMap(0xa634000, 0xa635000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, in TEST_F()
/system/libprocinfo/
Dprocess_map_test.cpp38 ASSERT_EQ(maps[0].flags, PROT_READ | PROT_WRITE); 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()
176 expected_info.emplace_back(0xf0000, 0x100000, PROT_WRITE, 3, 102, "/lib/libsomething2.so", false); in TEST()
/system/unwinding/libunwindstack/
DGlobal.cpp81 (info->flags() & (PROT_READ | PROT_WRITE)) == (PROT_READ | PROT_WRITE) && in FindAndReadVariable()
/system/memory/libdmabufheap/tests/
Ddmabuf_heap_test.cpp41 void* ptr = mmap(NULL, kAllocSizeInBytes, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in DoAlloc()
184 void* ptr = mmap(NULL, kAllocSizeInBytes, PROT_WRITE, 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/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/libbase/
Dmapped_file.cpp56 h, nullptr, (prot & PROT_WRITE) ? PAGE_READWRITE : PAGE_READONLY, 0, 0, nullptr); in FromOsHandle()
66 void* base = MapViewOfFile(handle, (prot & PROT_WRITE) ? FILE_MAP_ALL_ACCESS : FILE_MAP_READ, 0, in FromOsHandle()
/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/unwinding/libbacktrace/include/backtrace/
DBacktraceMap.h26 #define PROT_WRITE 0x2 macro
136 bool IsWritable(uint64_t pc) { return GetFlags(pc) & PROT_WRITE; } in IsWritable()
/system/memory/libmemunreachable/
DProcessMappings.cpp37 flags & PROT_WRITE, flags & PROT_EXEC, in operator ()()
/system/libbase/include/android-base/
Dmapped_file.h30 #define PROT_WRITE 2 macro
/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/memory/lmkd/tests/
Dlmkd_test.cpp140 PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_SHARED, -1, 0); in init_state_sync_obj()
197 ptr = mmap(NULL, data->step_size, PROT_READ | PROT_WRITE, in add_pressure()
232 PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_SHARED, -1, 0); in runMemStressTest()
/system/sepolicy/tools/sepolicy-analyze/
Dutils.c41 map = mmap(NULL, sb.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); in load_policy()
/system/extras/alloc-stress/
Dmem-pressure.cpp86 shared = (size_t*)mmap(NULL, sizeof(size_t), PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_SHARED, in main()

123