Skip to content

Commit 221e00d

Browse files
bp3tk0vherbertx
authored andcommitted
crypto: x86 - Add missing RETs
Add explicit RETs to the tail calls of AEGIS and MORUS crypto algorithms otherwise they run into INT3 padding due to ("x86/asm: Pad assembly functions with INT3 instructions") leading to spurious debug exceptions. Mike Galbraith <[email protected]> took care of all the remaining callsites. Signed-off-by: Borislav Petkov <[email protected]> Acked-by: Ondrej Mosnacek <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent a068b94 commit 221e00d

File tree

6 files changed

+6
-0
lines changed

6 files changed

+6
-0
lines changed

arch/x86/crypto/aegis128-aesni-asm.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@ ENTRY(crypto_aegis128_aesni_enc_tail)
535535
movdqu STATE3, 0x40(STATEP)
536536

537537
FRAME_END
538+
ret
538539
ENDPROC(crypto_aegis128_aesni_enc_tail)
539540

540541
.macro decrypt_block a s0 s1 s2 s3 s4 i

arch/x86/crypto/aegis128l-aesni-asm.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,7 @@ ENTRY(crypto_aegis128l_aesni_enc_tail)
645645
state_store0
646646

647647
FRAME_END
648+
ret
648649
ENDPROC(crypto_aegis128l_aesni_enc_tail)
649650

650651
/*

arch/x86/crypto/aegis256-aesni-asm.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,7 @@ ENTRY(crypto_aegis256_aesni_enc_tail)
543543
state_store0
544544

545545
FRAME_END
546+
ret
546547
ENDPROC(crypto_aegis256_aesni_enc_tail)
547548

548549
/*

arch/x86/crypto/morus1280-avx2-asm.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ ENTRY(crypto_morus1280_avx2_enc_tail)
453453
vmovdqu STATE4, (4 * 32)(%rdi)
454454

455455
FRAME_END
456+
ret
456457
ENDPROC(crypto_morus1280_avx2_enc_tail)
457458

458459
/*

arch/x86/crypto/morus1280-sse2-asm.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,7 @@ ENTRY(crypto_morus1280_sse2_enc_tail)
652652
movdqu STATE4_HI, (9 * 16)(%rdi)
653653

654654
FRAME_END
655+
ret
655656
ENDPROC(crypto_morus1280_sse2_enc_tail)
656657

657658
/*

arch/x86/crypto/morus640-sse2-asm.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ ENTRY(crypto_morus640_sse2_enc_tail)
437437
movdqu STATE4, (4 * 16)(%rdi)
438438

439439
FRAME_END
440+
ret
440441
ENDPROC(crypto_morus640_sse2_enc_tail)
441442

442443
/*

0 commit comments

Comments
 (0)