Skip to content

Commit

Permalink
fix disallowed interaction with OPENSSL_ia32_cap_P in fips mode
Browse files Browse the repository at this point in the history
The fipstool delocation only allows the use of `lea` when interacting
with this symbol. This commit uses `lea` and `r11` as required by the
delocation process.
  • Loading branch information
pittma committed Nov 2, 2023
1 parent 840ef9e commit b96edea
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions crypto/fipsmodule/bn/asm/rsaz-2k-avx512.pl
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,12 @@
.type ossl_rsaz_avx512ifma_eligible,\@abi-omnipotent
.align 32
ossl_rsaz_avx512ifma_eligible:
mov OPENSSL_ia32cap_P+8(%rip), %ecx
leaq OPENSSL_ia32cap_P(%rip),%r11
mov 8(%r11),%r11d
xor %eax,%eax
and \$`1<<31|1<<21|1<<17|1<<16`, %ecx # avx512vl + avx512ifma + avx512dq + avx512f
cmp \$`1<<31|1<<21|1<<17|1<<16`, %ecx
cmove %ecx,%eax
and \$`1<<31|1<<21|1<<17|1<<16`, %r11d # avx512vl + avx512ifma + avx512dq + avx512f
cmp \$`1<<31|1<<21|1<<17|1<<16`, %r11d
cmove %r11d,%eax
ret
.size ossl_rsaz_avx512ifma_eligible, .-ossl_rsaz_avx512ifma_eligible
___
Expand Down

0 comments on commit b96edea

Please sign in to comment.