]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/spdk/intel-ipsec-mb/sse/sha512_one_block_sse.asm
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / spdk / intel-ipsec-mb / sse / sha512_one_block_sse.asm
index 23296f00f4bd4adcd11557c5b3cdea47b3e7f207..534cfbfd8b8f97ed4d752598505a5f80ff3dea87 100644 (file)
@@ -27,7 +27,7 @@
 
 ; This code schedules 1 blocks at a time, with 4 lanes per block
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-%include "os.asm"
+%include "include/os.asm"
 
 %define        MOVDQ movdqu ;; assume buffers not aligned
 
@@ -321,7 +321,7 @@ PSHUFFLE_BYTE_FLIP_MASK: ;ddq 0x08090a0b0c0d0e0f0001020304050607
 ;; arg 1 : pointer to input data
 ;; arg 2 : pointer to digest
 section .text
-MKGLOBAL(FUNC,function,)
+MKGLOBAL(FUNC,function,internal)
 align 32
 FUNC:
        push    rbx
@@ -445,7 +445,20 @@ done_hash:
        movdqa  xmm11,[rsp + _XMM_SAVE + 5*16]
        movdqa  xmm12,[rsp + _XMM_SAVE + 6*16]
        movdqa  xmm13,[rsp + _XMM_SAVE + 7*16]
+
+%ifdef SAFE_DATA
+        ;; Clear potential sensitive data stored in stack
+        pxor    xmm0, xmm0
+        movdqa  [rsp + _XMM_SAVE + 0 * 16], xmm0
+        movdqa  [rsp + _XMM_SAVE + 1 * 16], xmm0
+        movdqa  [rsp + _XMM_SAVE + 2 * 16], xmm0
+        movdqa  [rsp + _XMM_SAVE + 3 * 16], xmm0
+        movdqa  [rsp + _XMM_SAVE + 4 * 16], xmm0
+        movdqa  [rsp + _XMM_SAVE + 5 * 16], xmm0
+        movdqa  [rsp + _XMM_SAVE + 6 * 16], xmm0
+        movdqa  [rsp + _XMM_SAVE + 7 * 16], xmm0
 %endif
+%endif ;; LINUX
 
        add     rsp, STACK_size