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] [day] [month] [year] [list]
Message-ID: <20181119122929.GA394@bombadil.infradead.org>
Date:   Mon, 19 Nov 2018 04:29:29 -0800
From:   Matthew Wilcox <willy@...radead.org>
To:     Oleksandr Andrushchenko <andr2000@...il.com>
Cc:     Souptick Joarder <jrdr.linux@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Michal Hocko <mhocko@...e.com>,
        oleksandr_andrushchenko@...m.com, airlied@...ux.ie,
        Linux-MM <linux-mm@...ck.org>, linux-kernel@...r.kernel.org,
        dri-devel@...ts.freedesktop.org, xen-devel@...ts.xen.org
Subject: Re: [Xen-devel] [PATCH 5/9] drm/xen/xen_drm_front_gem.c: Convert to
 use vm_insert_range

On Mon, Nov 19, 2018 at 01:02:46PM +0200, Oleksandr Andrushchenko wrote:
> On 11/19/18 12:42 PM, Souptick Joarder wrote:
> > On Mon, Nov 19, 2018 at 3:22 PM Oleksandr Andrushchenko
> > <andr2000@...il.com> wrote:
> > > > -     unsigned long addr = vma->vm_start;
> > > > -     int i;
> > > > +     int err;
> > > I would love to keep ret, not err
> > Sure, will add it in v2.
> > But I think, err is more appropriate here.
> 
> I used "ret" throughout the driver, so this is just to remain consistent:
> 
> grep -rnw err drivers/gpu/drm/xen/ | wc -l
> 0
> grep -rnw ret drivers/gpu/drm/xen/ | wc -l
> 204

It's your driver, so that's fine.  The reason we chose 'err' over 'ret'
is that there's a history of errno vs VM_FAULT_xxx code confusion in
this area.  Naming a variable 'err' makes it clear this is an errno and
not a vm_fault_t.

> > > With the above fixed,
> > > 
> > > Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@...m.com>

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ