hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/x86/crypto/chacha-ssse3-x86_64.S
....@@ -1,12 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * ChaCha 256-bit cipher algorithm, x64 SSSE3 functions
34 *
45 * Copyright (C) 2015 Martin Willi
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License, or
9
- * (at your option) any later version.
106 */
117
128 #include <linux/linkage.h>
....@@ -37,7 +33,7 @@
3733 *
3834 * Clobbers: %r8d, %xmm4-%xmm7
3935 */
40
-chacha_permute:
36
+SYM_FUNC_START_LOCAL(chacha_permute)
4137
4238 movdqa ROT8(%rip),%xmm4
4339 movdqa ROT16(%rip),%xmm5
....@@ -112,10 +108,10 @@
112108 sub $2,%r8d
113109 jnz .Ldoubleround
114110
115
- ret
116
-ENDPROC(chacha_permute)
111
+ RET
112
+SYM_FUNC_END(chacha_permute)
117113
118
-ENTRY(chacha_block_xor_ssse3)
114
+SYM_FUNC_START(chacha_block_xor_ssse3)
119115 # %rdi: Input state matrix, s
120116 # %rsi: up to 1 data block output, o
121117 # %rdx: up to 1 data block input, i
....@@ -170,7 +166,7 @@
170166
171167 .Ldone:
172168 FRAME_END
173
- ret
169
+ RET
174170
175171 .Lxorpart:
176172 # xor remaining bytes from partial register into output
....@@ -201,9 +197,9 @@
201197 lea -8(%r10),%rsp
202198 jmp .Ldone
203199
204
-ENDPROC(chacha_block_xor_ssse3)
200
+SYM_FUNC_END(chacha_block_xor_ssse3)
205201
206
-ENTRY(hchacha_block_ssse3)
202
+SYM_FUNC_START(hchacha_block_ssse3)
207203 # %rdi: Input state matrix, s
208204 # %rsi: output (8 32-bit words)
209205 # %edx: nrounds
....@@ -221,10 +217,10 @@
221217 movdqu %xmm3,0x10(%rsi)
222218
223219 FRAME_END
224
- ret
225
-ENDPROC(hchacha_block_ssse3)
220
+ RET
221
+SYM_FUNC_END(hchacha_block_ssse3)
226222
227
-ENTRY(chacha_4block_xor_ssse3)
223
+SYM_FUNC_START(chacha_4block_xor_ssse3)
228224 # %rdi: Input state matrix, s
229225 # %rsi: up to 4 data blocks output, o
230226 # %rdx: up to 4 data blocks input, i
....@@ -766,7 +762,7 @@
766762
767763 .Ldone4:
768764 lea -8(%r10),%rsp
769
- ret
765
+ RET
770766
771767 .Lxorpart4:
772768 # xor remaining bytes from partial register into output
....@@ -792,4 +788,4 @@
792788
793789 jmp .Ldone4
794790
795
-ENDPROC(chacha_4block_xor_ssse3)
791
+SYM_FUNC_END(chacha_4block_xor_ssse3)