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: <f944f2b4-17fe-41dc-a262-e266ac45b3ef@www.fastmail.com>
Date:   Sat, 02 Apr 2022 16:02:05 +0200
From:   "Sven Peter" <sven@...npeter.dev>
To:     "Janne Grunau" <j@...nau.net>
Cc:     "Arnd Bergmann" <arnd@...db.de>, "Keith Busch" <kbusch@...nel.org>,
        "axboe@...com" <axboe@...com>, "hch@....de" <hch@....de>,
        "sagi@...mberg.me" <sagi@...mberg.me>,
        "Hector Martin" <marcan@...can.st>,
        "Alyssa Rosenzweig" <alyssa@...enzweig.io>,
        "Rob Herring" <robh+dt@...nel.org>,
        "Marc Zyngier" <maz@...nel.org>, DTML <devicetree@...r.kernel.org>,
        "Linux ARM" <linux-arm-kernel@...ts.infradead.org>,
        "Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
        linux-nvme@...ts.infradead.org
Subject: Re: [PATCH 6/9] nvme-apple: Add initial Apple SoC NVMe driver



On Sat, Apr 2, 2022, at 15:58, Janne Grunau wrote:
> On 2022-04-02 15:34:55 +0200, Sven Peter wrote:
>> 
>> 
>> On Tue, Mar 22, 2022, at 14:38, Arnd Bergmann wrote:
>> > On Mon, Mar 21, 2022 at 5:50 PM Sven Peter <sven@...npeter.dev> wrote:
>> >
>> >> +static int apple_nvme_sart_dma_setup(void *cookie, struct apple_rtkit_shmem *bfr,
>> >> +                                    dma_addr_t iova, size_t size)
>> >> +{
>> >> +       struct apple_nvme *anv = cookie;
>> >> +       int ret;
>> >> +
>> >> +       if (iova)
>> >> +               return -EINVAL;
>> >> +
>> >> +       bfr->buffer = dma_alloc_coherent(anv->dev, size, &iova, GFP_KERNEL);
>> >> +       if (!bfr->buffer)
>> >> +               return -ENOMEM;
>> >
>> > You pass 'iova' as an argument, but then replace it with the address
>> > returned by dma_alloc_coherent(). Can you remove the function
>> > argument?
>> 
>> Yup, will remove it.
>
> You can remove it but we will have to add it back once we submit the dcp 
> driver (display co-processor). dcp is initialized during boot and uses a 
> single pre-allocated buffer which needs to be mapped instead of 
> allocated. It seemed easier to make apple_rtkit_ops.shmem_setup() 
> omnipotent than adding a different function pointer for this case.

Or we can already pass the iova DCP sent us into bfr->iova
and this function then has the task to just "do whatever is required
so that struct apple_rtkit_shmem *bfr is usable".


Sven

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ