forked from MIrrors/gasket-driver
fa575cdad7a6e653f791531c990c1e768571fb2f
Buffers to be mapped as DMA_TO_DEVICE must be writable due to the 'write' argument to get_user_pages_fast being hard coded to 1. This prevents userspace from passing in pointers returned from mmap(fd, PROT_READ), instead mmap(fd, PROT_READ | PROT_WRITE) must be used even if the buffer is supposed to be read only. Instead set writable to non zero iff direction != DMA_TO_DEVICE, ie only buffers with DMA_FROM_DEVICE or DMA_BIDIRECTIONAL are required to be writable. Change-Id: I21c97b2bb855e11ecaa6ae9e81cf8b463b4aedaa Signed-off-by: Jonas Larsson <ljonas@google.com>
Description
No description provided
Languages
C
99.8%
Makefile
0.2%