Home
last modified time | relevance | path

Searched refs:PROT_WRITE (Results 1 – 25 of 68) 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/libunwindstack/tests/
DUnwinderTest.cpp64 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 …]
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.cpp34 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()
198 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/core/libprocinfo/
Dprocess_map_test.cpp40 ASSERT_EQ(maps[0].flags, PROT_READ | PROT_WRITE); 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()
175 expected_info.emplace_back(0xf0000, 0x100000, PROT_WRITE, 3, 102, "/lib/libsomething2.so"); in TEST()
/system/core/libunwindstack/
DGlobal.cpp80 if (info->offset != 0 && (info->flags & (PROT_READ | PROT_WRITE)) == (PROT_READ | PROT_WRITE) && in FindAndReadVariable()
/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/core/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/libdmabufheap/tests/
Ddmabuf_heap_test.cpp105 ptr = mmap(NULL, kAllocSizeInBytes, PROT_WRITE, 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()
Ddmabuf_heap_test.c72 ptr = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in libdmabufheaptest()
/system/memory/libmemunreachable/
DProcessMappings.cpp36 mappings_.emplace_back(start, end, flags & PROT_READ, 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.cpp139 PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_SHARED, -1, 0); in init_state_sync_obj()
196 ptr = mmap(NULL, data->step_size, PROT_READ | PROT_WRITE, in add_pressure()
231 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()

123