diff options
| author | Ross Burton <ross.burton@arm.com> | 2025-02-06 14:52:55 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-02-10 13:03:57 +0000 |
| commit | fca4f4f712f51b703b33696f85d1aa6eb1f92bf3 (patch) | |
| tree | 2661423733367ce1c5b8d5b402b71044823c5669 /meta | |
| parent | a9f345c9aeecd09c7b68b680ca6827732820f204 (diff) | |
| download | poky-fca4f4f712f51b703b33696f85d1aa6eb1f92bf3.tar.gz | |
openssl: fix register trampling on aarch64
Backport a patch from upstream to fix register tramping on aarch64.
(From OE-Core rev: 9005321e37030d916f4f26e7201e2f86c85ebdbd)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-connectivity/openssl/openssl/aarch64-regs.patch | 52 | ||||
| -rw-r--r-- | meta/recipes-connectivity/openssl/openssl_3.4.0.bb | 1 |
2 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl/aarch64-regs.patch b/meta/recipes-connectivity/openssl/openssl/aarch64-regs.patch new file mode 100644 index 0000000000..f9773a6183 --- /dev/null +++ b/meta/recipes-connectivity/openssl/openssl/aarch64-regs.patch | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | From 3ad2277e4522d363ae31a1888531915bb68964dc Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Julian Andres Klode <julian.klode@canonical.com> | ||
| 3 | Date: Sat, 18 Jan 2025 21:12:45 +0100 | ||
| 4 | Subject: [PATCH] Restore correct registers in aarch64 AES-CTR code | ||
| 5 | |||
| 6 | Commit 1d1ca79fe35dbe5c05faed5a2ef8c4de9c5adc49 introduced | ||
| 7 | save and restore for the registers, saving them as | ||
| 8 | |||
| 9 | stp d8,d9,[sp, #16] | ||
| 10 | stp d10,d11,[sp, #32] | ||
| 11 | stp d12,d13,[sp, #48] | ||
| 12 | stp d14,d15,[sp, #64] | ||
| 13 | |||
| 14 | But the restore code was inadvertently typoed: | ||
| 15 | |||
| 16 | ldp d8,d9,[sp, #16] | ||
| 17 | ldp d10,d11,[sp, #32] | ||
| 18 | ldp d12,d13,[sp, #48] | ||
| 19 | ldp d15,d16,[sp, #64] | ||
| 20 | |||
| 21 | Restoring [sp, #64] into d15,d16 instead of d14,d15. | ||
| 22 | |||
| 23 | Fixes: #26466 | ||
| 24 | |||
| 25 | CLA: trivial | ||
| 26 | |||
| 27 | Reviewed-by: Kurt Roeckx <kurt@roeckx.be> | ||
| 28 | Reviewed-by: Paul Dale <ppzgs1@gmail.com> | ||
| 29 | Reviewed-by: Tomas Mraz <tomas@openssl.org> | ||
| 30 | (Merged from https://github.com/openssl/openssl/pull/26469) | ||
| 31 | |||
| 32 | (cherry picked from commit 5261f3ca41cda7ad5767e399e9a2dc008bbad5d6) | ||
| 33 | |||
| 34 | Upstream-Status: Backport | ||
| 35 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
| 36 | --- | ||
| 37 | crypto/aes/asm/aesv8-armx.pl | 2 +- | ||
| 38 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 39 | |||
| 40 | diff --git a/crypto/aes/asm/aesv8-armx.pl b/crypto/aes/asm/aesv8-armx.pl | ||
| 41 | index 33a2dd53dae19..dc019b04ccd25 100755 | ||
| 42 | --- a/crypto/aes/asm/aesv8-armx.pl | ||
| 43 | +++ b/crypto/aes/asm/aesv8-armx.pl | ||
| 44 | @@ -2493,7 +2493,7 @@ () | ||
| 45 | ldp d8,d9,[sp, #16] | ||
| 46 | ldp d10,d11,[sp, #32] | ||
| 47 | ldp d12,d13,[sp, #48] | ||
| 48 | - ldp d15,d16,[sp, #64] | ||
| 49 | + ldp d14,d15,[sp, #64] | ||
| 50 | ldr x29,[sp],#80 | ||
| 51 | ret | ||
| 52 | .size ${prefix}_ctr32_encrypt_blocks_unroll12_eor3,.-${prefix}_ctr32_encrypt_blocks_unroll12_eor3 | ||
diff --git a/meta/recipes-connectivity/openssl/openssl_3.4.0.bb b/meta/recipes-connectivity/openssl/openssl_3.4.0.bb index 9d99c21c20..cc413e39ba 100644 --- a/meta/recipes-connectivity/openssl/openssl_3.4.0.bb +++ b/meta/recipes-connectivity/openssl/openssl_3.4.0.bb | |||
| @@ -13,6 +13,7 @@ SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ | |||
| 13 | file://0001-Configure-do-not-tweak-mips-cflags.patch \ | 13 | file://0001-Configure-do-not-tweak-mips-cflags.patch \ |
| 14 | file://0001-Added-handshake-history-reporting-when-test-fails.patch \ | 14 | file://0001-Added-handshake-history-reporting-when-test-fails.patch \ |
| 15 | file://0001-Fix-builds-on-riscv64-using-musl.patch \ | 15 | file://0001-Fix-builds-on-riscv64-using-musl.patch \ |
| 16 | file://aarch64-regs.patch \ | ||
| 16 | " | 17 | " |
| 17 | 18 | ||
| 18 | SRC_URI:append:class-nativesdk = " \ | 19 | SRC_URI:append:class-nativesdk = " \ |
