Re: [PATCH v2] virt: vbox: Only copy_from_user the request-header once

2018-05-08 Thread Hans de Goede
Hi, On 08-05-18 15:50, Wenwen Wang wrote: In vbg_misc_device_ioctl(), the header of the ioctl argument is copied from the userspace pointer 'arg' and saved to the kernel object 'hdr'. Then the 'version', 'size_in', and 'size_out' fields of 'hdr' are verified. Before this commit, after the check

[PATCH v2] virt: vbox: Only copy_from_user the request-header once

2018-05-08 Thread Wenwen Wang
In vbg_misc_device_ioctl(), the header of the ioctl argument is copied from the userspace pointer 'arg' and saved to the kernel object 'hdr'. Then the 'version', 'size_in', and 'size_out' fields of 'hdr' are verified. Before this commit, after the checks a buffer for the entire request would be al