diff options
author | deraadt <> | 2023-01-14 16:58:56 +0000 |
---|---|---|
committer | deraadt <> | 2023-01-14 16:58:56 +0000 |
commit | b5834617204e7520b0209bcff7f1c4a559e05422 (patch) | |
tree | 091fefd47bf297796c9ff374bd3f19f6e0cd6da8 /src/lib/libcrypto/aes | |
parent | a545377353a479e357ae5fb9be8294f7137820d5 (diff) | |
download | openbsd-b5834617204e7520b0209bcff7f1c4a559e05422.tar.gz openbsd-b5834617204e7520b0209bcff7f1c4a559e05422.tar.bz2 openbsd-b5834617204e7520b0209bcff7f1c4a559e05422.zip |
Move constants out of text segment into rodata to prepare for xonly support
on amd64. no pic handling is neccessary since amd64 has full reach.
ok kettenis
Diffstat (limited to 'src/lib/libcrypto/aes')
-rwxr-xr-x | src/lib/libcrypto/aes/asm/aes-x86_64.pl | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/aes/asm/aesni-sha1-x86_64.pl | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/aes/asm/aesni-x86_64.pl | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/aes/asm/bsaes-x86_64.pl | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/aes/asm/vpaes-x86_64.pl | 3 |
5 files changed, 10 insertions, 7 deletions
diff --git a/src/lib/libcrypto/aes/asm/aes-x86_64.pl b/src/lib/libcrypto/aes/asm/aes-x86_64.pl index 9072f603a9..d9f501b252 100755 --- a/src/lib/libcrypto/aes/asm/aes-x86_64.pl +++ b/src/lib/libcrypto/aes/asm/aes-x86_64.pl | |||
@@ -2113,6 +2113,7 @@ ___ | |||
2113 | } | 2113 | } |
2114 | 2114 | ||
2115 | $code.=<<___; | 2115 | $code.=<<___; |
2116 | .rodata | ||
2116 | .align 64 | 2117 | .align 64 |
2117 | .LAES_Te: | 2118 | .LAES_Te: |
2118 | ___ | 2119 | ___ |
@@ -2533,8 +2534,8 @@ ___ | |||
2533 | $code.=<<___; | 2534 | $code.=<<___; |
2534 | .long 0x80808080, 0x80808080, 0xfefefefe, 0xfefefefe | 2535 | .long 0x80808080, 0x80808080, 0xfefefefe, 0xfefefefe |
2535 | .long 0x1b1b1b1b, 0x1b1b1b1b, 0, 0 | 2536 | .long 0x1b1b1b1b, 0x1b1b1b1b, 0, 0 |
2536 | .asciz "AES for x86_64, CRYPTOGAMS by <appro\@openssl.org>" | ||
2537 | .align 64 | 2537 | .align 64 |
2538 | .previous | ||
2538 | ___ | 2539 | ___ |
2539 | 2540 | ||
2540 | # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, | 2541 | # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, |
diff --git a/src/lib/libcrypto/aes/asm/aesni-sha1-x86_64.pl b/src/lib/libcrypto/aes/asm/aesni-sha1-x86_64.pl index 880bcc2d58..4e83b6ba49 100644 --- a/src/lib/libcrypto/aes/asm/aesni-sha1-x86_64.pl +++ b/src/lib/libcrypto/aes/asm/aesni-sha1-x86_64.pl | |||
@@ -1075,6 +1075,7 @@ $code.=<<___; | |||
1075 | ___ | 1075 | ___ |
1076 | } | 1076 | } |
1077 | $code.=<<___; | 1077 | $code.=<<___; |
1078 | .rodata | ||
1078 | .align 64 | 1079 | .align 64 |
1079 | K_XX_XX: | 1080 | K_XX_XX: |
1080 | .long 0x5a827999,0x5a827999,0x5a827999,0x5a827999 # K_00_19 | 1081 | .long 0x5a827999,0x5a827999,0x5a827999,0x5a827999 # K_00_19 |
@@ -1082,9 +1083,8 @@ K_XX_XX: | |||
1082 | .long 0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc # K_40_59 | 1083 | .long 0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc # K_40_59 |
1083 | .long 0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6 # K_60_79 | 1084 | .long 0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6 # K_60_79 |
1084 | .long 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f # pbswap mask | 1085 | .long 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f # pbswap mask |
1085 | |||
1086 | .asciz "AESNI-CBC+SHA1 stitch for x86_64, CRYPTOGAMS by <appro\@openssl.org>" | ||
1087 | .align 64 | 1086 | .align 64 |
1087 | .previous | ||
1088 | ___ | 1088 | ___ |
1089 | 1089 | ||
1090 | # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, | 1090 | # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, |
diff --git a/src/lib/libcrypto/aes/asm/aesni-x86_64.pl b/src/lib/libcrypto/aes/asm/aesni-x86_64.pl index a849073728..1ec76f529e 100644 --- a/src/lib/libcrypto/aes/asm/aesni-x86_64.pl +++ b/src/lib/libcrypto/aes/asm/aesni-x86_64.pl | |||
@@ -2720,6 +2720,7 @@ ___ | |||
2720 | } | 2720 | } |
2721 | 2721 | ||
2722 | $code.=<<___; | 2722 | $code.=<<___; |
2723 | .rodata | ||
2723 | .align 64 | 2724 | .align 64 |
2724 | .Lbswap_mask: | 2725 | .Lbswap_mask: |
2725 | .byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 | 2726 | .byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 |
@@ -2729,9 +2730,8 @@ $code.=<<___; | |||
2729 | .long 1,0,0,0 | 2730 | .long 1,0,0,0 |
2730 | .Lxts_magic: | 2731 | .Lxts_magic: |
2731 | .long 0x87,0,1,0 | 2732 | .long 0x87,0,1,0 |
2732 | |||
2733 | .asciz "AES for Intel AES-NI, CRYPTOGAMS by <appro\@openssl.org>" | ||
2734 | .align 64 | 2733 | .align 64 |
2734 | .previous | ||
2735 | ___ | 2735 | ___ |
2736 | 2736 | ||
2737 | # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, | 2737 | # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, |
diff --git a/src/lib/libcrypto/aes/asm/bsaes-x86_64.pl b/src/lib/libcrypto/aes/asm/bsaes-x86_64.pl index 14dc2c02e7..a40f836010 100644 --- a/src/lib/libcrypto/aes/asm/bsaes-x86_64.pl +++ b/src/lib/libcrypto/aes/asm/bsaes-x86_64.pl | |||
@@ -2882,6 +2882,7 @@ $code.=<<___; | |||
2882 | ___ | 2882 | ___ |
2883 | } | 2883 | } |
2884 | $code.=<<___; | 2884 | $code.=<<___; |
2885 | .rodata | ||
2885 | .type _bsaes_const,\@object | 2886 | .type _bsaes_const,\@object |
2886 | .align 64 | 2887 | .align 64 |
2887 | _bsaes_const: | 2888 | _bsaes_const: |
@@ -2934,9 +2935,9 @@ _bsaes_const: | |||
2934 | .quad 0x02060a0e03070b0f, 0x0004080c0105090d | 2935 | .quad 0x02060a0e03070b0f, 0x0004080c0105090d |
2935 | .L63: | 2936 | .L63: |
2936 | .quad 0x6363636363636363, 0x6363636363636363 | 2937 | .quad 0x6363636363636363, 0x6363636363636363 |
2937 | .asciz "Bit-sliced AES for x86_64/SSSE3, Emilia Käsper, Peter Schwabe, Andy Polyakov" | ||
2938 | .align 64 | 2938 | .align 64 |
2939 | .size _bsaes_const,.-_bsaes_const | 2939 | .size _bsaes_const,.-_bsaes_const |
2940 | .previous | ||
2940 | ___ | 2941 | ___ |
2941 | 2942 | ||
2942 | # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, | 2943 | # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, |
diff --git a/src/lib/libcrypto/aes/asm/vpaes-x86_64.pl b/src/lib/libcrypto/aes/asm/vpaes-x86_64.pl index bd7f45b850..63af96c1dd 100644 --- a/src/lib/libcrypto/aes/asm/vpaes-x86_64.pl +++ b/src/lib/libcrypto/aes/asm/vpaes-x86_64.pl | |||
@@ -964,6 +964,7 @@ _vpaes_preheat: | |||
964 | ## Constants ## | 964 | ## Constants ## |
965 | ## ## | 965 | ## ## |
966 | ######################################################## | 966 | ######################################################## |
967 | .rodata | ||
967 | .type _vpaes_consts,\@object | 968 | .type _vpaes_consts,\@object |
968 | .align 64 | 969 | .align 64 |
969 | _vpaes_consts: | 970 | _vpaes_consts: |
@@ -1060,9 +1061,9 @@ _vpaes_consts: | |||
1060 | .Lk_dsbo: # decryption sbox final output | 1061 | .Lk_dsbo: # decryption sbox final output |
1061 | .quad 0x1387EA537EF94000, 0xC7AA6DB9D4943E2D | 1062 | .quad 0x1387EA537EF94000, 0xC7AA6DB9D4943E2D |
1062 | .quad 0x12D7560F93441D00, 0xCA4B8159D8C58E9C | 1063 | .quad 0x12D7560F93441D00, 0xCA4B8159D8C58E9C |
1063 | .asciz "Vector Permutation AES for x86_64/SSSE3, Mike Hamburg (Stanford University)" | ||
1064 | .align 64 | 1064 | .align 64 |
1065 | .size _vpaes_consts,.-_vpaes_consts | 1065 | .size _vpaes_consts,.-_vpaes_consts |
1066 | .previous | ||
1066 | ___ | 1067 | ___ |
1067 | 1068 | ||
1068 | if ($win64) { | 1069 | if ($win64) { |