/cts/hostsidetests/securitybulletin/securityPatch/CVE-2017-6262/ |
D | poc.c | 31 static int drm_version(int fd) { in drm_version() argument 41 if (ioctl(fd, DRM_IOCTL_VERSION, &ver) < 0) { in drm_version() 42 close(fd); in drm_version() 48 static uint32_t nouveau_gem_ioctl_new(int fd) { in nouveau_gem_ioctl_new() argument 56 if (ioctl(fd, DRM_IOCTL_NOUVEAU_GEM_NEW, &new_arg) < 0) { in nouveau_gem_ioctl_new() 57 close(fd); in nouveau_gem_ioctl_new() 63 static void nouveau_gem_ioctl_map(int fd, uint32_t handle) { in nouveau_gem_ioctl_map() argument 69 if (ioctl(fd, DRM_IOCTL_NOUVEAU_GEM_MAP, &map_arg) < 0) { in nouveau_gem_ioctl_map() 70 close(fd); in nouveau_gem_ioctl_map() 76 int fd; in main() local [all …]
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2021-1906/ |
D | poc.c | 41 int gpu_mem_alloc_id(int fd, int size, int flags, in gpu_mem_alloc_id() argument 47 ret = ioctl(fd, IOCTL_KGSL_GPUMEM_ALLOC_ID, alloc); in gpu_mem_alloc_id() 51 int gpu_sharedmem_free(int fd, unsigned long gpu_addr) { in gpu_sharedmem_free() argument 55 ret = ioctl(fd, IOCTL_KGSL_SHAREDMEM_FREE, &addr); in gpu_sharedmem_free() 59 unsigned long gpu_mem_alloc(int fd, int size, unsigned int flags) { in gpu_mem_alloc() argument 64 if (ioctl(fd, IOCTL_KGSL_GPUMEM_ALLOC, &alloc) < 0) { in gpu_mem_alloc() 70 int gpu_mem_get_info_from_id(int fd, int id, in gpu_mem_get_info_from_id() argument 75 ret = ioctl(fd, IOCTL_KGSL_GPUMEM_GET_INFO, info); in gpu_mem_get_info_from_id() 95 int gpu_map_user_mem(int fd, uintptr_t addr, size_t size, size_t offset, in gpu_map_user_mem() argument 100 user_mem.fd = -1; in gpu_map_user_mem() [all …]
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2016-5862/ |
D | poc.c | 33 unsigned int get_speakerid(int fd) { in get_speakerid() argument 41 ret = ioctl(fd, SNDRV_CTL_IOCTL_ELEM_LIST, &lst); in get_speakerid() 57 int fd = -1; in main() local 59 fd = open("/dev/snd/controlC0", O_RDWR); in main() 60 if(fd < 0) { in main() 64 control.id.numid = get_speakerid(fd); in main() 66 close(fd); in main() 69 ioctl(fd,SNDRV_CTL_IOCTL_ELEM_WRITE,&control); in main() 70 close(fd); in main()
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2016-5867/ |
D | poc.c | 35 unsigned int get_doblycontrolid(int fd) { in get_doblycontrolid() argument 43 ret = ioctl(fd, SNDRV_CTL_IOCTL_ELEM_LIST, &lst); in get_doblycontrolid() 59 int fd = -1; in main() local 62 fd = open("/dev/snd/controlC0", O_RDWR); in main() 63 if(fd < 0) { in main() 67 control.id.numid = get_doblycontrolid(fd); in main() 71 ret = ioctl(fd, SNDRV_CTL_IOCTL_ELEM_WRITE, &control); in main() 73 close(fd); in main() 77 close(fd); in main()
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2020-0069/ |
D | poc.c | 86 OperationResult work_out_ioctl_code(int fd, int *ioctl_code) { in work_out_ioctl_code() argument 104 ioctl(fd, CMDQ_IOCTL_EXEC_COMMAND | (ii << 16), &command); in work_out_ioctl_code() 116 OperationResult perform_pa_read(int fd, int ioctl_code, uint32_t kernel_buffer, in perform_pa_read() argument 171 switch (ioctl(fd, ioctl_code, &command)) { in perform_pa_read() 198 int fd = -1; in main() local 211 fd = open(device_names[ii], O_RDONLY); in main() 212 if (-1 == fd) { in main() 222 if (-1 == fd) { in main() 226 if (-1 == ioctl(fd, CMDQ_IOCTL_ALLOC_WRITE_ADDRESS, &kernel_buffer)) { in main() 230 if (OperationSuccess != work_out_ioctl_code(fd, &ioctl_code)) { in main() [all …]
|
/cts/tests/tests/os/jni/ |
D | android_os_cts_SharedMemory.cpp | 25 int fd = ASharedMemory_dupFromJava(env, jSharedMemory); in nWriteByte() local 26 if (fd == -1) return false; in nWriteByte() 27 void* addr = mmap(nullptr, 1, PROT_READ | PROT_WRITE, MAP_SHARED, fd, index); in nWriteByte() 29 close(fd); in nWriteByte() 34 close(fd); in nWriteByte()
|
/cts/tests/tests/security/jni/ |
D | android_security_cts_cve_2019_2213_Test.c | 264 static inline void binder_write(int fd, buf_t *buf); 266 void enter_looper(int fd) { in enter_looper() argument 269 binder_write(fd, buf); in enter_looper() 272 void init_binder(int fd) { in init_binder() argument 273 void *map_ret = mmap(NULL, 0x200000, PROT_READ, MAP_PRIVATE, fd, 0); in init_binder() 276 enter_looper(fd); in init_binder() 280 int fd = open("/dev/binder", O_RDONLY); in open_binder() local 281 if (fd < 0) in open_binder() 283 init_binder(fd); in open_binder() 284 return fd; in open_binder() [all …]
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2015-1805/ |
D | poc.c | 32 int fd[2]; variable 43 readv(fd[0], iovs, BUFS); in func_readv() 53 if (pipe(fd) < 0) { in main() 56 fcntl(fd[0], F_SETFL, O_NONBLOCK); in main() 57 fcntl(fd[1], F_SETFL, O_NONBLOCK); in main() 90 write(fd[1], bufs[0], PAGE_SIZE); in main() 105 close(fd[0]); in main() 106 close(fd[1]); in main()
|
/cts/tests/tests/database/src/android/database/sqlite/cts/ |
D | SQLiteStatementTest.java | 247 ParcelFileDescriptor fd = stm.simpleQueryForBlobFileDescriptor(); in doTestSimpleQueryForBlobFileDescriptorSuccess() local 248 assertFileDescriptorContent(BLOBS[i], fd); in doTestSimpleQueryForBlobFileDescriptorSuccess() 257 ParcelFileDescriptor fd = stm.simpleQueryForBlobFileDescriptor(); in testSimpleQueryForBlobFileDescriptorSuccessParam() local 258 assertFileDescriptorContent(BLOBS[0], fd); in testSimpleQueryForBlobFileDescriptorSuccessParam() 266 ParcelFileDescriptor fd = null; in testGetBlobFailureNoParam() local 269 fd = stm.simpleQueryForBlobFileDescriptor(); in testGetBlobFailureNoParam() 273 if (fd != null) { in testGetBlobFailureNoParam() 274 fd.close(); in testGetBlobFailureNoParam() 275 fd = null; in testGetBlobFailureNoParam() 287 ParcelFileDescriptor fd = null; in testGetBlobFailureParam() local [all …]
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2016-6734/ |
D | poc.c | 82 int fd; variable 111 ioctl(fd, DRM_IOCTL_TEGRA_START_KEEPON, &keepon_c); in keepon_thread() 123 fd = open(DEV,O_RDONLY); in main() 124 if(fd == -1){ in main() 141 ret = ioctl(fd, DRM_IOCTL_TEGRA_OPEN_CHANNEL, &open_c); in main() 149 ret = ioctl(fd, DRM_IOCTL_TEGRA_CLOSE_CHANNEL, &close_c); in main() 159 close(fd); in main()
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2016-6735/ |
D | poc.c | 83 int fd; variable 110 ioctl(fd, DRM_IOCTL_TEGRA_STOP_KEEPON, &keepon_c); in keepon_thread() 122 fd = open(DEV,O_RDONLY); in main() 123 if(fd == -1){ in main() 140 ret = ioctl(fd, DRM_IOCTL_TEGRA_OPEN_CHANNEL, &open_c); in main() 148 ret = ioctl(fd, DRM_IOCTL_TEGRA_CLOSE_CHANNEL, &close_c); in main() 158 close(fd); in main()
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2016-6733/ |
D | poc.c | 75 int fd; variable 107 ret = ioctl(fd, DRM_IOCTL_TEGRA_CLOSE_CHANNEL, &close_c); in child() 120 fd = open(DEV,O_RDONLY); in main() 121 if(fd == -1){ in main() 136 ret = ioctl(fd, DRM_IOCTL_TEGRA_OPEN_CHANNEL, &open_c); in main() 139 ret = ioctl(fd, DRM_IOCTL_TEGRA_CLOSE_CHANNEL, &close_c); in main() 155 close(fd); in main()
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2016-8479/ |
D | poc.c | 112 int fd; variable 134 ret = ioctl(fd, IOCTL_KGSL_DRAWCTXT_DESTROY, &kdd); in child_ioctl_0() 147 ret = ioctl(fd, IOCTL_KGSL_DRAWCTXT_DESTROY, &kdd); in child_ioctl_1() 159 ret = ioctl(fd, IOCTL_KGSL_DRAWCTXT_CREATE, &kdc); in child_ioctl_2() 176 fd = open(DEV, O_RDWR); in main() 177 if (fd == -1) { in main() 191 ret = ioctl(fd, IOCTL_KGSL_DRAWCTXT_CREATE, &kdc); in main() 195 close(fd); in main()
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2016-8425/ |
D | poc.c | 46 int fd; variable 91 fd = open(DEV,O_RDONLY); in main() 92 if(fd == -1){ in main() 100 ret = ioctl(fd, NVHOST_IOCTL_CHANNEL_OPEN, &o_args); in main() 125 ret = ioctl(fd, NVHOST_IOCTL_CHANNEL_OPEN, &o_args); in main() 138 close(fd); in main()
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2016-6731/ |
D | poc.c | 85 int fd; variable 114 ioctl(fd, DRM_IOCTL_TEGRA_SET_CLK_CONSTRAINT, &clk_c); in clk_thread() 126 fd = open(DEV,O_RDONLY); in main() 127 if(fd == -1){ in main() 144 ret = ioctl(fd, DRM_IOCTL_TEGRA_OPEN_CHANNEL, &open_c); in main() 152 ret = ioctl(fd, DRM_IOCTL_TEGRA_CLOSE_CHANNEL, &close_c); in main() 162 close(fd); in main()
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2016-6730/ |
D | poc.c | 85 int fd; variable 114 ioctl(fd, DRM_IOCTL_TEGRA_GET_CLK_CONSTRAINT, &clk_c); in clk_thread() 126 fd = open(DEV,O_RDONLY); in main() 127 if(fd == -1){ in main() 144 ret = ioctl(fd, DRM_IOCTL_TEGRA_OPEN_CHANNEL, &open_c); in main() 152 ret = ioctl(fd, DRM_IOCTL_TEGRA_CLOSE_CHANNEL, &close_c); in main() 162 close(fd); in main()
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2016-8426/ |
D | poc.c | 46 int fd; variable 91 fd = open(DEV,O_RDONLY); in main() 92 if(fd == -1){ in main() 100 ret = ioctl(fd, NVHOST_IOCTL_CHANNEL_OPEN, &o_args); in main() 127 ret = ioctl(fd, NVHOST_IOCTL_CHANNEL_OPEN, &o_args); in main() 145 close(fd); in main()
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2016-6736/ |
D | poc.c | 97 int fd; variable 124 ioctl(fd, DRM_IOCTL_TEGRA_SUBMIT, &submit_c); in submit_thread() 136 fd = open(DEV,O_RDONLY); in main() 137 if(fd == -1){ in main() 154 ret = ioctl(fd, DRM_IOCTL_TEGRA_OPEN_CHANNEL, &open_c); in main() 162 ret = ioctl(fd, DRM_IOCTL_TEGRA_CLOSE_CHANNEL, &close_c); in main() 172 close(fd); in main()
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2016-6732/ |
D | poc.c | 76 int fd; variable 107 ret = ioctl(fd, DRM_IOCTL_TEGRA_CLOSE_CHANNEL, &close_c); in child() 120 fd = open(DEV,O_RDONLY); in main() 121 if(fd == -1){ in main() 135 ret = ioctl(fd, DRM_IOCTL_TEGRA_OPEN_CHANNEL, &open_c); in main() 155 close(fd); in main()
|
/cts/hostsidetests/appsecurity/test-apps/ApkVerityTestApp/jni/ |
D | android_appsecurity_cts_apkveritytestapp_InstalledFilesCheck.cpp | 53 int fd = open(path.c_str(), O_RDONLY | O_CLOEXEC); in Java_android_appsecurity_cts_apkveritytestapp_InstalledFilesCheck_hasFsverityNative() local 54 if (fd < 0) { in Java_android_appsecurity_cts_apkveritytestapp_InstalledFilesCheck_hasFsverityNative() 60 int ret = ioctl(fd, FS_IOC_GETFLAGS, &flags); in Java_android_appsecurity_cts_apkveritytestapp_InstalledFilesCheck_hasFsverityNative() 61 close(fd); in Java_android_appsecurity_cts_apkveritytestapp_InstalledFilesCheck_hasFsverityNative()
|
/cts/hostsidetests/securitybulletin/securityPatch/Bug-38195738/ |
D | poc.c | 28 int fd = open("/dev/kgsl-3d0", 0); in main() local 36 ioctl(fd, 0xc018092ful, 0x20000ff0ul); in main() 37 close(fd); in main()
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2017-0334/ |
D | poc.c | 33 int fd, rc; in main() local 36 fd = open("/dev/dri/renderD129", 0, 0); in main() 37 rc = ioctl(fd, tmp_DRM_IOCTL_TEGRA_OPEN_CHANNEL, &open_args); in main()
|
/cts/hostsidetests/cpptools/test-apps/ConnectorNativeProgram/ |
D | connector.cpp | 42 int fd; in main() local 46 if ((fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0)) == -1) { in main() 51 if (connect(fd, (struct sockaddr*)&addr_un, addr_len) == -1) { in main() 59 ssize_t result = TEMP_FAILURE_RETRY(read(fd, buf, kBufferSize - 1)); in main()
|
/cts/tests/tests/media/src/android/media/cts/ |
D | NativeDecoderTest.java | 195 AssetFileDescriptor fd = getAssetFileDescriptorFor(res); in testExtractor() local 198 fd.getFileDescriptor(), fd.getStartOffset(), fd.getLength()); in testExtractor() 200 fd.getParcelFileDescriptor().getFd(), fd.getStartOffset(), fd.getLength()); in testExtractor() 202 fd.close(); in testExtractor() 227 private static int[] getSampleSizes(FileDescriptor fd, long offset, long size) in getSampleSizes() argument 230 ex.setDataSource(fd, offset, size); in getSampleSizes() 280 private static native int[] getSampleSizesNative(int fd, long offset, long size); in getSampleSizesNative() argument 295 AssetFileDescriptor fd = getAssetFileDescriptorFor(res); in testExtractorFileDurationNative() local 297 fd.getParcelFileDescriptor().getFd(), fd.getStartOffset(), fd.getLength()); in testExtractorFileDurationNative() 300 ex.setDataSource(fd.getFileDescriptor(), fd.getStartOffset(), fd.getLength()); in testExtractorFileDurationNative() [all …]
|
/cts/tests/tests/graphics/jni/ |
D | android_graphics_cts_SyncTest.cpp | 47 pollfds[i].fd = fds[i]; in syncPoll() 61 if (pollfds[i].fd < 0) in syncPoll() 82 jobject syncFileInfo(JNIEnv* /*env*/, jclass /*clazz*/, jint fd) { in syncFileInfo() argument 83 auto info = sync_file_info(fd); in syncFileInfo() 90 void syncClose(int fd) { in syncClose() argument 91 close(fd); in syncClose()
|