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: <fec615f661c6d244ee37ec082df25b1943add135.camel@microchip.com>
Date:   Fri, 14 Apr 2023 23:33:59 +0000
From:   <Kelvin.Cao@...rochip.com>
To:     <vkoul@...nel.org>
CC:     <dmaengine@...r.kernel.org>, <George.Ge@...rochip.com>,
        <linux-kernel@...r.kernel.org>, <logang@...tatee.com>,
        <christophe.jaillet@...adoo.fr>
Subject: Re: [PATCH v3 1/1] dmaengine: switchtec-dma: Introduce Switchtec DMA
 engine PCI driver

On Wed, 2023-04-12 at 22:33 +0530, Vinod Koul wrote:

> > +#include <linux/circ_buf.h>
> > +#include <linux/dmaengine.h>
> > +#include <linux/module.h>
> > +#include <linux/pci.h>
> > +#include <linux/delay.h>
> > +
> > +#include "dmaengine.h"
> > +
> > +MODULE_DESCRIPTION("Switchtec PCIe Switch DMA Engine");
> > +MODULE_VERSION("0.1");
> 
> what is the use of this?
Not sure if I get it correctly. As a loadable module, it shows
'version: 0.1' for modinfo
> > 
> > +#define HALT_RETRY 100
> > +static int halt_channel(struct switchtec_dma_chan *swdma_chan)
> > +{
> > +     u32 status;
> > +     struct chan_hw_regs __iomem *chan_hw = swdma_chan-
> > >mmio_chan_hw;
> > +     int retry = HALT_RETRY;
> > +     struct pci_dev *pdev;
> > +     int ret;
> > +
> > +     rcu_read_lock();
> > +     pdev = rcu_dereference(swdma_chan->swdma_dev->pdev);
> 
> that sounds fishy, why does a driver need to use rcu functions
RCU is used to synchronize driver unbind and low level PCI operations.

The unbind issue was first spotted and fixed by Logan:
https://lore.kernel.org/all/20191216190120.21374-1-logang@deltatee.com/

> 
Thanks,
Kelvin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ