[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2014-01-03 Thread Pasi Kärkkäinen
On Fri, Oct 18, 2013 at 05:44:45PM +0300, Pasi K?rkk?inen wrote: > On Thu, Sep 26, 2013 at 02:48:49AM +1000, Ben Skeggs wrote: > > > > > > Ben/Maarten: Are you guys planning to take a look at this and submit > > > another patch, or.. ? > > > > > > I tested the two earlier patches from this thread,

[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-10-18 Thread Pasi Kärkkäinen
On Wed, Sep 25, 2013 at 05:42:46PM +0300, Pasi K?rkk?inen wrote: > On Wed, Sep 04, 2013 at 08:59:13AM +0200, Maarten Lankhorst wrote: > > > > When looking into this bug I noticed that nouveau_bo_vma_add needs to have > > a check for nvbo->page_shift == vma->vm->vmm->spg_shift, > > and only if the

[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-10-18 Thread Pasi Kärkkäinen
On Thu, Sep 26, 2013 at 02:48:49AM +1000, Ben Skeggs wrote: > > > > Ben/Maarten: Are you guys planning to take a look at this and submit > > another patch, or.. ? > > > > I tested the two earlier patches from this thread, and they both fixed the > > problem (hard kernel crash). > > I'm hoping thi

Re: [PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-09-25 Thread Pasi Kärkkäinen
On Thu, Sep 26, 2013 at 02:48:49AM +1000, Ben Skeggs wrote: > On Thu, Sep 26, 2013 at 12:41 AM, Pasi Kärkkäinen wrote: > > Hello, > > > > On Wed, Sep 04, 2013 at 08:59:13AM +0200, Maarten Lankhorst wrote: > >> Op 04-09-13 05:41, Ben Skeggs schreef: > >> > On Thu, Aug 22, 2013 at 5:12 PM, Maarten L

Re: [PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-09-25 Thread Ben Skeggs
On Thu, Sep 26, 2013 at 12:41 AM, Pasi Kärkkäinen wrote: > Hello, > > On Wed, Sep 04, 2013 at 08:59:13AM +0200, Maarten Lankhorst wrote: >> Op 04-09-13 05:41, Ben Skeggs schreef: >> > On Thu, Aug 22, 2013 at 5:12 PM, Maarten Lankhorst >> > wrote: >> >> Op 22-08-13 02:10, Ilia Mirkin schreef: >> >

Re: [PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-09-25 Thread Pasi Kärkkäinen
On Wed, Sep 04, 2013 at 08:59:13AM +0200, Maarten Lankhorst wrote: > > When looking into this bug I noticed that nouveau_bo_vma_add needs to have a > check for nvbo->page_shift == vma->vm->vmm->spg_shift, > and only if the check is true it should map the page in TTM_PL_TT. Patch > below. > Shoul

Re: [PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-09-25 Thread Pasi Kärkkäinen
Hello, On Wed, Sep 04, 2013 at 08:59:13AM +0200, Maarten Lankhorst wrote: > Op 04-09-13 05:41, Ben Skeggs schreef: > > On Thu, Aug 22, 2013 at 5:12 PM, Maarten Lankhorst > > wrote: > >> Op 22-08-13 02:10, Ilia Mirkin schreef: > >>> The code expects non-VRAM mem nodes to have a pages list. If that

Re: [PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-09-10 Thread Pasi Kärkkäinen
On Wed, Sep 04, 2013 at 08:59:13AM +0200, Maarten Lankhorst wrote: > Op 04-09-13 05:41, Ben Skeggs schreef: > > On Thu, Aug 22, 2013 at 5:12 PM, Maarten Lankhorst > > wrote: > >> Op 22-08-13 02:10, Ilia Mirkin schreef: > >>> The code expects non-VRAM mem nodes to have a pages list. If that's not >

Re: [PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-09-04 Thread Maarten Lankhorst
Op 04-09-13 05:41, Ben Skeggs schreef: > On Thu, Aug 22, 2013 at 5:12 PM, Maarten Lankhorst > wrote: >> Op 22-08-13 02:10, Ilia Mirkin schreef: >>> The code expects non-VRAM mem nodes to have a pages list. If that's not >>> set, it will do a null deref down the line. Warn on that condition and >>>

Re: [PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-09-03 Thread Ben Skeggs
On Thu, Aug 22, 2013 at 5:12 PM, Maarten Lankhorst wrote: > Op 22-08-13 02:10, Ilia Mirkin schreef: >> The code expects non-VRAM mem nodes to have a pages list. If that's not >> set, it will do a null deref down the line. Warn on that condition and >> return an error. >> >> See https://bugs.freede

Re: [PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-09-03 Thread Pasi Kärkkäinen
On Tue, Sep 03, 2013 at 05:48:48PM +0300, Pasi Kärkkäinen wrote: > > > Not it really isn't appropriate.. > > > > > > You'd have to call call nouveau_vm_map_sg_table instead, the only > > > place that doesn't handle that correctly > > > is where it's not expected to be called. >

Re: [PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-09-03 Thread Pasi Kärkkäinen
On Tue, Sep 03, 2013 at 04:34:56PM +0200, Maarten Lankhorst wrote: > Op 03-09-13 16:20, Pasi Kärkkäinen schreef: > > On Wed, Aug 28, 2013 at 09:44:15AM +0200, Maarten Lankhorst wrote: > >> Op 28-08-13 08:29, Pasi Kärkkäinen schreef: > >>> On Fri, Aug 23, 2013 at 11:20:42PM +0300, Pasi Kärkkäinen wr

Re: [PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-09-03 Thread Maarten Lankhorst
Op 03-09-13 16:20, Pasi Kärkkäinen schreef: > On Wed, Aug 28, 2013 at 09:44:15AM +0200, Maarten Lankhorst wrote: >> Op 28-08-13 08:29, Pasi Kärkkäinen schreef: >>> On Fri, Aug 23, 2013 at 11:20:42PM +0300, Pasi Kärkkäinen wrote: On Thu, Aug 22, 2013 at 09:12:40AM +0200, Maarten Lankhorst wrote

Re: [PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-09-03 Thread Pasi Kärkkäinen
On Wed, Aug 28, 2013 at 09:44:15AM +0200, Maarten Lankhorst wrote: > Op 28-08-13 08:29, Pasi Kärkkäinen schreef: > > On Fri, Aug 23, 2013 at 11:20:42PM +0300, Pasi Kärkkäinen wrote: > >> On Thu, Aug 22, 2013 at 09:12:40AM +0200, Maarten Lankhorst wrote: > >>> Op 22-08-13 02:10, Ilia Mirkin schreef:

[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-08-28 Thread Maarten Lankhorst
Op 28-08-13 08:29, Pasi K?rkk?inen schreef: > On Fri, Aug 23, 2013 at 11:20:42PM +0300, Pasi K?rkk?inen wrote: >> On Thu, Aug 22, 2013 at 09:12:40AM +0200, Maarten Lankhorst wrote: >>> Op 22-08-13 02:10, Ilia Mirkin schreef: The code expects non-VRAM mem nodes to have a pages list. If that's n

[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-08-28 Thread Pasi Kärkkäinen
On Fri, Aug 23, 2013 at 11:20:42PM +0300, Pasi K?rkk?inen wrote: > On Thu, Aug 22, 2013 at 09:12:40AM +0200, Maarten Lankhorst wrote: > > Op 22-08-13 02:10, Ilia Mirkin schreef: > > > The code expects non-VRAM mem nodes to have a pages list. If that's not > > > set, it will do a null deref down the

Re: [PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-08-28 Thread Maarten Lankhorst
Op 28-08-13 08:29, Pasi Kärkkäinen schreef: > On Fri, Aug 23, 2013 at 11:20:42PM +0300, Pasi Kärkkäinen wrote: >> On Thu, Aug 22, 2013 at 09:12:40AM +0200, Maarten Lankhorst wrote: >>> Op 22-08-13 02:10, Ilia Mirkin schreef: The code expects non-VRAM mem nodes to have a pages list. If that's n

Re: [PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-08-27 Thread Pasi Kärkkäinen
On Fri, Aug 23, 2013 at 11:20:42PM +0300, Pasi Kärkkäinen wrote: > On Thu, Aug 22, 2013 at 09:12:40AM +0200, Maarten Lankhorst wrote: > > Op 22-08-13 02:10, Ilia Mirkin schreef: > > > The code expects non-VRAM mem nodes to have a pages list. If that's not > > > set, it will do a null deref down the

[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-08-23 Thread Pasi Kärkkäinen
On Thu, Aug 22, 2013 at 09:12:40AM +0200, Maarten Lankhorst wrote: > Op 22-08-13 02:10, Ilia Mirkin schreef: > > The code expects non-VRAM mem nodes to have a pages list. If that's not > > set, it will do a null deref down the line. Warn on that condition and > > return an error. > > > > See https:

Re: [PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-08-23 Thread Pasi Kärkkäinen
On Thu, Aug 22, 2013 at 09:12:40AM +0200, Maarten Lankhorst wrote: > Op 22-08-13 02:10, Ilia Mirkin schreef: > > The code expects non-VRAM mem nodes to have a pages list. If that's not > > set, it will do a null deref down the line. Warn on that condition and > > return an error. > > > > See https:

[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-08-22 Thread Ben Skeggs
On Thu, Aug 22, 2013 at 10:10 AM, Ilia Mirkin wrote: > The code expects non-VRAM mem nodes to have a pages list. If that's not > set, it will do a null deref down the line. Warn on that condition and > return an error. > > See https://bugs.freedesktop.org/show_bug.cgi?id=64774 > > Reported-by: Pas

[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-08-22 Thread Pasi Kärkkäinen
On Thu, Aug 22, 2013 at 09:12:40AM +0200, Maarten Lankhorst wrote: > Op 22-08-13 02:10, Ilia Mirkin schreef: > > The code expects non-VRAM mem nodes to have a pages list. If that's not > > set, it will do a null deref down the line. Warn on that condition and > > return an error. > > > > See https:

[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-08-22 Thread Pasi Kärkkäinen
On Thu, Aug 22, 2013 at 04:41:06PM +1000, Ben Skeggs wrote: > On Thu, Aug 22, 2013 at 10:10 AM, Ilia Mirkin wrote: > > The code expects non-VRAM mem nodes to have a pages list. If that's not > > set, it will do a null deref down the line. Warn on that condition and > > return an error. > > > > See

[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-08-22 Thread Maarten Lankhorst
Op 22-08-13 02:10, Ilia Mirkin schreef: > The code expects non-VRAM mem nodes to have a pages list. If that's not > set, it will do a null deref down the line. Warn on that condition and > return an error. > > See https://bugs.freedesktop.org/show_bug.cgi?id=64774 > > Reported-by: Pasi K?rkk?inen

Re: [PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-08-22 Thread Pasi Kärkkäinen
On Thu, Aug 22, 2013 at 09:12:40AM +0200, Maarten Lankhorst wrote: > Op 22-08-13 02:10, Ilia Mirkin schreef: > > The code expects non-VRAM mem nodes to have a pages list. If that's not > > set, it will do a null deref down the line. Warn on that condition and > > return an error. > > > > See https:

Re: [PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-08-22 Thread Maarten Lankhorst
Op 22-08-13 02:10, Ilia Mirkin schreef: > The code expects non-VRAM mem nodes to have a pages list. If that's not > set, it will do a null deref down the line. Warn on that condition and > return an error. > > See https://bugs.freedesktop.org/show_bug.cgi?id=64774 > > Reported-by: Pasi Kärkkäinen

Re: [PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-08-21 Thread Pasi Kärkkäinen
On Thu, Aug 22, 2013 at 04:41:06PM +1000, Ben Skeggs wrote: > On Thu, Aug 22, 2013 at 10:10 AM, Ilia Mirkin wrote: > > The code expects non-VRAM mem nodes to have a pages list. If that's not > > set, it will do a null deref down the line. Warn on that condition and > > return an error. > > > > See

Re: [PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-08-21 Thread Ben Skeggs
On Thu, Aug 22, 2013 at 10:10 AM, Ilia Mirkin wrote: > The code expects non-VRAM mem nodes to have a pages list. If that's not > set, it will do a null deref down the line. Warn on that condition and > return an error. > > See https://bugs.freedesktop.org/show_bug.cgi?id=64774 > > Reported-by: Pas

[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-08-21 Thread Ilia Mirkin
The code expects non-VRAM mem nodes to have a pages list. If that's not set, it will do a null deref down the line. Warn on that condition and return an error. See https://bugs.freedesktop.org/show_bug.cgi?id=64774 Reported-by: Pasi K?rkk?inen Tested-by: Pasi K?rkk?inen Signed-off-by: Ilia Mirk

[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

2013-08-21 Thread Ilia Mirkin
The code expects non-VRAM mem nodes to have a pages list. If that's not set, it will do a null deref down the line. Warn on that condition and return an error. See https://bugs.freedesktop.org/show_bug.cgi?id=64774 Reported-by: Pasi Kärkkäinen Tested-by: Pasi Kärkkäinen Signed-off-by: Ilia Mirk