diff mbox series

[v3,07/14] crypto: blake2s - add comment for blake2s_state fields

Message ID 20201223081003.373663-8-ebiggers@kernel.org (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series crypto: arm32-optimized BLAKE2b and BLAKE2s | expand

Commit Message

Eric Biggers Dec. 23, 2020, 8:09 a.m. UTC
From: Eric Biggers <ebiggers@google.com>

The first three fields of 'struct blake2s_state' are used in assembly
code, which isn't immediately obvious, so add a comment to this effect.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 include/crypto/blake2s.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Ard Biesheuvel Dec. 23, 2020, 9:07 a.m. UTC | #1
On Wed, 23 Dec 2020 at 09:12, Eric Biggers <ebiggers@kernel.org> wrote:
>
> From: Eric Biggers <ebiggers@google.com>
>
> The first three fields of 'struct blake2s_state' are used in assembly
> code, which isn't immediately obvious, so add a comment to this effect.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>

Acked-by: Ard Biesheuvel <ardb@kernel.org>

> ---
>  include/crypto/blake2s.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/include/crypto/blake2s.h b/include/crypto/blake2s.h
> index 734ed22b7a6aa..f1c8330a61a91 100644
> --- a/include/crypto/blake2s.h
> +++ b/include/crypto/blake2s.h
> @@ -24,6 +24,7 @@ enum blake2s_lengths {
>  };
>
>  struct blake2s_state {
> +       /* 'h', 't', and 'f' are used in assembly code, so keep them as-is. */
>         u32 h[8];
>         u32 t[2];
>         u32 f[2];
> --
> 2.29.2
>
diff mbox series

Patch

diff --git a/include/crypto/blake2s.h b/include/crypto/blake2s.h
index 734ed22b7a6aa..f1c8330a61a91 100644
--- a/include/crypto/blake2s.h
+++ b/include/crypto/blake2s.h
@@ -24,6 +24,7 @@  enum blake2s_lengths {
 };
 
 struct blake2s_state {
+	/* 'h', 't', and 'f' are used in assembly code, so keep them as-is. */
 	u32 h[8];
 	u32 t[2];
 	u32 f[2];