Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zqd96 opened this issue Feb 9, 2023 · 3 comments
Open
Labels

Comments

@zqd96
Copy link

zqd96 commented Feb 9, 2023

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
Copy link
Contributor

	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
Copy link
Contributor

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
Copy link
Author

zqd96 commented Feb 15, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants