android: ion: add nozero and sync_force flags
authorCho KyongHo <pullip.cho@samsung.com>
Fri, 9 Feb 2018 07:18:43 +0000 (16:18 +0900)
committerSangwook Ju <sw.ju@samsung.com>
Mon, 14 May 2018 10:45:23 +0000 (19:45 +0900)
commit7e825b8e000c8008454a1206429ab3dd958b53cf
tree0fa52585f5a6e8f58bad95241e00216bd6e87367
parent288267f142dda626bc69fcf23554518e38979237
android: ion: add nozero and sync_force flags

Allocation with ION_FLAG_NOZERED returns buffers without clearing data
written by previous users. ION should not allow userspace accessing
the buffer due to the security reason.
ION_FLAG_SYNC_FORCE is also introduced for some users that want to
decide the point of cache maintenance by itself. With the flag, ION
performs cache flush to the allocated even for cached buffers. those
users want this redundant cache flush to prevent buffer corruption by
victim dirty cache lines about the buffer after DMA write without
proper cache maintenance.

Change-Id: Ib3c4f9c93a6cd0240ae12b8c061142355e2b1605
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
drivers/staging/android/ion/ion.c
drivers/staging/android/ion/ion.h
drivers/staging/android/ion/ion_cma_heap.c
drivers/staging/android/ion/ion_page_pool.c
drivers/staging/android/ion/ion_system_heap.c
drivers/staging/android/uapi/ion.h