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: <64f74be5-1d49-012c-46de-e49c6006997f@ti.com>
Date:   Mon, 11 Feb 2019 18:07:20 +0530
From:   Kishon Vijay Abraham I <kishon@...com>
To:     Gustavo Pimentel <gustavo.pimentel@...opsys.com>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Wen Yang <wen.yang99@....com.cn>
CC:     Bjorn Helgaas <bhelgaas@...gle.com>,
        "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "zhong.weidong@....com.cn" <zhong.weidong@....com.cn>,
        Niklas Cassel <niklas.cassel@...s.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Cyrille Pitchen <cyrille.pitchen@...e-electrons.com>
Subject: Re: [PATCH v2] PCI: endpoint: functions: Use kmemdup instead of
 duplicating its function

Hi Gustavo,

On 11/02/19 2:45 PM, Gustavo Pimentel wrote:
> On 11/02/2019 05:48, Kishon Vijay Abraham I wrote:
>> Hi Lorenzo,
>>
>> On 08/02/19 5:50 PM, Lorenzo Pieralisi wrote:
>>> On Thu, Dec 06, 2018 at 08:52:25PM +0800, Wen Yang wrote:
>>>> kmemdup has implemented the function that kmalloc() + memcpy().
>>>> We prefer to kmemdup rather than code opened implementation.
>>>>
>>>> This issue was detected with the help of coccinelle.
>>>>
>>>> Signed-off-by: Wen Yang <wen.yang99@....com.cn>
>>>> CC: Kishon Vijay Abraham I <kishon@...com>
>>>> CC: Lorenzo Pieralisi <lorenzo.pieralisi@....com>
>>>> CC: Bjorn Helgaas <bhelgaas@...gle.com>
>>>> CC: Gustavo Pimentel <gustavo.pimentel@...opsys.com>
>>>> CC: Niklas Cassel <niklas.cassel@...s.com>
>>>> CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>>>> CC: Cyrille Pitchen <cyrille.pitchen@...e-electrons.com>
>>>> CC: linux-pci@...r.kernel.org (open list:PCI ENDPOINT SUBSYSTEM)
>>>> CC: linux-kernel@...r.kernel.org (open list)
>>>> ---
>>>>  drivers/pci/endpoint/functions/pci-epf-test.c | 4 +---
>>>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>>
>>> Kishon,
>>>
>>> this looks OK to me, anything I am missing ?
>>
>> For the existing code this might seem the right thing to do but ideally the
>> memcpy here should be changed to memcpy_fromio/memcpy_toio.
>>
>> Also later when we plan to use DMA (on the endpoint) for data transfer, we have
>> to use kzalloc and dma_map_single APIs.
> 
> Are you considering to use the eDMA driver that I'm developing?

I used system DMA for my testing. But in the DesignWare driver, we should be
able to choose between system DMA or any other DMA based on the platforms
capabilities.

Thanks
Kishon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ