History

Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull more crypto fixes from Herbert Xu: "This fixes a couple of issues in arm64/chacha that was introduced in 5.0" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: arm64/chacha - fix hchacha_block_neon() for big endian crypto: arm64/chacha - fix chacha_4block_xor_neon() for big endian

Linus Torvalds committed 7 years ago

Commit fa3294c2 parents a215ce8 f86d17e1 file · +18 −2Browse files

Unified · Split

arch/arm64/crypto/chacha-neon-core.S+18−2
@@ -158,8 +158,8 @@ ENTRY(hchacha_block_neon) · 157 unmodified lines
158158 mov w3, w2
159159 bl chacha_permute
160160
161− st1 {v0.16b}, [x1], #16
162− st1 {v3.16b}, [x1]
161+ st1 {v0.4s}, [x1], #16
162+ st1 {v3.4s}, [x1]
163163
164164 ldp x29, x30, [sp], #16
165165 ret
@@ -532,6 +532,10 @@ ENTRY(chacha_4block_xor_neon) · 366 unmodified lines
532532 add v3.4s, v3.4s, v19.4s
533533 add a2, a2, w8
534534 add a3, a3, w9
535+CPU_BE( rev a0, a0 )
536+CPU_BE( rev a1, a1 )
537+CPU_BE( rev a2, a2 )
538+CPU_BE( rev a3, a3 )
535539
536540 ld4r {v24.4s-v27.4s}, [x0], #16
537541 ld4r {v28.4s-v31.4s}, [x0]
@@ -552,6 +556,10 @@ ENTRY(chacha_4block_xor_neon) · 14 unmodified lines
552556 add v7.4s, v7.4s, v23.4s
553557 add a6, a6, w8
554558 add a7, a7, w9
559+CPU_BE( rev a4, a4 )
560+CPU_BE( rev a5, a5 )
561+CPU_BE( rev a6, a6 )
562+CPU_BE( rev a7, a7 )
555563
556564 // x8[0-3] += s2[0]
557565 // x9[0-3] += s2[1]
@@ -569,6 +577,10 @@ ENTRY(chacha_4block_xor_neon) · 11 unmodified lines
569577 add v11.4s, v11.4s, v27.4s
570578 add a10, a10, w8
571579 add a11, a11, w9
580+CPU_BE( rev a8, a8 )
581+CPU_BE( rev a9, a9 )
582+CPU_BE( rev a10, a10 )
583+CPU_BE( rev a11, a11 )
572584
573585 // x12[0-3] += s3[0]
574586 // x13[0-3] += s3[1]
@@ -586,6 +598,10 @@ ENTRY(chacha_4block_xor_neon) · 11 unmodified lines
586598 add v15.4s, v15.4s, v31.4s
587599 add a14, a14, w8
588600 add a15, a15, w9
601+CPU_BE( rev a12, a12 )
602+CPU_BE( rev a13, a13 )
603+CPU_BE( rev a14, a14 )
604+CPU_BE( rev a15, a15 )
589605
590606 // interleave 32-bit words in state n, n+1
591607 ldp w6, w7, [x2], #64

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t