Re: [PATCH] drm/fence: fix memory overwrite when setting out_fence fd

2017-01-16 Thread Gustavo Padovan
2017-01-13 Chad Versace : > On Fri 13 Jan 2017, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Currently if the userspace declares a int variable to store the out_fence > > fd and pass it to OUT_FENCE_PTR the kernel will overwrite the 32 bits > > above the int variable on 64 bits syste

Re: [PATCH] drm/fence: fix memory overwrite when setting out_fence fd

2017-01-13 Thread Chad Versace
On Fri 13 Jan 2017, Gustavo Padovan wrote: > From: Gustavo Padovan > > Currently if the userspace declares a int variable to store the out_fence > fd and pass it to OUT_FENCE_PTR the kernel will overwrite the 32 bits > above the int variable on 64 bits systems. > > Fix this by making the interna

Re: [PATCH] drm/fence: fix memory overwrite when setting out_fence fd

2017-01-13 Thread Gustavo Padovan
2017-01-13 Laurent Pinchart : > Hi Gustavo, > > Thank you for the patch. > > On Friday 13 Jan 2017 12:22:09 Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Currently if the userspace declares a int variable to store the out_fence > > fd and pass it to OUT_FENCE_PTR the kernel will ove

Re: [PATCH] drm/fence: fix memory overwrite when setting out_fence fd

2017-01-13 Thread Laurent Pinchart
Hi Gustavo, Thank you for the patch. On Friday 13 Jan 2017 12:22:09 Gustavo Padovan wrote: > From: Gustavo Padovan > > Currently if the userspace declares a int variable to store the out_fence > fd and pass it to OUT_FENCE_PTR the kernel will overwrite the 32 bits > above the int variable on 64

[PATCH] drm/fence: fix memory overwrite when setting out_fence fd

2017-01-13 Thread Gustavo Padovan
From: Gustavo Padovan Currently if the userspace declares a int variable to store the out_fence fd and pass it to OUT_FENCE_PTR the kernel will overwrite the 32 bits above the int variable on 64 bits systems. Fix this by making the internal storage of out_fence in the kernel a s32 pointer. Repo