diff options
author | Kenny Root <kroot@google.com> | 2015-07-24 21:10:53 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-07-24 21:10:53 +0000 |
commit | dc35386c92b2c545de07d711009d3e8f7e25db00 (patch) | |
tree | 4d210b442e8e6742e9b0ff9dca4fc158c1a6a03e /linux-x86_64/crypto/rand/rdrand-x86_64.S | |
parent | ffd8e0a5b40ce124e6dce4cb7546a26680d33d16 (diff) | |
parent | 07f4f42347557420f105a72d9a93bc8ee88a3dc5 (diff) | |
download | external_boringssl-dc35386c92b2c545de07d711009d3e8f7e25db00.zip external_boringssl-dc35386c92b2c545de07d711009d3e8f7e25db00.tar.gz external_boringssl-dc35386c92b2c545de07d711009d3e8f7e25db00.tar.bz2 |
am 07f4f423: Merge changes Icdc56a50,I63d5dc28,Ia7d0c5d8,I47406533
* commit '07f4f42347557420f105a72d9a93bc8ee88a3dc5':
Handle RDRAND failures.
dsa_pub_encode: Write out DSA parameters (p, q, g) in addition to key.
Fix for CVE-2015-1789.
Fixes for CVE-2015-1791.
Diffstat (limited to 'linux-x86_64/crypto/rand/rdrand-x86_64.S')
-rw-r--r-- | linux-x86_64/crypto/rand/rdrand-x86_64.S | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/linux-x86_64/crypto/rand/rdrand-x86_64.S b/linux-x86_64/crypto/rand/rdrand-x86_64.S index 622ae55..94aab9c 100644 --- a/linux-x86_64/crypto/rand/rdrand-x86_64.S +++ b/linux-x86_64/crypto/rand/rdrand-x86_64.S @@ -1,11 +1,48 @@ #if defined(__x86_64__) .text + + + .globl CRYPTO_rdrand .hidden CRYPTO_rdrand .type CRYPTO_rdrand,@function .align 16 CRYPTO_rdrand: -.byte 0x48, 0x0f, 0xc7, 0xf0 + xorq %rax,%rax + + +.byte 0x48, 0x0f, 0xc7, 0xf1 + + adcq %rax,%rax + movq %rcx,0(%rdi) + .byte 0xf3,0xc3 + + + + + +.globl CRYPTO_rdrand_multiple8_buf +.hidden CRYPTO_rdrand_multiple8_buf +.type CRYPTO_rdrand_multiple8_buf,@function +.align 16 +CRYPTO_rdrand_multiple8_buf: + testq %rsi,%rsi + jz .Lout + movq $8,%rdx +.Lloop: + + +.byte 0x48, 0x0f, 0xc7, 0xf1 + jnc .Lerr + movq %rcx,0(%rdi) + addq %rdx,%rdi + subq %rdx,%rsi + jnz .Lloop +.Lout: + movq $1,%rax + .byte 0xf3,0xc3 +.Lerr: + xorq %rax,%rax .byte 0xf3,0xc3 #endif |