Skip to content

Commit

Permalink
Merge tag 'v5.18-p1' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
torvalds committed Mar 31, 2022
2 parents 787af64 + aa8e73e commit 93235e3
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 23 deletions.
2 changes: 2 additions & 0 deletions arch/arm/crypto/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ config CRYPTO_AES_ARM_BS
depends on KERNEL_MODE_NEON
select CRYPTO_SKCIPHER
select CRYPTO_LIB_AES
select CRYPTO_AES
select CRYPTO_CBC
select CRYPTO_SIMD
help
Use a faster and more secure NEON based implementation of AES in CBC,
Expand Down
4 changes: 2 additions & 2 deletions arch/x86/crypto/chacha-avx512vl-x86_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ SYM_FUNC_START(chacha_2block_xor_avx512vl)
# xor remaining bytes from partial register into output
mov %rcx,%rax
and $0xf,%rcx
jz .Ldone8
jz .Ldone2
mov %rax,%r9
and $~0xf,%r9

Expand Down Expand Up @@ -438,7 +438,7 @@ SYM_FUNC_START(chacha_4block_xor_avx512vl)
# xor remaining bytes from partial register into output
mov %rcx,%rax
and $0xf,%rcx
jz .Ldone8
jz .Ldone4
mov %rax,%r9
and $~0xf,%r9

Expand Down
38 changes: 19 additions & 19 deletions arch/x86/crypto/poly1305-x86_64-cryptogams.pl
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ sub poly1305_iteration {
$code.=<<___;
mov \$1,%eax
.Lno_key:
ret
RET
___
&end_function("poly1305_init_x86_64");

Expand Down Expand Up @@ -373,7 +373,7 @@ sub poly1305_iteration {
.cfi_adjust_cfa_offset -48
.Lno_data:
.Lblocks_epilogue:
ret
RET
.cfi_endproc
___
&end_function("poly1305_blocks_x86_64");
Expand All @@ -399,7 +399,7 @@ sub poly1305_iteration {
mov %rax,0($mac) # write result
mov %rcx,8($mac)
ret
RET
___
&end_function("poly1305_emit_x86_64");
if ($avx) {
Expand Down Expand Up @@ -429,7 +429,7 @@ sub poly1305_iteration {
&poly1305_iteration();
$code.=<<___;
pop $ctx
ret
RET
.size __poly1305_block,.-__poly1305_block
.type __poly1305_init_avx,\@abi-omnipotent
Expand Down Expand Up @@ -594,7 +594,7 @@ sub poly1305_iteration {
lea -48-64($ctx),$ctx # size [de-]optimization
pop %rbp
ret
RET
.size __poly1305_init_avx,.-__poly1305_init_avx
___

Expand Down Expand Up @@ -747,7 +747,7 @@ sub poly1305_iteration {
.cfi_restore %rbp
.Lno_data_avx:
.Lblocks_avx_epilogue:
ret
RET
.cfi_endproc
.align 32
Expand Down Expand Up @@ -1452,7 +1452,7 @@ sub poly1305_iteration {
___
$code.=<<___;
vzeroupper
ret
RET
.cfi_endproc
___
&end_function("poly1305_blocks_avx");
Expand Down Expand Up @@ -1508,7 +1508,7 @@ sub poly1305_iteration {
mov %rax,0($mac) # write result
mov %rcx,8($mac)
ret
RET
___
&end_function("poly1305_emit_avx");

Expand Down Expand Up @@ -1675,7 +1675,7 @@ sub poly1305_blocks_avxN {
.cfi_restore %rbp
.Lno_data_avx2$suffix:
.Lblocks_avx2_epilogue$suffix:
ret
RET
.cfi_endproc
.align 32
Expand Down Expand Up @@ -2201,7 +2201,7 @@ sub poly1305_blocks_avxN {
___
$code.=<<___;
vzeroupper
ret
RET
.cfi_endproc
___
if($avx > 2 && $avx512) {
Expand Down Expand Up @@ -2792,7 +2792,7 @@ sub poly1305_blocks_avxN {
.cfi_def_cfa_register %rsp
___
$code.=<<___;
ret
RET
.cfi_endproc
___

Expand Down Expand Up @@ -2893,7 +2893,7 @@ sub poly1305_blocks_avxN {
___
$code.=<<___;
mov \$1,%eax
ret
RET
.size poly1305_init_base2_44,.-poly1305_init_base2_44
___
{
Expand Down Expand Up @@ -3010,7 +3010,7 @@ sub poly1305_blocks_avxN {
jnz .Lblocks_vpmadd52_4x
.Lno_data_vpmadd52:
ret
RET
.size poly1305_blocks_vpmadd52,.-poly1305_blocks_vpmadd52
___
}
Expand Down Expand Up @@ -3451,7 +3451,7 @@ sub poly1305_blocks_avxN {
vzeroall
.Lno_data_vpmadd52_4x:
ret
RET
.size poly1305_blocks_vpmadd52_4x,.-poly1305_blocks_vpmadd52_4x
___
}
Expand Down Expand Up @@ -3824,7 +3824,7 @@ sub poly1305_blocks_avxN {
vzeroall
.Lno_data_vpmadd52_8x:
ret
RET
.size poly1305_blocks_vpmadd52_8x,.-poly1305_blocks_vpmadd52_8x
___
}
Expand Down Expand Up @@ -3861,7 +3861,7 @@ sub poly1305_blocks_avxN {
mov %rax,0($mac) # write result
mov %rcx,8($mac)
ret
RET
.size poly1305_emit_base2_44,.-poly1305_emit_base2_44
___
} } }
Expand Down Expand Up @@ -3916,7 +3916,7 @@ sub poly1305_blocks_avxN {
.Ldone_enc:
mov $otp,%rax
ret
RET
.size xor128_encrypt_n_pad,.-xor128_encrypt_n_pad
.globl xor128_decrypt_n_pad
Expand Down Expand Up @@ -3967,7 +3967,7 @@ sub poly1305_blocks_avxN {
.Ldone_dec:
mov $otp,%rax
ret
RET
.size xor128_decrypt_n_pad,.-xor128_decrypt_n_pad
___
}
Expand Down Expand Up @@ -4109,7 +4109,7 @@ sub poly1305_blocks_avxN {
pop %rbx
pop %rdi
pop %rsi
ret
RET
.size avx_handler,.-avx_handler
.section .pdata
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/crypto/sm3-avx-asm_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -513,5 +513,5 @@ SYM_FUNC_START(sm3_transform_avx)

movq %rbp, %rsp;
popq %rbp;
ret;
RET;
SYM_FUNC_END(sm3_transform_avx)
4 changes: 3 additions & 1 deletion drivers/crypto/stm32/stm32-crc32.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,10 @@ static int stm32_crc_remove(struct platform_device *pdev)
struct stm32_crc *crc = platform_get_drvdata(pdev);
int ret = pm_runtime_get_sync(crc->dev);

if (ret < 0)
if (ret < 0) {
pm_runtime_put_noidle(crc->dev);
return ret;
}

spin_lock(&crc_list.lock);
list_del(&crc->list);
Expand Down

0 comments on commit 93235e3

Please sign in to comment.