[PATCH 1/2] drm/radeon: forbid mapping of userptr bo through radeon device file

2016-04-20 Thread Christian König
There are also checks in (amdgpu|radeon)_gem_mmap_ioctl() to prevent this as well. But it shouldn't hurt us to check that here as well. So both patches are Reviewed-by: Christian König Regards, Christian. Am 19.04.2016 um 15:07 schrieb Jérôme Glisse: > Allowing userptr bo which are basicly

[PATCH 1/2] drm/radeon: forbid mapping of userptr bo through radeon device file

2016-04-20 Thread Alex Deucher
On Wed, Apr 20, 2016 at 9:26 AM, Christian König wrote: > There are also checks in (amdgpu|radeon)_gem_mmap_ioctl() to prevent this as > well. > > But it shouldn't hurt us to check that here as well. So both patches are > Reviewed-by: Christian König Applied both. Thanks! Alex > > Regards,

[PATCH 1/2] drm/radeon: forbid mapping of userptr bo through radeon device file

2016-04-19 Thread Jérôme Glisse
Allowing userptr bo which are basicly a list of page from some vma (so either anonymous page or file backed page) would lead to serious corruption of kernel structures and counters (because we overwrite the page->mapping field when mapping buffer). This will already block if the buffer was populat