Commit 4459b320 authored by Yabin Li's avatar Yabin Li Committed by yangdepei
Browse files

crypto: ccp: It prompt ILLEGAL_MEM_ADDR when using PSPCCP.

hygon inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I99ZNA



--------------------------------

ccp_find_lsb_regions check from vq_1 but status value start from vq_0.
Fixes: 4b394a23 ("crypto: ccp - Let a v5 CCP provide the same function as v3")

Signed-off-by: default avatarYabin Li <liyabin@hygon.cn>
Signed-off-by: default avataryangdepei <yangdepei@hygon.cn>
parent 65974469
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -783,6 +783,7 @@ static int ccp_find_lsb_regions(struct ccp_cmd_queue *cmd_q, u64 status)
	/* Build a bit mask to know which LSBs this queue has access to.
	 * Don't bother with segment 0 as it has special privileges.
	 */
	status >>= LSB_REGION_WIDTH;
	for (j = 1; j < MAX_LSB_CNT; j++) {
		if (status & q_mask)
			bitmap_set(cmd_q->lsbmask, j, 1);