[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <361fa200-479c-e1ef-b7d6-e666a256660f@tsinghua.edu.cn>
Date: Sun, 2 Aug 2020 22:52:48 +0800
From: Jia-Ju Bai <baijiaju@...nghua.edu.cn>
To: wangzhou1@...ilicon.com, herbert@...dor.apana.org.au,
davem@...emloft.net
Cc: linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [BUG] crypto: hisilicon: accessing the data mapped to streaming DMA
In qm_qp_ctx_cfg(), "sqc" and "aeqc" are mapped to streaming DMA:
eqc_dma = dma_map_single(..., eqc, ...);
......
aeqc_dma = dma_map_single(..., aeqc, ...);
Then "sqc" and "aeqc" are accessed at many places, such as:
eqc->base_l = cpu_to_le32(lower_32_bits(qm->eqe_dma));
eqc->base_h = cpu_to_le32(upper_32_bits(qm->eqe_dma));
......
aeqc->base_l = cpu_to_le32(lower_32_bits(qm->aeqe_dma));
aeqc->base_h = cpu_to_le32(upper_32_bits(qm->aeqe_dma));
These accesses may cause data inconsistency between CPU cache and hardware.
I am not sure how to properly fix this problem, and thus I only report it.
Best wishes,
Jia-Ju Bai
Powered by blists - more mailing lists