Re: [PATCH v3] block: sed-opal: kmalloc the cmd/resp buffers

From: Jens Axboe
Date: Tue Nov 08 2022 - 12:36:04 EST


On Mon, 7 Nov 2022 23:39:44 +0300, Serge Semin wrote:
> In accordance with [1] the DMA-able memory buffers must be
> cacheline-aligned otherwise the cache writing-back and invalidation
> performed during the mapping may cause the adjacent data being lost. It's
> specifically required for the DMA-noncoherent platforms [2]. Seeing the
> opal_dev.{cmd,resp} buffers are implicitly used for DMAs in the NVME and
> SCSI/SD drivers in framework of the nvme_sec_submit() and sd_sec_submit()
> methods respectively they must be cacheline-aligned to prevent the denoted
> problem. One of the option to guarantee that is to kmalloc the buffers
> [2]. Let's explicitly allocate them then instead of embedding into the
> opal_dev structure instance.
>
> [...]

Applied, thanks!

[1/1] block: sed-opal: kmalloc the cmd/resp buffers
(no commit info)

Best regards,
--
Jens Axboe