Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lib/crypto: arm/blake2s: Fix some comments

Fix the indices in some comments in blake2s-core.S.

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20251102021553.176587-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>

+4 -4
+4 -4
lib/crypto/arm/blake2s-core.S
··· 115 115 116 116 // Execute one round of BLAKE2s by updating the state matrix v[0..15]. v[0..9] 117 117 // are in r0..r9. The stack pointer points to 8 bytes of scratch space for 118 - // spilling v[8..9], then to v[9..15], then to the message block. r10-r12 and 118 + // spilling v[8..9], then to v[10..15], then to the message block. r10-r12 and 119 119 // r14 are free to use. The macro arguments s0-s15 give the order in which the 120 120 // message words are used in this round. 121 121 // ··· 209 209 .Lcopy_block_done: 210 210 str r1, [sp, #68] // Update message pointer 211 211 212 - // Calculate v[8..15]. Push v[9..15] onto the stack, and leave space 212 + // Calculate v[8..15]. Push v[10..15] onto the stack, and leave space 213 213 // for spilling v[8..9]. Leave v[8..9] in r8-r9. 214 214 mov r14, r0 // r14 = ctx 215 215 adr r12, .Lblake2s_IV 216 216 ldmia r12!, {r8-r9} // load IV[0..1] 217 217 __ldrd r0, r1, r14, 40 // load f[0..1] 218 - ldm r12, {r2-r7} // load IV[3..7] 218 + ldm r12, {r2-r7} // load IV[2..7] 219 219 eor r4, r4, r10 // v[12] = IV[4] ^ t[0] 220 220 eor r5, r5, r11 // v[13] = IV[5] ^ t[1] 221 221 eor r6, r6, r0 // v[14] = IV[6] ^ f[0] 222 222 eor r7, r7, r1 // v[15] = IV[7] ^ f[1] 223 - push {r2-r7} // push v[9..15] 223 + push {r2-r7} // push v[10..15] 224 224 sub sp, sp, #8 // leave space for v[8..9] 225 225 226 226 // Load h[0..7] == v[0..7].