Re: [PATCH] drm/panfrost: Prevent race when handling page fault

2019-09-17 Thread Steven Price
On 13/09/2019 18:24, Alyssa Rosenzweig wrote: I'm conflicted on this series. I'm on holiday, but thought I had to reply... On the one hand, userspace should obviously not be able to crash the kernel. So the crash should be fixed in one way or another. On the other hand, userspace really has

Re: [PATCH] drm/panfrost: Prevent race when handling page fault

2019-09-17 Thread Daniel Vetter
On Fri, Sep 13, 2019 at 01:24:54PM -0400, Alyssa Rosenzweig wrote: > I'm conflicted on this series. > > On the one hand, userspace should obviously not be able to crash the > kernel. So the crash should be fixed in one way or another. > > On the other hand, userspace really has to supply all the

Re: [PATCH] drm/panfrost: Prevent race when handling page fault

2019-09-16 Thread Rob Herring
On Fri, Sep 13, 2019 at 12:25 PM Alyssa Rosenzweig wrote: > > I'm conflicted on this series. > > On the one hand, userspace should obviously not be able to crash the > kernel. So the crash should be fixed in one way or another. > > On the other hand, userspace really has to supply all the BOs it

Re: [PATCH] drm/panfrost: Prevent race when handling page fault

2019-09-13 Thread Alyssa Rosenzweig
I'm conflicted on this series. On the one hand, userspace should obviously not be able to crash the kernel. So the crash should be fixed in one way or another. On the other hand, userspace really has to supply all the BOs it uses for correctness. I realize the DDK doesn't do this but... it

Re: [PATCH] drm/panfrost: Prevent race when handling page fault

2019-09-13 Thread Steven Price
On 07/09/2019 20:36, Daniel Vetter wrote: > On Fri, Sep 6, 2019 at 2:42 PM Steven Price wrote: >> >> On 06/09/2019 12:10, Rob Herring wrote: >>> On Thu, Sep 5, 2019 at 1:11 PM Steven Price wrote: When handling a GPU page fault addr_to_drm_mm_node() is used to translate the GPU

Re: [PATCH] drm/panfrost: Prevent race when handling page fault

2019-09-07 Thread Daniel Vetter
On Fri, Sep 6, 2019 at 2:42 PM Steven Price wrote: > > On 06/09/2019 12:10, Rob Herring wrote: > > On Thu, Sep 5, 2019 at 1:11 PM Steven Price wrote: > >> > >> When handling a GPU page fault addr_to_drm_mm_node() is used to > >> translate the GPU address to a buffer object. However it is

Re: [PATCH] drm/panfrost: Prevent race when handling page fault

2019-09-06 Thread Steven Price
On 06/09/2019 12:10, Rob Herring wrote: > On Thu, Sep 5, 2019 at 1:11 PM Steven Price wrote: >> >> When handling a GPU page fault addr_to_drm_mm_node() is used to >> translate the GPU address to a buffer object. However it is possible for >> the buffer object to be freed after the function has

Re: [PATCH] drm/panfrost: Prevent race when handling page fault

2019-09-06 Thread Rob Herring
On Thu, Sep 5, 2019 at 1:11 PM Steven Price wrote: > > When handling a GPU page fault addr_to_drm_mm_node() is used to > translate the GPU address to a buffer object. However it is possible for > the buffer object to be freed after the function has returned resulting > in a use-after-free of the

[PATCH] drm/panfrost: Prevent race when handling page fault

2019-09-05 Thread Steven Price
When handling a GPU page fault addr_to_drm_mm_node() is used to translate the GPU address to a buffer object. However it is possible for the buffer object to be freed after the function has returned resulting in a use-after-free of the BO. Change addr_to_drm_mm_node to return the