From: Amir Ayupov Date: Wed, 12 Jul 2023 22:14:51 +0000 (-0700) Subject: Move Keccak rhotates tables to rodata X-Git-Tag: openssl-3.2.0-alpha1~474 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2fd82c228363cfd16c5047a348e7c853defa42eb;p=thirdparty%2Fopenssl.git Move Keccak rhotates tables to rodata rhotates tables are placed to .text section which confuses tools such as BOLT. Move them to rodata to unbreak and avoid polluting icache/iTLB with data. CLA: trivial Reviewed-by: Hugo Landau Reviewed-by: Paul Yang Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/21440) --- diff --git a/crypto/sha/asm/keccak1600-avx2.pl b/crypto/sha/asm/keccak1600-avx2.pl index 84682289bf7..4fa3f787fa8 100755 --- a/crypto/sha/asm/keccak1600-avx2.pl +++ b/crypto/sha/asm/keccak1600-avx2.pl @@ -432,6 +432,7 @@ $code.=<<___; ret .size SHA3_squeeze,.-SHA3_squeeze +.section .rodata .align 64 rhotates_left: .quad 3, 18, 36, 41 # [2][0] [4][0] [1][0] [3][0] diff --git a/crypto/sha/asm/keccak1600-avx512.pl b/crypto/sha/asm/keccak1600-avx512.pl index 85d6e7ffe42..8bcf3a08041 100755 --- a/crypto/sha/asm/keccak1600-avx512.pl +++ b/crypto/sha/asm/keccak1600-avx512.pl @@ -486,6 +486,7 @@ SHA3_squeeze: ret .size SHA3_squeeze,.-SHA3_squeeze +.section .rodata .align 64 theta_perm: .quad 0, 1, 2, 3, 4, 5, 6, 7 # [not used] diff --git a/crypto/sha/asm/keccak1600-avx512vl.pl b/crypto/sha/asm/keccak1600-avx512vl.pl index 73e75f363f2..da93faa5394 100755 --- a/crypto/sha/asm/keccak1600-avx512vl.pl +++ b/crypto/sha/asm/keccak1600-avx512vl.pl @@ -349,6 +349,7 @@ $code.=<<___; ret .size SHA3_squeeze,.-SHA3_squeeze +.section .rodata .align 64 rhotates_left: .quad 3, 18, 36, 41 # [2][0] [4][0] [1][0] [3][0]