Skip to contentSkip to conversation

crypto : sha1-mb : Add missing args_digest offset

PATCH Applied Megha Dey 3 participants 3 messages Jan 26, 2016 – Jan 27, 2016

Subsystems (2)
lore
Share & tools
lore

Megha Dey

author
#0 lore raw

PATCH 1/1 crypto : sha1-mb : Add missing args_digest offset

From: Megha Dey <[email protected]>

The _args_digest is defined as _args+_digest, both of which are the first members of 2 separate structures, effectively yielding _args_digest to have a value of zero. Thus, no errors have spawned yet due to this. To ensure sanity, adding the missing _args_digest offset to the sha1_mb_mgr_submit.S.

---
 arch/x86/crypto/sha-mb/sha1_mb_mgr_submit_avx2.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/crypto/sha-mb/sha1_mb_mgr_submit_avx2.S +1 -1
index 2ab9560..c420d89 100644
@@ -197,7 +197,7 @@ len_is_0:
 	vpinsrd  $1, _args_digest+1*32(state , idx, 4), %xmm0, %xmm0
 	vpinsrd  $2, _args_digest+2*32(state , idx, 4), %xmm0, %xmm0
 	vpinsrd  $3, _args_digest+3*32(state , idx, 4), %xmm0, %xmm0
-	movl    4*32(state, idx, 4), DWORD_tmp
+	movl     _args_digest+4*32(state, idx, 4), DWORD_tmp
 
 	vmovdqu  %xmm0, _result_digest(job_rax)
 	movl    DWORD_tmp, _result_digest+1*16(job_rax)
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Megha Dey

From: Megha Dey <[email protected]>

The _args_digest is defined as _args+_digest, both of which are the first members of 2 separate structures, effectively yielding _args_digest to have a value of zero. Thus, no errors have spawned yet due to this. To ensure sanity, adding the missing _args_digest offset to the sha1_mb_mgr_submit.S.

Thanks for cleaning this up.

Quoted 18 lines
---
 arch/x86/crypto/sha-mb/sha1_mb_mgr_submit_avx2.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/crypto/sha-mb/sha1_mb_mgr_submit_avx2.S +1 -1
index 2ab9560..c420d89 100644
@@ -197,7 +197,7 @@ len_is_0:
 	vpinsrd  $1, _args_digest+1*32(state , idx, 4), %xmm0, %xmm0
 	vpinsrd  $2, _args_digest+2*32(state , idx, 4), %xmm0, %xmm0
 	vpinsrd  $3, _args_digest+3*32(state , idx, 4), %xmm0, %xmm0
-	movl    4*32(state, idx, 4), DWORD_tmp
+	movl     _args_digest+4*32(state, idx, 4), DWORD_tmp
 
 	vmovdqu  %xmm0, _result_digest(job_rax)
 	movl    DWORD_tmp, _result_digest+1*16(job_rax)
maintainer Applied
#2 lore raw
In reply to Megha Dey
Quoted 8 lines · Megha Dey

From: Megha Dey <[email protected]>

The _args_digest is defined as _args+_digest, both of which are the first members of 2 separate structures, effectively yielding _args_digest to have a value of zero. Thus, no errors have spawned yet due to this. To ensure sanity, adding the missing _args_digest offset to the sha1_mb_mgr_submit.S.

Applied.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt