summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorAmir Ayupov <fads93@gmail.com>2023-07-12 15:14:51 -0700
committerPauli <pauli@openssl.org>2023-07-14 11:16:05 +1000
commit242434874ce78140a9df6dfd0818f040bf47a7f0 (patch)
treee26f6b926c12b19929371f4fb47adb544e9c4109 /crypto
parentdfc4b6c93b99f6666cd958c5643a24bb6edff7b7 (diff)
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 <hlandau@openssl.org> Reviewed-by: Paul Yang <kaishen.yy@antfin.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21440) (cherry picked from commit 2fd82c228363cfd16c5047a348e7c853defa42eb)
Diffstat (limited to 'crypto')
-rwxr-xr-xcrypto/sha/asm/keccak1600-avx2.pl1
-rwxr-xr-xcrypto/sha/asm/keccak1600-avx512.pl1
-rwxr-xr-xcrypto/sha/asm/keccak1600-avx512vl.pl1
3 files changed, 3 insertions, 0 deletions
diff --git a/crypto/sha/asm/keccak1600-avx2.pl b/crypto/sha/asm/keccak1600-avx2.pl
index 84682289bf..4fa3f787fa 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 85d6e7ffe4..8bcf3a0804 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 73e75f363f..da93faa539 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]