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: <20200923060246.GA11550@infradead.org>
Date:   Wed, 23 Sep 2020 07:02:46 +0100
From:   Christoph Hellwig <hch@...radead.org>
To:     Peter Ujfalusi <peter.ujfalusi@...com>
Cc:     herbert@...dor.apana.org.au, t-kristo@...com, davem@...emloft.net,
        linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
        j-keerthy@...com
Subject: Re: [PATCH] crypto: sa2ul: Fix DMA mapping API usage

On Mon, Sep 21, 2020 at 02:38:46PM +0300, Peter Ujfalusi wrote:
> Make sure that we call the dma_unmap_sg on the correct scatterlist on
> completion with the correct sg_nents.
> 
> We also should be calling dma_sync_sg_for_device() on the tx buffer before
> giving it to the DMA and the dma_sync_sg_for_cpu() should be called on the
> scatterlist we received the data back.

You might want to look into using struct sg_table and the DMA mapping
helpers using it to simplify this a bit.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ