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: <fcdf6f6325d8afbd6c0b91c782b8ef89ba3dc1d0.camel@suse.de>
Date:   Thu, 26 Sep 2019 11:06:31 +0200
From:   Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
To:     Rob Herring <robh@...nel.org>,
        Oleksandr Andrushchenko <oleksandr_andrushchenko@...m.com>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>
Cc:     linux-kernel@...r.kernel.org, Robin Murphy <robin.murphy@....com>,
        Julien Grall <julien.grall@....com>,
        Juergen Gross <jgross@...e.com>,
        Stefano Stabellini <sstabellini@...nel.org>,
        xen-devel@...ts.xenproject.org
Subject: Re: [RFC PATCH] xen/gntdev: Stop abusing DT of_dma_configure API

On Wed, 2019-09-25 at 16:50 -0500, Rob Herring wrote:
> As the comment says, this isn't a DT based device. of_dma_configure()
> is going to stop allowing a NULL DT node, so this needs to be fixed.
> 
> Not sure exactly what setup besides arch_setup_dma_ops is needed...
> 
> Cc: Robin Murphy <robin.murphy@....com>
> Cc: Julien Grall <julien.grall@....com>
> Cc: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
> Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@...m.com>
> Cc: Boris Ostrovsky <boris.ostrovsky@...cle.com>
> Cc: Juergen Gross <jgross@...e.com>
> Cc: Stefano Stabellini <sstabellini@...nel.org>
> Cc: xen-devel@...ts.xenproject.org
> Signed-off-by: Rob Herring <robh@...nel.org>

Just so it isn't forgotten, the same applies here:

diff --git a/drivers/gpu/drm/xen/xen_drm_front.c
b/drivers/gpu/drm/xen/xen_drm_front.c
index ba1828acd8c9..de316a891f39 100644
--- a/drivers/gpu/drm/xen/xen_drm_front.c
+++ b/drivers/gpu/drm/xen/xen_drm_front.c
@@ -11,7 +11,6 @@
 #include <linux/delay.h>
 #include <linux/dma-mapping.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
 
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_drv.h>
@@ -718,19 +717,7 @@ static int xen_drv_probe(struct xenbus_device *xb_dev,
        struct device *dev = &xb_dev->dev;
        int ret;
 
-       /*
-        * The device is not spawn from a device tree, so arch_setup_dma_ops
-        * is not called, thus leaving the device with dummy DMA ops.
-        * This makes the device return error on PRIME buffer import, which
-        * is not correct: to fix this call of_dma_configure() with a NULL
-        * node to set default DMA ops.
-        */
        dev->coherent_dma_mask = DMA_BIT_MASK(32);
-       ret = of_dma_configure(dev, NULL, true);
-       if (ret < 0) {
-               DRM_ERROR("Cannot setup DMA ops, ret %d", ret);
-               return ret;
-       }
 
        front_info = devm_kzalloc(&xb_dev->dev,
                                  sizeof(*front_info), GFP_KERNEL);


Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ