Skip to content

Commit 93235e3

Browse files
committed
Merge tag 'v5.18-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu: - Missing Kconfig dependency on arm that leads to boot failure - x86 SLS fixes - Reference leak in the stm32 driver * tag 'v5.18-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: x86/sm3 - Fixup SLS crypto: x86/poly1305 - Fixup SLS crypto: x86/chacha20 - Avoid spurious jumps to other functions crypto: stm32 - fix reference leak in stm32_crc_remove crypto: arm/aes-neonbs-cbc - Select generic cbc and aes
2 parents 787af64 + aa8e73e commit 93235e3

File tree

5 files changed

+27
-23
lines changed

5 files changed

+27
-23
lines changed

arch/arm/crypto/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ config CRYPTO_AES_ARM_BS
102102
depends on KERNEL_MODE_NEON
103103
select CRYPTO_SKCIPHER
104104
select CRYPTO_LIB_AES
105+
select CRYPTO_AES
106+
select CRYPTO_CBC
105107
select CRYPTO_SIMD
106108
help
107109
Use a faster and more secure NEON based implementation of AES in CBC,

arch/x86/crypto/chacha-avx512vl-x86_64.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ SYM_FUNC_START(chacha_2block_xor_avx512vl)
172172
# xor remaining bytes from partial register into output
173173
mov %rcx,%rax
174174
and $0xf,%rcx
175-
jz .Ldone8
175+
jz .Ldone2
176176
mov %rax,%r9
177177
and $~0xf,%r9
178178

@@ -438,7 +438,7 @@ SYM_FUNC_START(chacha_4block_xor_avx512vl)
438438
# xor remaining bytes from partial register into output
439439
mov %rcx,%rax
440440
and $0xf,%rcx
441-
jz .Ldone8
441+
jz .Ldone4
442442
mov %rax,%r9
443443
and $~0xf,%r9
444444

arch/x86/crypto/poly1305-x86_64-cryptogams.pl

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ sub poly1305_iteration {
297297
$code.=<<___;
298298
mov \$1,%eax
299299
.Lno_key:
300-
ret
300+
RET
301301
___
302302
&end_function("poly1305_init_x86_64");
303303

@@ -373,7 +373,7 @@ sub poly1305_iteration {
373373
.cfi_adjust_cfa_offset -48
374374
.Lno_data:
375375
.Lblocks_epilogue:
376-
ret
376+
RET
377377
.cfi_endproc
378378
___
379379
&end_function("poly1305_blocks_x86_64");
@@ -399,7 +399,7 @@ sub poly1305_iteration {
399399
mov %rax,0($mac) # write result
400400
mov %rcx,8($mac)
401401
402-
ret
402+
RET
403403
___
404404
&end_function("poly1305_emit_x86_64");
405405
if ($avx) {
@@ -429,7 +429,7 @@ sub poly1305_iteration {
429429
&poly1305_iteration();
430430
$code.=<<___;
431431
pop $ctx
432-
ret
432+
RET
433433
.size __poly1305_block,.-__poly1305_block
434434
435435
.type __poly1305_init_avx,\@abi-omnipotent
@@ -594,7 +594,7 @@ sub poly1305_iteration {
594594
595595
lea -48-64($ctx),$ctx # size [de-]optimization
596596
pop %rbp
597-
ret
597+
RET
598598
.size __poly1305_init_avx,.-__poly1305_init_avx
599599
___
600600

@@ -747,7 +747,7 @@ sub poly1305_iteration {
747747
.cfi_restore %rbp
748748
.Lno_data_avx:
749749
.Lblocks_avx_epilogue:
750-
ret
750+
RET
751751
.cfi_endproc
752752
753753
.align 32
@@ -1452,7 +1452,7 @@ sub poly1305_iteration {
14521452
___
14531453
$code.=<<___;
14541454
vzeroupper
1455-
ret
1455+
RET
14561456
.cfi_endproc
14571457
___
14581458
&end_function("poly1305_blocks_avx");
@@ -1508,7 +1508,7 @@ sub poly1305_iteration {
15081508
mov %rax,0($mac) # write result
15091509
mov %rcx,8($mac)
15101510
1511-
ret
1511+
RET
15121512
___
15131513
&end_function("poly1305_emit_avx");
15141514

@@ -1675,7 +1675,7 @@ sub poly1305_blocks_avxN {
16751675
.cfi_restore %rbp
16761676
.Lno_data_avx2$suffix:
16771677
.Lblocks_avx2_epilogue$suffix:
1678-
ret
1678+
RET
16791679
.cfi_endproc
16801680
16811681
.align 32
@@ -2201,7 +2201,7 @@ sub poly1305_blocks_avxN {
22012201
___
22022202
$code.=<<___;
22032203
vzeroupper
2204-
ret
2204+
RET
22052205
.cfi_endproc
22062206
___
22072207
if($avx > 2 && $avx512) {
@@ -2792,7 +2792,7 @@ sub poly1305_blocks_avxN {
27922792
.cfi_def_cfa_register %rsp
27932793
___
27942794
$code.=<<___;
2795-
ret
2795+
RET
27962796
.cfi_endproc
27972797
___
27982798

@@ -2893,7 +2893,7 @@ sub poly1305_blocks_avxN {
28932893
___
28942894
$code.=<<___;
28952895
mov \$1,%eax
2896-
ret
2896+
RET
28972897
.size poly1305_init_base2_44,.-poly1305_init_base2_44
28982898
___
28992899
{
@@ -3010,7 +3010,7 @@ sub poly1305_blocks_avxN {
30103010
jnz .Lblocks_vpmadd52_4x
30113011
30123012
.Lno_data_vpmadd52:
3013-
ret
3013+
RET
30143014
.size poly1305_blocks_vpmadd52,.-poly1305_blocks_vpmadd52
30153015
___
30163016
}
@@ -3451,7 +3451,7 @@ sub poly1305_blocks_avxN {
34513451
vzeroall
34523452
34533453
.Lno_data_vpmadd52_4x:
3454-
ret
3454+
RET
34553455
.size poly1305_blocks_vpmadd52_4x,.-poly1305_blocks_vpmadd52_4x
34563456
___
34573457
}
@@ -3824,7 +3824,7 @@ sub poly1305_blocks_avxN {
38243824
vzeroall
38253825
38263826
.Lno_data_vpmadd52_8x:
3827-
ret
3827+
RET
38283828
.size poly1305_blocks_vpmadd52_8x,.-poly1305_blocks_vpmadd52_8x
38293829
___
38303830
}
@@ -3861,7 +3861,7 @@ sub poly1305_blocks_avxN {
38613861
mov %rax,0($mac) # write result
38623862
mov %rcx,8($mac)
38633863
3864-
ret
3864+
RET
38653865
.size poly1305_emit_base2_44,.-poly1305_emit_base2_44
38663866
___
38673867
} } }
@@ -3916,7 +3916,7 @@ sub poly1305_blocks_avxN {
39163916
39173917
.Ldone_enc:
39183918
mov $otp,%rax
3919-
ret
3919+
RET
39203920
.size xor128_encrypt_n_pad,.-xor128_encrypt_n_pad
39213921
39223922
.globl xor128_decrypt_n_pad
@@ -3967,7 +3967,7 @@ sub poly1305_blocks_avxN {
39673967
39683968
.Ldone_dec:
39693969
mov $otp,%rax
3970-
ret
3970+
RET
39713971
.size xor128_decrypt_n_pad,.-xor128_decrypt_n_pad
39723972
___
39733973
}
@@ -4109,7 +4109,7 @@ sub poly1305_blocks_avxN {
41094109
pop %rbx
41104110
pop %rdi
41114111
pop %rsi
4112-
ret
4112+
RET
41134113
.size avx_handler,.-avx_handler
41144114
41154115
.section .pdata

arch/x86/crypto/sm3-avx-asm_64.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,5 +513,5 @@ SYM_FUNC_START(sm3_transform_avx)
513513

514514
movq %rbp, %rsp;
515515
popq %rbp;
516-
ret;
516+
RET;
517517
SYM_FUNC_END(sm3_transform_avx)

drivers/crypto/stm32/stm32-crc32.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,10 @@ static int stm32_crc_remove(struct platform_device *pdev)
384384
struct stm32_crc *crc = platform_get_drvdata(pdev);
385385
int ret = pm_runtime_get_sync(crc->dev);
386386

387-
if (ret < 0)
387+
if (ret < 0) {
388+
pm_runtime_put_noidle(crc->dev);
388389
return ret;
390+
}
389391

390392
spin_lock(&crc_list.lock);
391393
list_del(&crc->list);

0 commit comments

Comments
 (0)