lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180514162617.GD28661@phenom.ffwll.local>
Date:   Mon, 14 May 2018 18:26:17 +0200
From:   Daniel Vetter <daniel@...ll.ch>
To:     Sean Paul <seanpaul@...omium.org>
Cc:     Souptick Joarder <jrdr.linux@...il.com>,
        linux-kernel@...r.kernel.org, Matthew Wilcox <willy@...radead.org>,
        dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH] gpu: drm: vgem: Change return type to vm_fault_t

On Thu, May 10, 2018 at 02:51:38PM -0400, Sean Paul wrote:
> On Thu, May 10, 2018 at 07:58:11PM +0530, Souptick Joarder wrote:
> > Hi Sean,
> > 
> > On Mon, Apr 16, 2018 at 8:32 PM, Souptick Joarder <jrdr.linux@...il.com> wrote:
> > > Use new return type vm_fault_t for fault handler.
> > >
> > > Signed-off-by: Souptick Joarder <jrdr.linux@...il.com>
> > > Reviewed-by: Matthew Wilcox <mawilcox@...rosoft.com>
> > > ---
> > >  drivers/gpu/drm/vgem/vgem_drv.c | 5 ++---
> > >  1 file changed, 2 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
> > > index 2524ff1..c64a859 100644
> > > --- a/drivers/gpu/drm/vgem/vgem_drv.c
> > > +++ b/drivers/gpu/drm/vgem/vgem_drv.c
> > > @@ -61,13 +61,13 @@ static void vgem_gem_free_object(struct drm_gem_object *obj)
> > >         kfree(vgem_obj);
> > >  }
> > >
> > > -static int vgem_gem_fault(struct vm_fault *vmf)
> > > +static vm_fault_t vgem_gem_fault(struct vm_fault *vmf)
> > >  {
> > >         struct vm_area_struct *vma = vmf->vma;
> > >         struct drm_vgem_gem_object *obj = vma->vm_private_data;
> > >         /* We don't use vmf->pgoff since that has the fake offset */
> > >         unsigned long vaddr = vmf->address;
> > > -       int ret;
> > > +       vm_fault_t ret = VM_FAULT_SIGBUS;
> > >         loff_t num_pages;
> > >         pgoff_t page_offset;
> > >         page_offset = (vaddr - vma->vm_start) >> PAGE_SHIFT;
> > > @@ -77,7 +77,6 @@ static int vgem_gem_fault(struct vm_fault *vmf)
> > >         if (page_offset > num_pages)
> > >                 return VM_FAULT_SIGBUS;
> > >
> > > -       ret = -ENOENT;
> > >         mutex_lock(&obj->pages_lock);
> > >         if (obj->pages) {
> > >                 get_page(obj->pages[page_offset]);
> > > --
> > > 1.9.1
> > >
> > 
> > Any further comment on this patch ?
> 
> Patch looks good to me. My build test fails, though, since vm_fault_t doesn't
> exist in drm-misc-next yet.

vm_fault_t is already in upstream, just needs Maarten to do a backmerge.
Which I think he's done by now ... Otherwise nag him more :-)
-Daniel

> 
> So, for now,
> 
> Reviewed-by: Sean Paul <seanpaul@...omium.org>
> 
> 
> -- 
> Sean Paul, Software Engineer, Google / Chromium OS
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ