* [PATCH] lib/crypto: arm/blake2s: Fix some comments
@ 2025-11-02 1:45 Eric Biggers
2025-11-02 2:15 ` [PATCH v2] " Eric Biggers
0 siblings, 1 reply; 4+ messages in thread
From: Eric Biggers @ 2025-11-02 1:45 UTC (permalink / raw)
To: linux-crypto
Cc: linux-kernel, Ard Biesheuvel, Jason A . Donenfeld, Herbert Xu,
Eric Biggers
Fix the indices in some comments in blake2s-core.S.
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
This is targeting libcrypto-next
lib/crypto/arm/blake2s-core.S | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/crypto/arm/blake2s-core.S b/lib/crypto/arm/blake2s-core.S
index 14eb7c18a836..5553e473f131 100644
--- a/lib/crypto/arm/blake2s-core.S
+++ b/lib/crypto/arm/blake2s-core.S
@@ -207,22 +207,22 @@ ENTRY(blake2s_compress)
_le32_bswap_8x r2, r3, r4, r5, r6, r7, r8, r9, r14
stmia r12, {r2-r9}
.Lcopy_block_done:
str r1, [sp, #68] // Update message pointer
- // Calculate v[8..15]. Push v[9..15] onto the stack, and leave space
+ // Calculate v[8..15]. Push v[10..15] onto the stack, and leave space
// for spilling v[8..9]. Leave v[8..9] in r8-r9.
mov r14, r0 // r14 = ctx
adr r12, .Lblake2s_IV
ldmia r12!, {r8-r9} // load IV[0..1]
__ldrd r0, r1, r14, 40 // load f[0..1]
- ldm r12, {r2-r7} // load IV[3..7]
+ ldm r12, {r2-r7} // load IV[2..7]
eor r4, r4, r10 // v[12] = IV[4] ^ t[0]
eor r5, r5, r11 // v[13] = IV[5] ^ t[1]
eor r6, r6, r0 // v[14] = IV[6] ^ f[0]
eor r7, r7, r1 // v[15] = IV[7] ^ f[1]
- push {r2-r7} // push v[9..15]
+ push {r2-r7} // push v[10..15]
sub sp, sp, #8 // leave space for v[8..9]
// Load h[0..7] == v[0..7].
ldm r14, {r0-r7}
base-commit: 5a2a5e62a5216ba05d4481cf90d915f4de0bfde9
--
2.51.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2] lib/crypto: arm/blake2s: Fix some comments
2025-11-02 1:45 [PATCH] lib/crypto: arm/blake2s: Fix some comments Eric Biggers
@ 2025-11-02 2:15 ` Eric Biggers
2025-11-03 8:16 ` Ard Biesheuvel
2025-11-03 17:34 ` Eric Biggers
0 siblings, 2 replies; 4+ messages in thread
From: Eric Biggers @ 2025-11-02 2:15 UTC (permalink / raw)
To: linux-crypto
Cc: linux-kernel, Ard Biesheuvel, Jason A . Donenfeld, Herbert Xu,
Eric Biggers
Fix the indices in some comments in blake2s-core.S.
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
v2: Fixed the same mistake in another place.
This patch is targeting libcrypto-next
lib/crypto/arm/blake2s-core.S | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/crypto/arm/blake2s-core.S b/lib/crypto/arm/blake2s-core.S
index 14eb7c18a836..933f0558b7cd 100644
--- a/lib/crypto/arm/blake2s-core.S
+++ b/lib/crypto/arm/blake2s-core.S
@@ -113,11 +113,11 @@
eor \b1, \c1, \b1, ror#12
.endm
// Execute one round of BLAKE2s by updating the state matrix v[0..15]. v[0..9]
// are in r0..r9. The stack pointer points to 8 bytes of scratch space for
-// spilling v[8..9], then to v[9..15], then to the message block. r10-r12 and
+// spilling v[8..9], then to v[10..15], then to the message block. r10-r12 and
// r14 are free to use. The macro arguments s0-s15 give the order in which the
// message words are used in this round.
//
// All rotates are performed using the implicit rotate operand accepted by the
// 'add' and 'eor' instructions. This is faster than using explicit rotate
@@ -207,22 +207,22 @@ ENTRY(blake2s_compress)
_le32_bswap_8x r2, r3, r4, r5, r6, r7, r8, r9, r14
stmia r12, {r2-r9}
.Lcopy_block_done:
str r1, [sp, #68] // Update message pointer
- // Calculate v[8..15]. Push v[9..15] onto the stack, and leave space
+ // Calculate v[8..15]. Push v[10..15] onto the stack, and leave space
// for spilling v[8..9]. Leave v[8..9] in r8-r9.
mov r14, r0 // r14 = ctx
adr r12, .Lblake2s_IV
ldmia r12!, {r8-r9} // load IV[0..1]
__ldrd r0, r1, r14, 40 // load f[0..1]
- ldm r12, {r2-r7} // load IV[3..7]
+ ldm r12, {r2-r7} // load IV[2..7]
eor r4, r4, r10 // v[12] = IV[4] ^ t[0]
eor r5, r5, r11 // v[13] = IV[5] ^ t[1]
eor r6, r6, r0 // v[14] = IV[6] ^ f[0]
eor r7, r7, r1 // v[15] = IV[7] ^ f[1]
- push {r2-r7} // push v[9..15]
+ push {r2-r7} // push v[10..15]
sub sp, sp, #8 // leave space for v[8..9]
// Load h[0..7] == v[0..7].
ldm r14, {r0-r7}
base-commit: 5a2a5e62a5216ba05d4481cf90d915f4de0bfde9
--
2.51.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] lib/crypto: arm/blake2s: Fix some comments
2025-11-02 2:15 ` [PATCH v2] " Eric Biggers
@ 2025-11-03 8:16 ` Ard Biesheuvel
2025-11-03 17:34 ` Eric Biggers
1 sibling, 0 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2025-11-03 8:16 UTC (permalink / raw)
To: Eric Biggers; +Cc: linux-crypto, linux-kernel, Jason A . Donenfeld, Herbert Xu
On Sun, 2 Nov 2025 at 03:16, Eric Biggers <ebiggers@kernel.org> wrote:
>
> Fix the indices in some comments in blake2s-core.S.
>
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
> ---
>
> v2: Fixed the same mistake in another place.
>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] lib/crypto: arm/blake2s: Fix some comments
2025-11-02 2:15 ` [PATCH v2] " Eric Biggers
2025-11-03 8:16 ` Ard Biesheuvel
@ 2025-11-03 17:34 ` Eric Biggers
1 sibling, 0 replies; 4+ messages in thread
From: Eric Biggers @ 2025-11-03 17:34 UTC (permalink / raw)
To: linux-crypto
Cc: linux-kernel, Ard Biesheuvel, Jason A . Donenfeld, Herbert Xu
On Sat, Nov 01, 2025 at 07:15:53PM -0700, Eric Biggers wrote:
> Fix the indices in some comments in blake2s-core.S.
>
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
> ---
>
> v2: Fixed the same mistake in another place.
>
> This patch is targeting libcrypto-next
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=libcrypto-next
- Eric
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-11-03 17:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-02 1:45 [PATCH] lib/crypto: arm/blake2s: Fix some comments Eric Biggers
2025-11-02 2:15 ` [PATCH v2] " Eric Biggers
2025-11-03 8:16 ` Ard Biesheuvel
2025-11-03 17:34 ` Eric Biggers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).