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: <916e91c9-0710-0afb-2f49-4a7c7b4c02b5@oracle.com>
Date:   Tue, 12 Jun 2018 21:49:34 -0400
From:   Boris Ostrovsky <boris.ostrovsky@...cle.com>
To:     Oleksandr Andrushchenko <andr2000@...il.com>,
        xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org,
        dri-devel@...ts.freedesktop.org, linux-media@...r.kernel.org,
        jgross@...e.com, konrad.wilk@...cle.com
Cc:     daniel.vetter@...el.com, dongwon.kim@...el.com,
        matthew.d.roper@...el.com,
        Oleksandr Andrushchenko <oleksandr_andrushchenko@...m.com>
Subject: Re: [PATCH v3 7/9] xen/gntdev: Add initial support for dma-buf UAPI



On 06/12/2018 09:41 AM, Oleksandr Andrushchenko wrote:

> diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
> index a09db23e9663..e82660d81d7e 100644
> --- a/drivers/xen/gntdev.c
> +++ b/drivers/xen/gntdev.c
> @@ -48,6 +48,9 @@
>   #include <asm/xen/hypercall.h>
>   
>   #include "gntdev-common.h"
> +#ifdef CONFIG_XEN_GNTDEV_DMABUF
> +#include "gntdev-dmabuf.h"
> +#endif
>   
>   MODULE_LICENSE("GPL");
>   MODULE_AUTHOR("Derek G. Murray <Derek.Murray@...cam.ac.uk>, "
> @@ -566,6 +569,15 @@ static int gntdev_open(struct inode *inode, struct file *flip)
>   	INIT_LIST_HEAD(&priv->freeable_maps);
>   	mutex_init(&priv->lock);
>   
> +#ifdef CONFIG_XEN_GNTDEV_DMABUF
> +	priv->dmabuf_priv = gntdev_dmabuf_init();
> +	if (IS_ERR(priv->dmabuf_priv)) {
> +		ret = PTR_ERR(priv->dmabuf_priv);
> +		kfree(priv);
> +		return ret;
> +	}
> +#endif
> +
>   	if (use_ptemod) {
>   		priv->mm = get_task_mm(current);
>   		if (!priv->mm) {
> @@ -616,8 +628,13 @@ static int gntdev_release(struct inode *inode, struct file *flip)
>   	WARN_ON(!list_empty(&priv->freeable_maps));
>   	mutex_unlock(&priv->lock);
>   
> +#ifdef CONFIG_XEN_GNTDEV_DMABUF
> +	gntdev_dmabuf_fini(priv->dmabuf_priv);
> +#endif
> +
>   	if (use_ptemod)
>   		mmu_notifier_unregister(&priv->mn, priv->mm);
> +
>   	kfree(priv);
>   	return 0;
>   }
> @@ -987,6 +1004,107 @@ static long gntdev_ioctl_grant_copy(struct gntdev_priv *priv, void __user *u)
>   	return ret;
>   }
>   
> +#ifdef CONFIG_XEN_GNTDEV_DMABUF
> +static long
> +gntdev_ioctl_dmabuf_exp_from_refs(struct gntdev_priv *priv,
> +				  struct ioctl_gntdev_dmabuf_exp_from_refs __user *u)


Didn't we agree that this code moves to gntdev-dmabuf.c ?

-boris

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ