diff mbox

crypto : sha1-mb : Add missing args_digest offset

Message ID 1453769169-27479-1-git-send-email-megha.dey@intel.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show

Commit Message

Dey, Megha Jan. 26, 2016, 12:46 a.m. UTC
From: Megha Dey <megha.dey@linux.intel.com>

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.

Signed-off-by: Megha Dey <megha.dey@linux.intel.com>
---
 arch/x86/crypto/sha-mb/sha1_mb_mgr_submit_avx2.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tim Chen Jan. 26, 2016, 1:17 a.m. UTC | #1
On Mon, 2016-01-25 at 16:46 -0800, Megha Dey wrote:
> From: Megha Dey <megha.dey@linux.intel.com>
> 
> 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.

Acked-by: Tim Chen <tim.c.chen@linux.intel.com>

> Signed-off-by: Megha Dey <megha.dey@linux.intel.com>
> ---
>  arch/x86/crypto/sha-mb/sha1_mb_mgr_submit_avx2.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/crypto/sha-mb/sha1_mb_mgr_submit_avx2.S b/arch/x86/crypto/sha-mb/sha1_mb_mgr_submit_avx2.S
> index 2ab9560..c420d89 100644
> --- a/arch/x86/crypto/sha-mb/sha1_mb_mgr_submit_avx2.S
> +++ b/arch/x86/crypto/sha-mb/sha1_mb_mgr_submit_avx2.S
> @@ -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)


--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Herbert Xu Jan. 27, 2016, 2:16 p.m. UTC | #2
On Mon, Jan 25, 2016 at 04:46:09PM -0800, Megha Dey wrote:
> From: Megha Dey <megha.dey@linux.intel.com>
> 
> 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.
> 
> Signed-off-by: Megha Dey <megha.dey@linux.intel.com>

Applied.
diff mbox

Patch

diff --git a/arch/x86/crypto/sha-mb/sha1_mb_mgr_submit_avx2.S b/arch/x86/crypto/sha-mb/sha1_mb_mgr_submit_avx2.S
index 2ab9560..c420d89 100644
--- a/arch/x86/crypto/sha-mb/sha1_mb_mgr_submit_avx2.S
+++ b/arch/x86/crypto/sha-mb/sha1_mb_mgr_submit_avx2.S
@@ -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)