| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" ======================================================================== |
| 56 |
.\" |
| 57 |
.IX Title "OPENSSL_IA32CAP 3SSL" |
| 58 |
.TH OPENSSL_IA32CAP 3SSL 2026-04-07 3.6.2 OpenSSL |
| 59 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 60 |
.\" way too many mistakes in technical documents. |
| 61 |
.if n .ad l |
| 62 |
.nh |
| 63 |
.SH NAME |
| 64 |
OPENSSL_ia32cap \- the x86[_64] processor capabilities vector |
| 65 |
.SH SYNOPSIS |
| 66 |
.IX Header "SYNOPSIS" |
| 67 |
.Vb 1 |
| 68 |
\& env OPENSSL_ia32cap=... <application> |
| 69 |
.Ve |
| 70 |
.SH DESCRIPTION |
| 71 |
.IX Header "DESCRIPTION" |
| 72 |
OpenSSL supports a range of x86[_64] instruction set extensions and |
| 73 |
features. These extensions are denoted by individual bits or groups of bits |
| 74 |
stored internally as ten 32\-bit capability vectors and for simplicity |
| 75 |
represented logically below as five 64\-bit vectors. This logical |
| 76 |
vector (LV) representation is used to streamline the definition of the |
| 77 |
OPENSSL_ia32cap environment variable. |
| 78 |
.PP |
| 79 |
Upon toolkit initialization, the capability vectors are populated through |
| 80 |
successive executions of the CPUID instruction, after which any OPENSSL_ia32cap |
| 81 |
environment variable capability bit modifications are applied. After toolkit |
| 82 |
initialization is complete, populated vectors are then used to choose |
| 83 |
between different code paths to provide optimal performance across a wide |
| 84 |
range of x86[_64] based processors. |
| 85 |
.PP |
| 86 |
Further CPUID information can be found in the Intel(R) Architecture |
| 87 |
Instruction Set Extensions Programming Reference, and the AMD64 Architecture |
| 88 |
Programmer's Manual (Volume 3). |
| 89 |
.SS "Notable Capability Bits for LV0" |
| 90 |
.IX Subsection "Notable Capability Bits for LV0" |
| 91 |
The following are notable capability bits from logical vector 0 (LV0) |
| 92 |
resulting from the following execution of CPUID.(EAX=01H).EDX and |
| 93 |
CPUID.(EAX=01H).ECX: |
| 94 |
.IP "bit #0+4 denoting presence of Time-Stamp Counter;" 4 |
| 95 |
.IX Item "bit #0+4 denoting presence of Time-Stamp Counter;" |
| 96 |
.PD 0 |
| 97 |
.IP "bit #0+19 denoting availability of CLFLUSH instruction;" 4 |
| 98 |
.IX Item "bit #0+19 denoting availability of CLFLUSH instruction;" |
| 99 |
.IP "bit #0+20, reserved by Intel, is used to choose among RC4 code paths;" 4 |
| 100 |
.IX Item "bit #0+20, reserved by Intel, is used to choose among RC4 code paths;" |
| 101 |
.IP "bit #0+23 denoting MMX support;" 4 |
| 102 |
.IX Item "bit #0+23 denoting MMX support;" |
| 103 |
.IP "bit #0+24, FXSR bit, denoting availability of XMM registers;" 4 |
| 104 |
.IX Item "bit #0+24, FXSR bit, denoting availability of XMM registers;" |
| 105 |
.IP "bit #0+25 denoting SSE support;" 4 |
| 106 |
.IX Item "bit #0+25 denoting SSE support;" |
| 107 |
.IP "bit #0+26 denoting SSE2 support;" 4 |
| 108 |
.IX Item "bit #0+26 denoting SSE2 support;" |
| 109 |
.IP "bit #0+28 denoting Hyperthreading, which is used to distinguish cores with shared cache;" 4 |
| 110 |
.IX Item "bit #0+28 denoting Hyperthreading, which is used to distinguish cores with shared cache;" |
| 111 |
.IP "bit #0+30, reserved by Intel, denotes specifically Intel CPUs;" 4 |
| 112 |
.IX Item "bit #0+30, reserved by Intel, denotes specifically Intel CPUs;" |
| 113 |
.IP "bit #0+33 denoting availability of PCLMULQDQ instruction;" 4 |
| 114 |
.IX Item "bit #0+33 denoting availability of PCLMULQDQ instruction;" |
| 115 |
.IP "bit #0+41 denoting SSSE3, Supplemental SSE3, support;" 4 |
| 116 |
.IX Item "bit #0+41 denoting SSSE3, Supplemental SSE3, support;" |
| 117 |
.IP "bit #0+43 denoting AMD XOP support (forced to zero on non-AMD CPUs);" 4 |
| 118 |
.IX Item "bit #0+43 denoting AMD XOP support (forced to zero on non-AMD CPUs);" |
| 119 |
.IP "bit #0+54 denoting availability of MOVBE instruction;" 4 |
| 120 |
.IX Item "bit #0+54 denoting availability of MOVBE instruction;" |
| 121 |
.IP "bit #0+57 denoting AES-NI instruction set extension;" 4 |
| 122 |
.IX Item "bit #0+57 denoting AES-NI instruction set extension;" |
| 123 |
.IP "bit #0+58, XSAVE bit, lack of which in combination with MOVBE is used to identify Atom Silvermont core;" 4 |
| 124 |
.IX Item "bit #0+58, XSAVE bit, lack of which in combination with MOVBE is used to identify Atom Silvermont core;" |
| 125 |
.IP "bit #0+59, OSXSAVE bit, denoting availability of YMM registers;" 4 |
| 126 |
.IX Item "bit #0+59, OSXSAVE bit, denoting availability of YMM registers;" |
| 127 |
.IP "bit #0+60 denoting AVX extension;" 4 |
| 128 |
.IX Item "bit #0+60 denoting AVX extension;" |
| 129 |
.IP "bit #0+62 denoting availability of RDRAND instruction;" 4 |
| 130 |
.IX Item "bit #0+62 denoting availability of RDRAND instruction;" |
| 131 |
.PD |
| 132 |
.SS "Notable Capability Bits for LV1" |
| 133 |
.IX Subsection "Notable Capability Bits for LV1" |
| 134 |
The following are notable capability bits from logical vector 1 (LV1) |
| 135 |
resulting from the following execution of CPUID.(EAX=07H,ECX=0H).EBX and |
| 136 |
CPUID.(EAX=07H,ECX=0H).ECX: |
| 137 |
.IP "bit #64+3 denoting availability of BMI1 instructions, e.g. ANDN;" 4 |
| 138 |
.IX Item "bit #64+3 denoting availability of BMI1 instructions, e.g. ANDN;" |
| 139 |
.PD 0 |
| 140 |
.IP "bit #64+5 denoting availability of AVX2 instructions;" 4 |
| 141 |
.IX Item "bit #64+5 denoting availability of AVX2 instructions;" |
| 142 |
.IP "bit #64+8 denoting availability of BMI2 instructions, e.g. MULX and RORX;" 4 |
| 143 |
.IX Item "bit #64+8 denoting availability of BMI2 instructions, e.g. MULX and RORX;" |
| 144 |
.IP "bit #64+16 denoting availability of AVX512F extension;" 4 |
| 145 |
.IX Item "bit #64+16 denoting availability of AVX512F extension;" |
| 146 |
.IP "bit #64+17 denoting availability of AVX512DQ extension;" 4 |
| 147 |
.IX Item "bit #64+17 denoting availability of AVX512DQ extension;" |
| 148 |
.IP "bit #64+18 denoting availability of RDSEED instruction;" 4 |
| 149 |
.IX Item "bit #64+18 denoting availability of RDSEED instruction;" |
| 150 |
.IP "bit #64+19 denoting availability of ADCX and ADOX instructions;" 4 |
| 151 |
.IX Item "bit #64+19 denoting availability of ADCX and ADOX instructions;" |
| 152 |
.IP "bit #64+21 denoting availability of AVX512IFMA extension;" 4 |
| 153 |
.IX Item "bit #64+21 denoting availability of AVX512IFMA extension;" |
| 154 |
.IP "bit #64+29 denoting availability of SHA extension;" 4 |
| 155 |
.IX Item "bit #64+29 denoting availability of SHA extension;" |
| 156 |
.IP "bit #64+30 denoting availability of AVX512BW extension;" 4 |
| 157 |
.IX Item "bit #64+30 denoting availability of AVX512BW extension;" |
| 158 |
.IP "bit #64+31 denoting availability of AVX512VL extension;" 4 |
| 159 |
.IX Item "bit #64+31 denoting availability of AVX512VL extension;" |
| 160 |
.IP "bit #64+41 denoting availability of VAES extension;" 4 |
| 161 |
.IX Item "bit #64+41 denoting availability of VAES extension;" |
| 162 |
.IP "bit #64+42 denoting availability of VPCLMULQDQ extension;" 4 |
| 163 |
.IX Item "bit #64+42 denoting availability of VPCLMULQDQ extension;" |
| 164 |
.PD |
| 165 |
.SS "Notable Capability Bits for LV2" |
| 166 |
.IX Subsection "Notable Capability Bits for LV2" |
| 167 |
The following are notable capability bits from logical vector 2 (LV2) |
| 168 |
resulting from the following execution of CPUID.(EAX=07H,ECX=0H).EDX and |
| 169 |
CPUID.(EAX=07H,ECX=1H).EAX: |
| 170 |
.IP "bit #128+15 denoting availability of Hybrid CPU;" 4 |
| 171 |
.IX Item "bit #128+15 denoting availability of Hybrid CPU;" |
| 172 |
.PD 0 |
| 173 |
.IP "bit #128+29 denoting support for IA32_ARCH_CAPABILITIES MSR;" 4 |
| 174 |
.IX Item "bit #128+29 denoting support for IA32_ARCH_CAPABILITIES MSR;" |
| 175 |
.IP "bit #128+32 denoting availability of SHA512 extension;" 4 |
| 176 |
.IX Item "bit #128+32 denoting availability of SHA512 extension;" |
| 177 |
.IP "bit #128+33 denoting availability of SM3 extension;" 4 |
| 178 |
.IX Item "bit #128+33 denoting availability of SM3 extension;" |
| 179 |
.IP "bit #128+34 denoting availability of SM4 extension;" 4 |
| 180 |
.IX Item "bit #128+34 denoting availability of SM4 extension;" |
| 181 |
.IP "bit #128+55 denoting availability of AVX-IFMA extension;" 4 |
| 182 |
.IX Item "bit #128+55 denoting availability of AVX-IFMA extension;" |
| 183 |
.PD |
| 184 |
.SS "Notable Capability Bits for LV3" |
| 185 |
.IX Subsection "Notable Capability Bits for LV3" |
| 186 |
The following are notable capability bits from logical vector 3 (LV3) |
| 187 |
resulting from the following execution of CPUID.(EAX=07H,ECX=1H).EDX and |
| 188 |
CPUID.(EAX=07H,ECX=1H).EBX: |
| 189 |
.IP "bit #192+19 denoting availability of AVX10 Converged Vector ISA extension;" 4 |
| 190 |
.IX Item "bit #192+19 denoting availability of AVX10 Converged Vector ISA extension;" |
| 191 |
.PD 0 |
| 192 |
.IP "bit #192+21 denoting availability of APX_F extension;" 4 |
| 193 |
.IX Item "bit #192+21 denoting availability of APX_F extension;" |
| 194 |
.PD |
| 195 |
.SS "Notable Capability Bits for LV4" |
| 196 |
.IX Subsection "Notable Capability Bits for LV4" |
| 197 |
The following are notable capability bits from logical vector 4 (LV4) |
| 198 |
resulting from the following execution of CPUID.(EAX=07H,ECX=1H).ECX and |
| 199 |
CPUID.(EAX=24H,ECX=0H).EBX: |
| 200 |
.IP "bits #256+32+[0:7] denoting AVX10 Converged Vector ISA Version (8 bits);" 4 |
| 201 |
.IX Item "bits #256+32+[0:7] denoting AVX10 Converged Vector ISA Version (8 bits);" |
| 202 |
.PD 0 |
| 203 |
.IP "bit #256+48 denoting AVX10 XMM support;" 4 |
| 204 |
.IX Item "bit #256+48 denoting AVX10 XMM support;" |
| 205 |
.IP "bit #256+49 denoting AVX10 YMM support;" 4 |
| 206 |
.IX Item "bit #256+49 denoting AVX10 YMM support;" |
| 207 |
.IP "bit #256+50 denoting AVX10 ZMM support;" 4 |
| 208 |
.IX Item "bit #256+50 denoting AVX10 ZMM support;" |
| 209 |
.PD |
| 210 |
.SS "OPENSSL_ia32cap environment variable" |
| 211 |
.IX Subsection "OPENSSL_ia32cap environment variable" |
| 212 |
The \fBOPENSSL_ia32cap\fR environment variable provides a mechanism to override |
| 213 |
the default capability vector values at library initialization time. |
| 214 |
The variable consists of a series of 64\-bit numbers representing each |
| 215 |
of the logical vectors (LV) described above. Each value is delimited by a '\fB:\fR'. |
| 216 |
Decimal/Octal/Hexadecimal values representations are supported. |
| 217 |
.PP |
| 218 |
\&\f(CW\*(C`env OPENSSL_ia32cap=LV0:LV1:LV2:LV3:LV4\*(C'\fR |
| 219 |
.PP |
| 220 |
Used in this form, each non-null logical vector will *overwrite* the entire corresponding |
| 221 |
capability vector pair with the provided value. To keep compatibility with the |
| 222 |
behaviour of the original OPENSSL_ia32cap environment variable |
| 223 |
<env OPENSSL_ia32cap=LV0:LV1>, the next capability vector pairs will be set to zero. |
| 224 |
.PP |
| 225 |
To illustrate, the following will zero all capability bits in logical vectors 1 and further |
| 226 |
(disable all post-AVX extensions): |
| 227 |
.PP |
| 228 |
\&\f(CW\*(C`env OPENSSL_ia32cap=:0\*(C'\fR |
| 229 |
.PP |
| 230 |
The following will zero all capability bits in logical vectors 2 and further: |
| 231 |
.PP |
| 232 |
\&\f(CW\*(C`env OPENSSL_ia32cap=::0\*(C'\fR |
| 233 |
.PP |
| 234 |
The following will zero all capability bits only in logical vector 1: |
| 235 |
\&\f(CW\*(C`env OPENSSL_ia32cap=:0::::\*(C'\fR |
| 236 |
.PP |
| 237 |
A more likely usage scenario would be to disable specific instruction set extensions. |
| 238 |
The '\fB~\fR' character is used to specify a bit mask of the extensions to be disabled for |
| 239 |
a particular logical vector. |
| 240 |
.PP |
| 241 |
To illustrate, the following will disable AVX2 code paths and further extensions: |
| 242 |
.PP |
| 243 |
\&\f(CW\*(C`env OPENSSL_ia32cap=:~0x20000000000\*(C'\fR |
| 244 |
.PP |
| 245 |
The following will disable AESNI (LV0 bit 57) and VAES (LV1 bit 41) |
| 246 |
extensions and therefore any code paths using those extensions but leave |
| 247 |
the rest of the logical vectors unchanged: |
| 248 |
.PP |
| 249 |
\&\f(CW\*(C`env OPENSSL_ia32cap=~0x200000000000000:~0x20000000000:~0x0:~0x0:~0x0\*(C'\fR |
| 250 |
.SH NOTES |
| 251 |
.IX Header "NOTES" |
| 252 |
Not all capability bits are copied from CPUID output verbatim. An example |
| 253 |
of this is the somewhat less intuitive clearing of LV0 bit #28, or ~0x10000000 |
| 254 |
in the "environment variable" terms. It has been adjusted to reflect whether or |
| 255 |
not the data cache is actually shared between logical cores. This in turn affects |
| 256 |
the decision on whether or not expensive countermeasures against cache-timing attacks |
| 257 |
are applied, most notably in AES assembler module. |
| 258 |
.SH "RETURN VALUES" |
| 259 |
.IX Header "RETURN VALUES" |
| 260 |
Not available. |
| 261 |
.SH COPYRIGHT |
| 262 |
.IX Header "COPYRIGHT" |
| 263 |
Copyright 2004\-2021 The OpenSSL Project Authors. All Rights Reserved. |
| 264 |
.PP |
| 265 |
Licensed under the Apache License 2.0 (the "License"). You may not use |
| 266 |
this file except in compliance with the License. You can obtain a copy |
| 267 |
in the file LICENSE in the source distribution or at |
| 268 |
<https://www.openssl.org/source/license.html>. |