Re: [PATCH v4 00/11] dmaengine: qcom: bam_dma: add cmd descriptor support

From: Md Sadre Alam
Date: Wed Nov 20 2024 - 02:16:16 EST




On 9/9/2024 2:56 PM, Md Sadre Alam wrote:
Requirements:
In QCE crypto driver we are accessing the crypto engine registers
directly via CPU read/write. Trust Zone could possibly to perform some
crypto operations simultaneously, a race condition will be created and
this could result in undefined behavior.

To avoid this behavior we need to use BAM HW LOCK/UNLOCK feature on BAM
pipes, and this LOCK/UNLOCK will be set via sending a command descriptor,
where the HLOS/TZ QCE crypto driver prepares a command descriptor with a
dummy write operation on one of the QCE crypto engine register and pass
the LOCK/UNLOCK flag along with it.

This feature tested with tcrypt.ko and "libkcapi" with all the AES
algorithm supported by QCE crypto engine. Tested on IPQ9574 and
qcm6490.LE chipset.

Hi,

Could you please provide feedback for this patch series.

Thanks
Alam.