/aosp12/art/libartbase/base/ |
H A D | mem_map.h | 134 int prot, 142 int prot, in MapAnonymous() argument 148 prot, in MapAnonymous() 156 int prot, in MapAnonymous() argument 163 prot, in MapAnonymous() 181 int prot, in MapFile() argument 190 prot, in MapFile() 231 bool Protect(int prot); 330 int prot, 350 int prot, [all …]
|
H A D | mem_map.cc | 307 int prot, in MapAnonymous() argument 346 prot, in MapAnonymous() 363 prot, in MapAnonymous() 388 prot, in MapAnonymous() 492 CHECK_NE(0, prot); in MapFileAtAddress() 584 prot, in MapFileAtAddress() 859 bool MemMap::Protect(int prot) { in Protect() argument 861 prot_ = prot; in Protect() 867 prot_ = prot; in Protect() 1133 int prot, in MapInternal() argument [all …]
|
H A D | mem_map_fuchsia.cc | 61 void* MemMap::TargetMMap(void* start, size_t len, int prot, int flags, int fd, off_t fd_off) { in TargetMMap() argument 73 return mmap(start, len, prot, flags, fd, fd_off); in TargetMMap() 77 if ((prot & PROT_READ) != 0) { in TargetMMap() 80 if ((prot & PROT_WRITE) != 0) { in TargetMMap() 83 if ((prot & PROT_EXEC) != 0) { in TargetMMap()
|
H A D | mem_map_windows.cc | 45 void* MemMap::TargetMMap(void* start, size_t len, int prot, int flags, int fd, off_t fd_off) { in TargetMMap() argument 52 if ((prot != PROT_READ) && (prot != (PROT_READ | PROT_WRITE))) { in TargetMMap() 68 if ((prot & PROT_WRITE) != 0) { in TargetMMap()
|
H A D | mem_map_unix.cc | 27 void* MemMap::TargetMMap(void* start, size_t len, int prot, int flags, int fd, off_t fd_off) { in TargetMMap() argument 28 return mmap(start, len, prot, flags, fd, fd_off); in TargetMMap()
|
/aosp12/packages/modules/NeuralNetworks/common/ |
H A D | SharedMemoryAndroid.cpp | 51 GeneralResult<SharedMemory> createSharedMemoryFromUniqueFd(size_t size, int prot, in createSharedMemoryFromUniqueFd() argument 55 .prot = prot, in createSharedMemoryFromUniqueFd() 158 constexpr int prot = PROT_READ | PROT_WRITE; in allocateSharedMemory() local 160 return createSharedMemoryFromUniqueFd(size, prot, std::move(fd), offset); in allocateSharedMemory() 188 int prot; member 194 base::MappedFile::FromFd(memory.fd, memory.offset, memory.size, memory.prot); in map() 200 const bool writable = (memory.prot & PROT_WRITE) != 0; in map() 208 auto context = MmapFdMappingContext{.prot = memory.prot, .context = std::move(mapping)}; in map() 269 return createSharedMemoryFromUniqueFd(size, prot, NN_TRY(dupFd(fd)), offset); in createSharedMemoryFromFd() 312 const int prot = mmapFdMapping->prot; in flush() local [all …]
|
/aosp12/frameworks/base/core/java/android/os/ |
H A D | SharedMemory.java | 99 private static void validateProt(int prot) { in validateProt() argument 100 if ((prot & ~PROT_MASK) != 0) { in validateProt() 130 public boolean setProtect(int prot) { in setProtect() argument 132 validateProt(prot); in setProtect() 133 int errno = nSetProt(mFileDescriptor, prot); in setProtect() 216 public @NonNull ByteBuffer map(int prot, int offset, int length) throws ErrnoException { in map() argument 218 validateProt(prot); in map() 228 long address = Os.mmap(0, length, prot, OsConstants.MAP_SHARED, mFileDescriptor, offset); in map() 229 boolean readOnly = (prot & OsConstants.PROT_WRITE) == 0; in map() 382 private static native int nSetProt(FileDescriptor fd, int prot); in nSetProt() argument
|
/aosp12/hardware/broadcom/wlan/bcmdhd/dhdutil/include/proto/ |
H A D | bcmip.h | 108 uint8 prot; /* Protocol */ member 155 #define IPV6_EXTHDR(prot) (((prot) == IPV6_EXTHDR_HOP) || \ argument 156 ((prot) == IPV6_EXTHDR_ROUTING) || \ 157 ((prot) == IPV6_EXTHDR_FRAGMENT) || \ 158 ((prot) == IPV6_EXTHDR_AUTH) || \ 159 ((prot) == IPV6_EXTHDR_NONE) || \ 160 ((prot) == IPV6_EXTHDR_DEST))
|
/aosp12/system/libbase/ |
H A D | mapped_file.cpp | 39 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()
|
/aosp12/system/memory/libion/ |
H A D | ion_test.c | 34 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()
|
/aosp12/art/runtime/jit/ |
H A D | jit_scoped_code_cache_write.h | 45 int prot = region.HasDualCodeMapping() ? kProtRW : kProtRWX; in ScopedCodeCacheWrite() local 46 CheckedCall(mprotect, "Cache +W", updatable_pages->Begin(), updatable_pages->Size(), prot); in ScopedCodeCacheWrite() 56 int prot = region_.HasDualCodeMapping() ? kProtR : kProtRX; in ~ScopedCodeCacheWrite() local 57 CheckedCall(mprotect, "Cache -W", updatable_pages->Begin(), updatable_pages->Size(), prot); in ~ScopedCodeCacheWrite()
|
/aosp12/bionic/libc/bionic/ |
H A D | mmap.cpp | 44 void* mmap64(void* addr, size_t size, int prot, int flags, int fd, off64_t offset) { in mmap64() argument 61 void* result = __mmap2(addr, size, prot, flags, fd, offset >> MMAP2_SHIFT); in mmap64() 75 void* mmap(void* addr, size_t size, int prot, int flags, int fd, off_t offset) { in mmap() argument 76 return mmap64(addr, size, prot, flags, fd, static_cast<off64_t>(offset)); in mmap()
|
/aosp12/system/core/libcutils/ |
H A D | ashmem_test.cpp | 32 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() 45 void TestMmap(const unique_fd& fd, size_t size, int prot, void** region, off_t off = 0) { in TestMmap() argument 48 *region = mmap(nullptr, size, prot, MAP_SHARED, fd, off); in TestMmap() 52 void TestProtDenied(const unique_fd &fd, size_t size, int prot) { in TestProtDenied() argument 55 EXPECT_EQ(MAP_FAILED, mmap(nullptr, size, prot, MAP_SHARED, fd, 0)); in TestProtDenied() 58 void TestProtIs(const unique_fd& fd, int prot) { in TestProtIs() argument 61 EXPECT_EQ(prot, ioctl(fd, ASHMEM_GET_PROT_MASK)); in TestProtIs()
|
H A D | ashmem-dev.cpp | 402 static int memfd_set_prot_region(int fd, int prot) { in memfd_set_prot_region() argument 404 if (prot & PROT_WRITE) { in memfd_set_prot_region() 409 ALOGE("memfd_set_prot_region(%d, %d): F_SEAL_FUTURE_WRITE seal failed: %s\n", fd, prot, in memfd_set_prot_region() 417 int ashmem_set_prot_region(int fd, int prot) in ashmem_set_prot_region() argument 420 return memfd_set_prot_region(fd, prot); in ashmem_set_prot_region() 423 return __ashmem_check_failure(fd, TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_SET_PROT_MASK, prot))); in ashmem_set_prot_region()
|
/aosp12/bionic/linker/ |
H A D | linker_block_allocator.h | 51 void protect_all(int prot); 91 void protect_all(int prot) { block_allocator_.protect_all(prot); } in protect_all() argument
|
H A D | linker_block_allocator.cpp | 111 void LinkerBlockAllocator::protect_all(int prot) { in protect_all() argument 113 if (mprotect(page, kAllocateSize, prot) == -1) { in protect_all() 114 async_safe_fatal("mprotect(%p, %zu, %d) failed: %m", page, kAllocateSize, prot); in protect_all()
|
/aosp12/frameworks/av/media/codec2/vndk/ |
H A D | C2AllocatorIon.cpp | 194 int prot = PROT_NONE; in map() local 197 prot |= PROT_READ; in map() 200 prot |= PROT_WRITE; in map() 287 int prot, int flags, void** base, void** addr) { in mapInternal() argument 290 int ret = ion_map(mIonFd, mBuffer, mapSize, prot, in mapInternal() 294 mIonFd, mBuffer, mapSize, prot, flags, mapOffset, ret); in mapInternal() 303 *base = mmap(nullptr, mapSize, prot, flags, mMapFd, mapOffset); in mapInternal() 306 mapSize, prot, flags, mMapFd, mapOffset, errno); in mapInternal() 358 int prot, int flags, void** base, void** addr) { in mapInternal() argument 360 *base = mmap(nullptr, mapSize, prot, flags, mHandle.bufferFd(), mapOffset); in mapInternal() [all …]
|
H A D | C2DmaBufAllocator.cpp | 141 int prot, int flags, void** base, void** addr) { in mapInternal() argument 143 *base = mmap(nullptr, mapSize, prot, flags, mHandle.bufferFd(), mapOffset); in mapInternal() 146 mapSize, prot, flags, mHandle.bufferFd(), mapOffset, errno); in mapInternal() 185 int prot = PROT_NONE; in map() local 188 prot |= PROT_READ; in map() 191 prot |= PROT_WRITE; in map() 200 mapInternal(mapSize, mapOffset, alignmentBytes, prot, flags, &(map.addr), addr); in map()
|
/aosp12/bionic/libc/private/ |
H A D | WriteProtected.h | 76 void set_protection(int prot) { in set_protection() argument 83 if (mprotect(reinterpret_cast<void*>(addr), PAGE_SIZE, prot) == -1) { in set_protection() 84 async_safe_fatal("WriteProtected mprotect %x failed: %s", prot, strerror(errno)); in set_protection()
|
/aosp12/system/extras/ioshark/ |
H A D | ioshark_bench_mmap.c | 106 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()
|
/aosp12/bionic/tests/ |
H A D | utils.h | 121 char prot[5]; // sizeof("rwxp") in parse_maps() local 123 &record.addr_start, &record.addr_end, prot, &record.offset, in parse_maps() 126 if (prot[0] == 'r') { in parse_maps() 129 if (prot[1] == 'w') { in parse_maps() 132 if (prot[2] == 'x') { in parse_maps()
|
/aosp12/system/extras/simpleperf/ |
H A D | environment.h | 59 uint32_t prot; member 61 ThreadMmap(uint64_t start, uint64_t len, uint64_t pgoff, const char* name, uint32_t prot) in ThreadMmap() 62 : start_addr(start), len(len), pgoff(pgoff), name(name), prot(prot) {} in ThreadMmap()
|
/aosp12/hardware/google/graphics/common/libacryl/ |
H A D | acrylic.cpp | 119 bool prot = false; in validateAllLayers() local 173 prot = prot || layer->isProtected(); in validateAllLayers() 176 if (prot && !mCanvas.isProtected()) { in validateAllLayers()
|
/aosp12/art/runtime/ |
H A D | elf_file.cc | 67 int prot; in Open() local 70 prot = PROT_READ | PROT_WRITE; in Open() 73 prot = PROT_READ; in Open() 122 prot, in Setup() 142 prot, in Setup() 157 prot, in Setup() 1183 int prot = 0; in Load() local 1185 prot |= PROT_EXEC; in Load() 1188 prot |= PROT_WRITE; in Load() 1191 prot |= PROT_READ; in Load() [all …]
|
/aosp12/frameworks/compile/mclinker/lib/Support/Unix/ |
H A D | FileSystem.inc | 163 int prot, flag; 166 prot = PROT_READ; 170 prot = PROT_WRITE; 174 prot = PROT_READ | PROT_WRITE; 182 pMemBuffer = ::mmap(NULL, pLength, prot, flag, m_Handler, pStartOffset);
|