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]
Date:   Thu, 6 Feb 2020 07:43:38 +0100
From:   Gerd Hoffmann <kraxel@...hat.com>
To:     Chia-I Wu <olvaffe@...il.com>
Cc:     ML dri-devel <dri-devel@...ts.freedesktop.org>,
        Gurchetan Singh <gurchetansingh@...omium.org>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        "open list:VIRTIO GPU DRIVER" 
        <virtualization@...ts.linux-foundation.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/4] drm/virtio: resource teardown tweaks

> > -
> > -       drm_gem_shmem_free_object(obj);
> > +       if (bo->created) {
> > +               virtio_gpu_cmd_unref_resource(vgdev, bo);
> > +               /* completion handler calls virtio_gpu_cleanup_object() */
> nitpick: we don't need this comment when virtio_gpu_cmd_unref_cb is
> defined by this file and passed to virtio_gpu_cmd_unref_resource.

I want virtio_gpu_cmd_unref_cb + virtio_gpu_cmd_unref_resource being
placed next to each other so it is easier to see how they work hand in
hand.

> I happen to be looking at our error handling paths.  I think we want
> virtio_gpu_queue_fenced_ctrl_buffer to call vbuf->resp_cb on errors.

/me was thinking about that too.  Yes, we will need either that,
or a separate vbuf->error_cb callback.  That'll be another patch
though.

> > +       /*
> > +        * We are in the release callback and do NOT want refcount
> > +        * bo, so do NOT use virtio_gpu_array_add_obj().
> > +        */
> > +       vbuf->objs = virtio_gpu_array_alloc(1);
> > +       vbuf->objs->objs[0] = &bo->base.base
> This is an abuse of obj array.  Add "void *private_data;" to
> virtio_gpu_vbuffer and use that maybe?

I'd name that *cb_data, but yes, that makes sense.

cheers,
  Gerd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ