https://gcc.gnu.org/PR118537 https://www.postgresql.org/message-id/6fxlmnyagkycru3bewa4ympknywnsswlqzvwfft3ifqqiioxlv%40ax53pv7xdrc2 https://github.com/openssl/openssl/pull/26469 https://github.com/openssl/openssl/commit/4f7d8b2724ea7f42cff1e8a0e736ad448def60f5 From 4f7d8b2724ea7f42cff1e8a0e736ad448def60f5 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sat, 18 Jan 2025 21:12:45 +0100 Subject: [PATCH] Restore correct registers in aarch64 AES-CTR code Commit 1d1ca79fe35dbe5c05faed5a2ef8c4de9c5adc49 introduced save and restore for the registers, saving them as stp d8,d9,[sp, #16] stp d10,d11,[sp, #32] stp d12,d13,[sp, #48] stp d14,d15,[sp, #64] But the restore code was inadvertently typoed: ldp d8,d9,[sp, #16] ldp d10,d11,[sp, #32] ldp d12,d13,[sp, #48] ldp d15,d16,[sp, #64] Restoring [sp, #64] into d15,d16 instead of d14,d15. Fixes: #26466 CLA: trivial Reviewed-by: Kurt Roeckx Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/26469) (cherry picked from commit 5261f3ca41cda7ad5767e399e9a2dc008bbad5d6) --- crypto/aes/asm/aesv8-armx.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/aes/asm/aesv8-armx.pl b/crypto/aes/asm/aesv8-armx.pl index 33a2dd53dae19..dc019b04ccd25 100755 --- a/crypto/aes/asm/aesv8-armx.pl +++ b/crypto/aes/asm/aesv8-armx.pl @@ -2493,7 +2493,7 @@ () ldp d8,d9,[sp, #16] ldp d10,d11,[sp, #32] ldp d12,d13,[sp, #48] - ldp d15,d16,[sp, #64] + ldp d14,d15,[sp, #64] ldr x29,[sp],#80 ret .size ${prefix}_ctr32_encrypt_blocks_unroll12_eor3,.-${prefix}_ctr32_encrypt_blocks_unroll12_eor3