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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1465b863-8ea4-9200-3332-11777f537390@gmail.com>
Date:   Fri, 11 Jan 2019 13:03:39 +0200
From:   Oleksandr Andrushchenko <andr2000@...il.com>
To:     Gerd Hoffmann <kraxel@...hat.com>, dri-devel@...ts.freedesktop.org
Cc:     David Airlie <airlied@...ux.ie>,
        open list <linux-kernel@...r.kernel.org>,
        "open list:VIRTIO GPU DRIVER" 
        <virtualization@...ts.linux-foundation.org>
Subject: Re: [PATCH] drm/virtio: drop prime import/export callbacks

On 1/10/19 1:15 PM, Gerd Hoffmann wrote:
> Also set prime_handle_to_fd and prime_fd_to_handle to NULL,
> so drm will not advertive DRM_PRIME_CAP_{IMPORT,EXPORT} to
> userspace.
>
> Signed-off-by: Gerd Hoffmann <kraxel@...hat.com>
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@...m.com>
> ---
>   drivers/gpu/drm/virtio/virtgpu_drv.h   |  4 ----
>   drivers/gpu/drm/virtio/virtgpu_drv.c   |  4 ----
>   drivers/gpu/drm/virtio/virtgpu_prime.c | 14 --------------
>   3 files changed, 22 deletions(-)
>
> diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h
> index cf896d8793..4f2f3c43a4 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_drv.h
> +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
> @@ -354,10 +354,6 @@ int virtio_gpu_object_wait(struct virtio_gpu_object *bo, bool no_wait);
>   /* virtgpu_prime.c */
>   int virtgpu_gem_prime_pin(struct drm_gem_object *obj);
>   void virtgpu_gem_prime_unpin(struct drm_gem_object *obj);
> -struct sg_table *virtgpu_gem_prime_get_sg_table(struct drm_gem_object *obj);
> -struct drm_gem_object *virtgpu_gem_prime_import_sg_table(
> -	struct drm_device *dev, struct dma_buf_attachment *attach,
> -	struct sg_table *sgt);
>   void *virtgpu_gem_prime_vmap(struct drm_gem_object *obj);
>   void virtgpu_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
>   int virtgpu_gem_prime_mmap(struct drm_gem_object *obj,
> diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/virtgpu_drv.c
> index af92964b68..b996ac1d4f 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_drv.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c
> @@ -205,14 +205,10 @@ static struct drm_driver driver = {
>   #if defined(CONFIG_DEBUG_FS)
>   	.debugfs_init = virtio_gpu_debugfs_init,
>   #endif
> -	.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
> -	.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
>   	.gem_prime_export = drm_gem_prime_export,
>   	.gem_prime_import = drm_gem_prime_import,
>   	.gem_prime_pin = virtgpu_gem_prime_pin,
>   	.gem_prime_unpin = virtgpu_gem_prime_unpin,
> -	.gem_prime_get_sg_table = virtgpu_gem_prime_get_sg_table,
> -	.gem_prime_import_sg_table = virtgpu_gem_prime_import_sg_table,
>   	.gem_prime_vmap = virtgpu_gem_prime_vmap,
>   	.gem_prime_vunmap = virtgpu_gem_prime_vunmap,
>   	.gem_prime_mmap = virtgpu_gem_prime_mmap,
> diff --git a/drivers/gpu/drm/virtio/virtgpu_prime.c b/drivers/gpu/drm/virtio/virtgpu_prime.c
> index 86ce0ae93f..c59ec34c80 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_prime.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_prime.c
> @@ -39,20 +39,6 @@ void virtgpu_gem_prime_unpin(struct drm_gem_object *obj)
>   	WARN_ONCE(1, "not implemented");
>   }
>   
> -struct sg_table *virtgpu_gem_prime_get_sg_table(struct drm_gem_object *obj)
> -{
> -	WARN_ONCE(1, "not implemented");
> -	return ERR_PTR(-ENODEV);
> -}
> -
> -struct drm_gem_object *virtgpu_gem_prime_import_sg_table(
> -	struct drm_device *dev, struct dma_buf_attachment *attach,
> -	struct sg_table *table)
> -{
> -	WARN_ONCE(1, "not implemented");
> -	return ERR_PTR(-ENODEV);
> -}
> -
>   void *virtgpu_gem_prime_vmap(struct drm_gem_object *obj)
>   {
>   	struct virtio_gpu_object *bo = gem_to_virtio_gpu_obj(obj);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ