/external/crosvm/tests/ |
D | mini_plugin_template.c | 100 int mem_fd = syscall(SYS_memfd_create, "guest_mem", MFD_CLOEXEC | MFD_ALLOW_SEALING); in main() local 101 if (mem_fd < 0) {{ in main() 105 ret = ftruncate(mem_fd, mem_size); in main() 110 uint8_t *mem = mmap(NULL, mem_size, PROT_READ | PROT_WRITE, MAP_SHARED, mem_fd, 0); in main() 115 fcntl(mem_fd, F_ADD_SEALS, F_SEAL_SHRINK); in main() 119 ret = crosvm_create_memory(crosvm, mem_fd, 0, mem_size, 0, false, false, &mem_obj); in main()
|
D | plugin_dirty_log.c | 112 int mem_fd = syscall(SYS_memfd_create, "guest_mem", MFD_CLOEXEC | MFD_ALLOW_SEALING); in main() local 113 if (mem_fd < 0) { in main() 117 ret = ftruncate(mem_fd, mem_size); in main() 122 uint8_t *mem = mmap(NULL, mem_size, PROT_READ | PROT_WRITE, MAP_SHARED, mem_fd, 0); in main() 127 fcntl(mem_fd, F_ADD_SEALS, F_SEAL_SHRINK); in main() 131 ret = crosvm_create_memory(crosvm, mem_fd, 0, mem_size, 0, false, true, &mem_obj); in main()
|
D | plugin_ioevent.c | 135 int mem_fd = syscall(SYS_memfd_create, "guest_mem", MFD_CLOEXEC | MFD_ALLOW_SEALING); in main() local 136 if (mem_fd < 0) { in main() 140 ret = ftruncate(mem_fd, mem_size); in main() 145 uint8_t *mem = mmap(NULL, mem_size, PROT_READ | PROT_WRITE, MAP_SHARED, mem_fd, 0); in main() 150 fcntl(mem_fd, F_ADD_SEALS, F_SEAL_SHRINK); in main() 154 ret = crosvm_create_memory(crosvm, mem_fd, 0, mem_size, 0, false, false, &mem_obj); in main()
|
D | plugin_irqfd.c | 156 int mem_fd = syscall(SYS_memfd_create, "guest_mem", MFD_CLOEXEC | MFD_ALLOW_SEALING); in main() local 157 if (mem_fd < 0) { in main() 161 ret = ftruncate(mem_fd, mem_size); in main() 166 uint8_t *mem = mmap(NULL, mem_size, PROT_READ | PROT_WRITE, MAP_SHARED, mem_fd, 0); in main() 171 fcntl(mem_fd, F_ADD_SEALS, F_SEAL_SHRINK); in main() 175 ret = crosvm_create_memory(crosvm, mem_fd, 0, mem_size, 0, false, false, &mem_obj); in main()
|
D | plugin_adder.c | 152 int mem_fd = syscall(SYS_memfd_create, "guest_mem", MFD_CLOEXEC | MFD_ALLOW_SEALING); in main() local 153 if (mem_fd < 0) { in main() 157 ret = ftruncate(mem_fd, mem_size); in main() 162 uint8_t *mem = mmap(NULL, mem_size, PROT_READ | PROT_WRITE, MAP_SHARED, mem_fd, 0x1000); in main() 167 fcntl(mem_fd, F_ADD_SEALS, F_SEAL_SHRINK); in main() 171 ret = crosvm_create_memory(crosvm, mem_fd, 0x1000, 0x1000, 0x1000, false, false, &mem_obj); in main()
|
D | plugin_enable_cap.c | 181 int mem_fd = syscall(SYS_memfd_create, "guest_mem", in main() local 183 if (mem_fd < 0) { in main() 187 ret = ftruncate(mem_fd, mem_size); in main() 193 mem_fd, 0x0); in main() 198 fcntl(mem_fd, F_ADD_SEALS, F_SEAL_SHRINK); in main() 211 ret = crosvm_create_memory(crosvm, mem_fd, 0x0, mem_size, 0x1000, in main()
|
D | plugin_vcpu_pause.c | 181 int mem_fd = syscall(SYS_memfd_create, in main() local 183 if (mem_fd < 0) { in main() 187 ret = ftruncate(mem_fd, mem_size); in main() 193 mem_fd, 0x1000); in main() 198 fcntl(mem_fd, F_ADD_SEALS, F_SEAL_SHRINK); in main() 202 ret = crosvm_create_memory(crosvm, mem_fd, 0x1000, 0x1000, 0x1000, in main()
|
D | plugin_async_write.c | 192 int mem_fd = syscall(SYS_memfd_create, "guest_mem", in main() local 194 if (mem_fd < 0) { in main() 198 ret = ftruncate(mem_fd, mem_size); in main() 204 mem_fd, 0x1000); in main() 209 fcntl(mem_fd, F_ADD_SEALS, F_SEAL_SHRINK); in main() 213 ret = crosvm_create_memory(crosvm, mem_fd, 0x1000, 0x1000, 0x1000, false, in main()
|
D | plugin_hint.c | 226 int mem_fd = syscall(SYS_memfd_create, "guest_mem", in main() local 228 if (mem_fd < 0) { in main() 232 ret = ftruncate(mem_fd, mem_size); in main() 238 mem_fd, 0x1000); in main() 243 fcntl(mem_fd, F_ADD_SEALS, F_SEAL_SHRINK); in main() 247 ret = crosvm_create_memory(crosvm, mem_fd, 0x1000, 0x1000, 0x1000, false, in main()
|
/external/perfetto/src/profiling/memory/ |
D | shared_ring_buffer.cc | 121 void SharedRingBuffer::Initialize(base::ScopedFile mem_fd) { in Initialize() argument 123 int seals = fcntl(*mem_fd, F_GET_SEALS); in Initialize() 136 int res = fstat(*mem_fd, &stat_buf); in Initialize() 164 MAP_SHARED | MAP_FIXED, *mem_fd, 0); in Initialize() 169 MAP_SHARED | MAP_FIXED, *mem_fd, in Initialize() 180 mem_fd_ = std::move(mem_fd); in Initialize() 334 base::ScopedFile mem_fd) { in Attach() argument 335 auto buf = SharedRingBuffer(AttachFlag(), std::move(mem_fd)); in Attach()
|
D | shared_ring_buffer.h | 224 SharedRingBuffer(AttachFlag, base::ScopedFile mem_fd) { in SharedRingBuffer() argument 225 Initialize(std::move(mem_fd)); in SharedRingBuffer() 228 void Initialize(base::ScopedFile mem_fd);
|
/external/mesa3d/src/intel/tools/ |
D | aub_mem.c | 149 ASSERTED int ftruncate_res = ftruncate(mem->mem_fd, mem->mem_fd_len += 4096); in ensure_phys_mem() 153 mem->mem_fd, new_mem->fd_offset); in ensure_phys_mem() 285 MAP_SHARED | MAP_FIXED, mem->mem_fd, phys_mem->fd_offset); in aub_mem_get_ggtt_bo() 351 MAP_SHARED | MAP_FIXED, mem->mem_fd, phys_mem->fd_offset); in aub_mem_get_ppgtt_bo() 367 mem->mem_fd = os_create_anonymous_file(0, "phys memory"); in aub_mem_init() 369 return mem->mem_fd != -1; in aub_mem_init() 375 if (mem->mem_fd == -1) in aub_mem_fini() 390 close(mem->mem_fd); in aub_mem_fini() 391 mem->mem_fd = -1; in aub_mem_fini()
|
D | aub_mem.h | 43 int mem_fd; member
|
/external/linux-kselftest/tools/testing/selftests/vm/ |
D | mremap_dontunmap.c | 135 int mem_fd = memfd_create("memfd", MFD_CLOEXEC); in mremap_dontunmap_simple_shmem() local 136 BUG_ON(mem_fd < 0, "memfd_create"); in mremap_dontunmap_simple_shmem() 138 BUG_ON(ftruncate(mem_fd, num_pages * page_size) < 0, in mremap_dontunmap_simple_shmem() 143 MAP_FILE | MAP_SHARED, mem_fd, 0); in mremap_dontunmap_simple_shmem() 146 BUG_ON(close(mem_fd) < 0, "close"); in mremap_dontunmap_simple_shmem()
|
/external/perfetto/src/profiling/common/ |
D | unwind_support.cc | 46 FDMemory::FDMemory(base::ScopedFile mem_fd) : mem_fd_(std::move(mem_fd)) {} in FDMemory() argument 95 base::ScopedFile mem_fd) in UnwindingMetadata() argument 97 fd_mem(std::make_shared<FDMemory>(std::move(mem_fd))) { in UnwindingMetadata()
|
D | unwind_support.h | 68 explicit FDMemory(base::ScopedFile mem_fd); 94 UnwindingMetadata(base::ScopedFile maps_fd, base::ScopedFile mem_fd);
|
/external/perfetto/src/profiling/perf/ |
D | proc_descriptors.cc | 66 auto mem_fd = in GetDescriptorsForPid() 68 if (!mem_fd) { in GetDescriptorsForPid() 76 std::move(mem_fd)); in GetDescriptorsForPid()
|
D | unwinding.cc | 83 base::ScopedFile mem_fd) { in PostAdoptProcDescriptors() argument 85 auto shared_mem = std::make_shared<base::ScopedFile>(std::move(mem_fd)); in PostAdoptProcDescriptors() 96 base::ScopedFile mem_fd) { in AdoptProcDescriptors() argument 100 maps_fd.get(), mem_fd.get()); in AdoptProcDescriptors() 116 UnwindingMetadata{std::move(maps_fd), std::move(mem_fd)}; in AdoptProcDescriptors()
|
D | unwinding.h | 96 base::ScopedFile mem_fd); 171 base::ScopedFile mem_fd);
|
D | proc_descriptors.h | 37 base::ScopedFile mem_fd) = 0;
|
/external/ltp/testcases/kernel/security/dirtyc0w_shmem/ |
D | dirtyc0w_shmem_child.c | 34 static int mem_fd; variable 85 pwrite(mem_fd, str, strlen(str), (uintptr_t) map); in write_thread_fn() 223 mem_fd = SAFE_OPEN("/proc/self/mem", O_RDWR); in main()
|
/external/mesa3d/src/drm-shim/ |
D | device.c | 85 shim_device.mem_fd = memfd_create("shim mem", MFD_CLOEXEC); in drm_shim_device_init() 86 assert(shim_device.mem_fd != -1); in drm_shim_device_init() 88 ASSERTED int ret = ftruncate(shim_device.mem_fd, SHIM_MEM_SIZE); in drm_shim_device_init() 363 return mmap(NULL, length, prot, flags, shim_device.mem_fd, bo->mem_addr); in drm_shim_mmap()
|
D | drm_shim.h | 48 int mem_fd; member
|
/external/angle/util/posix/ |
D | crash_handler_posix.cpp | 308 int mem_fd(HANDLE_EINTR(open("/proc/self/mem", O_RDONLY | O_CLOEXEC))); 309 if (mem_fd == -1) 312 auto safe_memcpy = [&mem_fd](void *dst, uintptr_t src, size_t size) { 313 return HANDLE_EINTR(pread(mem_fd, dst, size, src)) == ssize_t(size); 362 close(mem_fd);
|
/external/libchrome/base/debug/ |
D | stack_trace_posix.cc | 594 base::ScopedFD mem_fd( in SetBaseAddressesForMemoryRegions() local 596 if (!mem_fd.is_valid()) in SetBaseAddressesForMemoryRegions() 599 auto safe_memcpy = [&mem_fd](void* dst, uintptr_t src, size_t size) { in SetBaseAddressesForMemoryRegions() 600 return HANDLE_EINTR(pread(mem_fd.get(), dst, size, src)) == ssize_t(size); in SetBaseAddressesForMemoryRegions()
|