Re: [Nouveau] [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, and they both

Re: [Nouveau] [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 this bug could

Re: [Nouveau] [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 check is

Re: [Nouveau] [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 maarten.lankho...@canonical.com wrote: Op 22-08-13 02:10, Ilia Mirkin schreef: The code expects non-VRAM mem nodes to have a

Re: [Nouveau] [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. Should

Re: [Nouveau] [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 pa...@iki.fi 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 maarten.lankho...@canonical.com wrote: Op 22-08-13

Re: [Nouveau] [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 pa...@iki.fi 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

Re: [Nouveau] [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 maarten.lankho...@canonical.com wrote: Op 22-08-13 02:10, Ilia Mirkin schreef: The code expects non-VRAM mem nodes to have a pages

Re: [Nouveau] [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 maarten.lankho...@canonical.com 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

Re: [Nouveau] [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: The

Re: [Nouveau] [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 wrote: On

Re: [Nouveau] [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: Op

Re: [Nouveau] [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. Here, have a completely

Re: [Nouveau] [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 maarten.lankho...@canonical.com 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.

Re: [Nouveau] [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 line.

Re: [Nouveau] [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 not set,

Re: [Nouveau] [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

Re: [Nouveau] [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 imir...@alum.mit.edu 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

Re: [Nouveau] [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 imir...@alum.mit.edu 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

Re: [Nouveau] [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: [Nouveau] [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

[Nouveau] [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 pa...@iki.fi Tested-by: Pasi Kärkkäinen pa...@iki.fi