Skip to content

Commit

Permalink
Move Keccak rhotates tables to rodata
Browse files Browse the repository at this point in the history
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 #21440)
  • Loading branch information
aaupov authored and paulidale committed Jul 14, 2023
1 parent 7a3d32a commit 2fd82c2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions crypto/sha/asm/keccak1600-avx2.pl
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@
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]
Expand Down
1 change: 1 addition & 0 deletions crypto/sha/asm/keccak1600-avx512.pl
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@
ret
.size SHA3_squeeze,.-SHA3_squeeze
.section .rodata
.align 64
theta_perm:
.quad 0, 1, 2, 3, 4, 5, 6, 7 # [not used]
Expand Down
1 change: 1 addition & 0 deletions crypto/sha/asm/keccak1600-avx512vl.pl
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@
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]
Expand Down

0 comments on commit 2fd82c2

Please sign in to comment.