Discussion:
[openssl.org #3552] aesni_ecb_encrypt clobbers Win64 callee-save registers
David Leon Gil via RT
2014-10-01 07:08:45 UTC
Permalink
crypto/aes/asm/aesni-x86_64.pl: aesni_ecb_encrypt (unlike the other
AES-NI functions) does not save and restore the Win64 ABI callee-save
XMM registers.

(This came up while reviewing aesni-x86_64.pl for another patch (to be
submitted); but this should be tracked separately.)

______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-***@openssl.org
Automated List Manager ***@openssl.org
Andy Polyakov via RT
2014-10-01 12:56:44 UTC
Permalink
Post by David Leon Gil via RT
crypto/aes/asm/aesni-x86_64.pl: aesni_ecb_encrypt (unlike the other
AES-NI functions) does not save and restore the Win64 ABI callee-save
XMM registers.
Oh! The reason must be that originally the module used lower instruction
interleave factor and ECB didn't need to off-load any XMM registers. And
when interleave factor was increased, ECB was overlooked and problem
remained unnoticed, because ECB is not actually used in any real-life
application. Thanks for report! But solution would be different from one
proposed in next report, we don't need to off-load that many registers,
4 is sufficient, and one has to harmonize SEH handler too...
Andy Polyakov via RT
2014-10-15 09:50:31 UTC
Permalink
The ABI fix is committed, unfortunately RT number is off by one in commit
message, 3553 instead of 3552.

______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-***@openssl.org
Automated List Manager ***@openssl.org
Loading...