Re: [Linaro-mm-sig] [PATCHv3 2/2] staging: android: ion: Add ioctl to query available heaps

2016-09-07 Thread Laura Abbott
On 09/07/2016 12:37 PM, Arnd Bergmann wrote: On Wednesday, September 7, 2016 11:49:59 AM CEST Laura Abbott wrote: - if (dir & _IOC_WRITE) - if (copy_from_user(&data, (void __user *)arg, _IOC_SIZE(cmd))) - return -EFAULT; + /* +* The copy_f

Re: [Linaro-mm-sig] [PATCHv3 2/2] staging: android: ion: Add ioctl to query available heaps

2016-09-07 Thread Arnd Bergmann
On Wednesday, September 7, 2016 11:49:59 AM CEST Laura Abbott wrote: > - if (dir & _IOC_WRITE) > - if (copy_from_user(&data, (void __user *)arg, _IOC_SIZE(cmd))) > - return -EFAULT; > + /* > + * The copy_from_user is unconditional here for both read and

[PATCHv3 2/2] staging: android: ion: Add ioctl to query available heaps

2016-09-07 Thread Laura Abbott
Ion clients currently lack a good method to determine what heaps are available and what ids they map to. This leads to tight coupling between user and kernel space and headaches. Add a query ioctl to let userspace know the availability of heaps. Signed-off-by: Laura Abbott --- v3: Include some r