Re: [PATCH v7] Add udmabuf misc device

2018-09-10 Thread Gert Wollny
Using the kernel 4.19.0-rc2 it works now, so With the fix for not calling fput when memfd == NULL the patch is Reviewed-By: Gert Wollny best, Gert Am Montag, den 10.09.2018, 15:30 +0200 schrieb Gerd Hoffmann: > On Mon, Sep 10, 2018 at 01:31:08PM +0200, Gert Wollny wrote: > > Am Montag, den 1

Re: [PATCH v7] Add udmabuf misc device

2018-09-10 Thread Gert Wollny
Am Montag, den 10.09.2018, 15:30 +0200 schrieb Gerd Hoffmann: > On Mon, Sep 10, 2018 at 01:31:08PM +0200, Gert Wollny wrote: > > Am Montag, den 10.09.2018, 12:53 +0200 schrieb Gerd Hoffmann: > > > > > > By default qemu doesn't use memfd for backing storage, you have > > > to > > > explicitly confi

Re: [PATCH v7] Add udmabuf misc device

2018-09-10 Thread Gert Wollny
Am Montag, den 10.09.2018, 15:30 +0200 schrieb Gerd Hoffmann: > On Mon, Sep 10, 2018 at 01:31:08PM +0200, Gert Wollny wrote: > > Am Montag, den 10.09.2018, 12:53 +0200 schrieb Gerd Hoffmann: > > > > > > By default qemu doesn't use memfd for backing storage, you have > > > to > > > explicitly confi

Re: [PATCH v7] Add udmabuf misc device

2018-09-10 Thread Gerd Hoffmann
On Mon, Sep 10, 2018 at 01:31:08PM +0200, Gert Wollny wrote: > Am Montag, den 10.09.2018, 12:53 +0200 schrieb Gerd Hoffmann: > > > > By default qemu doesn't use memfd for backing storage, you have to > > explicitly configure qemu that way (see qemu commit log of the test > > branch): > > > >

Re: [PATCH v7] Add udmabuf misc device

2018-09-10 Thread Gert Wollny
Am Montag, den 10.09.2018, 12:53 +0200 schrieb Gerd Hoffmann: > > By default qemu doesn't use memfd for backing storage, you have to > explicitly configure qemu that way (see qemu commit log of the test > branch): > > qemu-system-x86_64 -m 2G > -object memory-backend-memfd,id=ram,

Re: [PATCH v7] Add udmabuf misc device

2018-09-10 Thread Gerd Hoffmann
On Mon, Sep 10, 2018 at 11:18:38AM +0200, Gert Wollny wrote: > Am Montag, den 10.09.2018, 10:37 +0200 schrieb Gerd Hoffmann: > ... > > > > The other question is of course, why did dma_buf_export fail for me > > > ... > > > > What exactly did you try? > > I ran > > qemu-system-x86_64 -enable-k

Re: [PATCH v7] Add udmabuf misc device

2018-09-10 Thread Gert Wollny
Am Montag, den 10.09.2018, 10:37 +0200 schrieb Gerd Hoffmann: ... > > The other question is of course, why did dma_buf_export fail for me > > ... > > What exactly did you try? I ran qemu-system-x86_64 -enable-kvm -smp 5 -M q35 -m 8G \ -drive format=raw,file=ubuntu.raw,if=virtio \ -n

Re: [PATCH v7] Add udmabuf misc device

2018-09-10 Thread Gerd Hoffmann
Hi, > > + fput(memfd); > > + } > > + memfd = NULL; > Now memfd is NULL > > + buf = dma_buf_export(&exp_info); > > + if (IS_ERR(buf)) { > > + ret = PTR_ERR(buf); > > + goto err_put_pages; > Assume an error occured > > +err_put_pages: > > + while (pgbuf

Re: [PATCH v7] Add udmabuf misc device

2018-09-09 Thread Gert Wollny
I am by no means a kernel expert, but Tomeu asked whether I could review this. Generally the patch looks okay, it applied (on top of 4.18.5-gentoo), and compiled without problems. However, running the experimental qemu branch I get a kernel bug: BUG: unable to handle kernel NULL pointer derefere