Home
last modified time | relevance | path

Searched refs:prot (Results 1 – 25 of 27) sorted by relevance

12

/system/libbase/
Dmapped_file.cpp39 int prot) { in FromFd() argument
41 return FromOsHandle(reinterpret_cast<HANDLE>(_get_osfhandle(fd.get())), offset, length, prot); in FromFd()
43 return FromOsHandle(fd.get(), offset, length, prot); in FromFd()
48 int prot) { in FromOsHandle() argument
56 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()
75 void* base = mmap(nullptr, file_length, prot, MAP_SHARED, h, file_offset); in FromOsHandle()
Dabi_compatibility.cpp72 int prot) { in MAPPEDFILE_FROMFD() argument
73 return MappedFile::FromFd(fd, offset, length, prot); in MAPPEDFILE_FROMFD()
/system/memory/libion/
Dion_test.c34 int prot = PROT_READ | PROT_WRITE; variable
83 ret = ion_map(fd, handle, len, prot, map_flags, 0, &ptr, &map_fd); in ion_map_test()
110 ret = ion_map(fd, handle, len, prot, flags, 0, &ptr, &map_fd); in ion_map_test()
144 ptr = mmap(NULL, len, prot, map_flags, share_fd, 0); in ion_share_test()
201 ptr = mmap(NULL, len, prot, map_flags, recv_fd, 0); in ion_share_test()
251 prot = 0; in main()
252 prot |= strstr(optarg, "MAP_PRIVATE") ? MAP_PRIVATE : 0; in main()
253 prot |= strstr(optarg, "MAP_SHARED") ? MAP_SHARED : 0; in main()
273 " alloc_flags %d\n", test, len, align, map_flags, prot, in main()
Dion.c113 int ion_map(int fd, ion_user_handle_t handle, size_t length, int prot, int flags, off_t offset, in ion_map() argument
131 tmp_ptr = mmap(NULL, length, prot, flags, data.fd, offset); in ion_map()
/system/extras/ioshark/
Dioshark_bench_mmap.c106 mmap_do_io(void *db_node, int prot, off_t offset, size_t len, in mmap_do_io() argument
113 if (!(prot & IOSHARK_PROT_WRITE)) { in mmap_do_io()
172 int prot = file_op->mmap_prot; in ioshark_handle_mmap() local
188 mmap_do_io(db_node, prot, offset, len, in ioshark_handle_mmap()
198 mmap_do_io(db_node, prot, offset, len, bufp, buflen, in ioshark_handle_mmap()
Dioshark.h104 #define mmap_prot u.mmap_a.prot
108 u_int32_t prot; member
Dcompile_ioshark.c244 get_mmap_offset_len_prot(char *buf, int *prot, off_t *offset, u_int64_t *len) in get_mmap_offset_len_prot() argument
273 *prot = 0; in get_mmap_offset_len_prot()
275 *prot |= IOSHARK_PROT_READ; in get_mmap_offset_len_prot()
277 *prot |= IOSHARK_PROT_WRITE; in get_mmap_offset_len_prot()
Dconvert_format.c62 #define mmap_prot_old u.mmap_a.prot
66 int prot; member
DREADME90 #define mmap_prot u.mmap_a.prot
94 int32_t prot;
/system/extras/simpleperf/
Denvironment.h54 uint32_t prot; member
56 ThreadMmap(uint64_t start, uint64_t len, uint64_t pgoff, const char* name, uint32_t prot) in ThreadMmap()
57 : start_addr(start), len(len), pgoff(pgoff), name(name), prot(prot) {} in ThreadMmap()
Dcmd_record.cpp1242 if (!(map.prot & PROT_EXEC) && !event_selection_set_.RecordNotExecutableMaps()) { in DumpProcessMaps()
1246 map.pgoff, map.prot, map.name, event_id, last_record_timestamp_); in DumpProcessMaps()
1419 map.pgoff, map.prot, map.name, attr_id.ids[0], timestamp); in ProcessJITDebugInfo()
1463 void UpdateMmapRecordForEmbeddedPath(RecordType& r, bool has_prot, uint32_t prot) { in UpdateMmapRecordForEmbeddedPath() argument
1475 if (r.data->pgoff != 0 && (!has_prot || (prot & PROT_EXEC))) { in UpdateMmapRecordForEmbeddedPath()
1512 UpdateMmapRecordForEmbeddedPath(*r, true, r->data->prot); in UpdateRecord()
Drecord.h304 uint32_t prot, flags; member
311 uint64_t addr, uint64_t len, uint64_t pgoff, uint32_t prot,
Drecord.cpp273 uint64_t addr, uint64_t len, uint64_t pgoff, uint32_t prot, in Mmap2Record() argument
284 data.prot = prot; in Mmap2Record()
312 PrintIndented(indent, "prot %u, flags %u, filename %s\n", data->prot, in DumpData()
/system/core/libcutils/
Dashmem_test.cpp32 void TestCreateRegion(size_t size, unique_fd &fd, int prot) { in TestCreateRegion() argument
37 ASSERT_EQ(0, ashmem_set_prot_region(fd, prot)); in TestCreateRegion()
40 void TestMmap(const unique_fd& fd, size_t size, int prot, void** region, off_t off = 0) { in TestMmap() argument
43 *region = mmap(nullptr, size, prot, MAP_SHARED, fd, off); in TestMmap()
47 void TestProtDenied(const unique_fd &fd, size_t size, int prot) { in TestProtDenied() argument
50 EXPECT_EQ(MAP_FAILED, mmap(nullptr, size, prot, MAP_SHARED, fd, 0)); in TestProtDenied()
53 void TestProtIs(const unique_fd& fd, int prot) { in TestProtIs() argument
56 EXPECT_EQ(prot, ioctl(fd, ASHMEM_GET_PROT_MASK)); in TestProtIs()
Dashmem-dev.cpp395 static int memfd_set_prot_region(int fd, int prot) { in memfd_set_prot_region() argument
397 if (prot & PROT_WRITE) { in memfd_set_prot_region()
402 ALOGE("memfd_set_prot_region(%d, %d): F_SEAL_FUTURE_WRITE seal failed: %s\n", fd, prot, in memfd_set_prot_region()
410 int ashmem_set_prot_region(int fd, int prot) in ashmem_set_prot_region() argument
413 return memfd_set_prot_region(fd, prot); in ashmem_set_prot_region()
416 return __ashmem_check_failure(fd, TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_SET_PROT_MASK, prot))); in ashmem_set_prot_region()
/system/libbase/include/android-base/
Dmapped_file.h51 int prot);
57 int prot);
/system/core/libutils/include/utils/
DCompat.h32 static inline void* mmap64(void* addr, size_t length, int prot, int flags, int fd, off64_t offset) { in mmap64() argument
33 return mmap(addr, length, prot, flags, fd, offset); in mmap64()
/system/memory/libmemunreachable/
DPtracerThread.cpp43 int prot = PROT_READ | PROT_WRITE; in Stack() local
47 base_ = mmap(NULL, size_, prot, flags, -1, 0); in Stack()
DAllocator.cpp120 const int prot = PROT_READ | PROT_WRITE; in MapAligned() local
131 void* ptr = mmap(NULL, map_size, prot, flags, -1, 0); in MapAligned()
/system/core/libcutils/include/cutils/
Dashmem.h31 int ashmem_set_prot_region(int fd, int prot);
/system/core/libcutils/include_vndk/cutils/
Dashmem.h31 int ashmem_set_prot_region(int fd, int prot);
/system/libartpalette/
Dpalette_android.cc220 enum PaletteStatus PaletteAshmemSetProtRegion(int fd, int prot) { in PaletteAshmemSetProtRegion() argument
222 if (ashmem_set_prot_region(fd, prot) < 0) { in PaletteAshmemSetProtRegion()
225 } else if (TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_SET_PROT_MASK, prot)) < 0) { in PaletteAshmemSetProtRegion()
Dpalette_fake.cc85 enum PaletteStatus PaletteAshmemSetProtRegion(int fd ATTRIBUTE_UNUSED, int prot ATTRIBUTE_UNUSED) { in PaletteAshmemSetProtRegion()
/system/core/libutils/
DFileMap.cpp199 int prot = PROT_READ; in create()
200 if (!readOnly) prot |= PROT_WRITE; in create()
202 void* ptr = mmap64(nullptr, adjLength, prot, flags, fd, adjOffset); in create()
/system/memory/libion/include/ion/
Dion.h39 int ion_map(int fd, ion_user_handle_t handle, size_t length, int prot,

12