[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ec401a51-5895-fce7-1075-a2c964466d2b@codethink.co.uk>
Date: Wed, 6 Jul 2022 10:47:24 +0100
From: Ben Dooks <ben.dooks@...ethink.co.uk>
To: Christoph Hellwig <hch@....de>,
LABBE Corentin <clabbe@...libre.com>
Cc: herbert@...dor.apana.org.au, heiko@...ech.de,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-riscv@...ts.infradead.org, linux-sunxi@...ts.linux.dev
Subject: Re: [RFC PATCH] crypto: flush poison data
On 05/07/2022 17:42, Christoph Hellwig wrote:
> On Tue, Jul 05, 2022 at 10:21:13AM +0200, LABBE Corentin wrote:
>>
>> I just copied what did drivers/crypto/xilinx/zynqmp-sha.c.
>> I tried to do flush_dcache_range() but it seems to not be implemented on riscV.
>
> That driver is broken and should no have been merged in that form.
>
>> And flush_dcache_page(virt_to_page(addr), len) produce a kernel panic.
>
> And that's good so. Drivers have no business doing their own cache
> flushing. That is the job of the dma-mapping implementation, so I'd
> suggest to look for problems there.
I'm not sure that the dma-mapping code for non-coherent riscv systems
did get sorted. I couldn't find any when looking in 5.17.
I expect the flush of the icache is also implicitly doing a dcache
flush too as from what i've seen it is only being used when code or
tlbs are being modified.
--
Ben Dooks http://www.codethink.co.uk/
Senior Engineer Codethink - Providing Genius
https://www.codethink.co.uk/privacy.html
Powered by blists - more mailing lists