diff mbox series

[RFC,4/9] arm64: aes-neonbs: move frame pop to end of function

Message ID 20211013152243.2216899-5-ardb@kernel.org (mailing list archive)
State RFC
Headers show
Series arm64: use unwind data on GCC for shadow call stack | expand

Commit Message

Ard Biesheuvel Oct. 13, 2021, 3:22 p.m. UTC
In order to decomplicate the generation of CFI unwind metadata for the
AES-CTR routine, which would involve preserving/restoring the virtual
register set to convey that the state during the handling of inputs less
than 8 blocks [which is emitted out of line] equals the state before the
frame pop, let's just move it to the end of the function.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
 arch/arm64/crypto/aes-neonbs-core.S | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/arch/arm64/crypto/aes-neonbs-core.S b/arch/arm64/crypto/aes-neonbs-core.S
index a3405b8c344b..7104b54448dc 100644
--- a/arch/arm64/crypto/aes-neonbs-core.S
+++ b/arch/arm64/crypto/aes-neonbs-core.S
@@ -966,10 +966,6 @@  CPU_LE(	rev		x8, x8		)
 
 	b		99b
 
-.Lctr_done:
-	frame_pop
-	ret
-
 	/*
 	 * If we are handling the tail of the input (x6 != NULL), return the
 	 * final keystream block back to the caller.
@@ -998,4 +994,8 @@  CPU_LE(	rev		x8, x8		)
 7:	cbz		x25, 8b
 	st1		{v5.16b}, [x25]
 	b		8b
+
+.Lctr_done:
+	frame_pop
+	ret
 SYM_FUNC_END(aesbs_ctr_encrypt)