sha256_mb_mgr_ce: 'state->ldata[idx].job_in_lane->len' incorrect update #113

Open
opened 2023-02-08 21:18:26 -06:00 by zqd96 · 3 comments
zqd96 commented 2023-02-08 21:18:26 -06:00 (Migrated from github.com)

sha256_mb/aarch64/sha256_mb_mgr_ce.c:
In block( line 169- 175), local variable 'len' shows 'block_num << 4', while 'state->ldata[idx].job_in_lane->len' stands for 'block_num'.

In this way, an assignment error occurred in line 172 'state->ldata[i].job_in_lane->len -= len'. Would this issue cause potential problems? Look forward to anyone's response.

sha256_mb/aarch64/sha256_mb_mgr_ce.c: In block( line 169- 175), local variable 'len' shows 'block_num << 4', while 'state->ldata[idx].job_in_lane->len' stands for 'block_num'. In this way, an assignment error occurred in line 172 'state->ldata[i].job_in_lane->len -= len'. Would this issue cause potential problems? Look forward to anyone's response.
chenxuqiang commented 2023-02-09 07:33:30 -06:00 (Migrated from github.com)
	for (i = 0; i < SHA256_MAX_LANES; i++) {
		if (LANE_IS_NOT_FINISHED(state, i)) {
			state->lens[i] -= len;
			state->ldata[i].job_in_lane->len -= len;   /* this */
			state->ldata[i].job_in_lane->buffer += len << 2;
		}
	}
``` for (i = 0; i < SHA256_MAX_LANES; i++) { if (LANE_IS_NOT_FINISHED(state, i)) { state->lens[i] -= len; state->ldata[i].job_in_lane->len -= len; /* this */ state->ldata[i].job_in_lane->buffer += len << 2; } } ```
gbtucker commented 2023-02-14 17:52:43 -06:00 (Migrated from github.com)

I'm not sure how this works in the arm portion. job.len is used elsewhere as length in number of blocks. Have you seen it cause any issues?

I'm not sure how this works in the arm portion. job.len is used elsewhere as length in number of blocks. Have you seen it cause any issues?
zqd96 commented 2023-02-15 00:04:07 -06:00 (Migrated from github.com)

Thanks. No issues have been found so far. It's just that I have doubts when reading the source code.

Thanks. No issues have been found so far. It's just that I have doubts when reading the source code.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-intel/isa-l_crypto#113
No description provided.