Skip to content

Commit

Permalink
x86/crypto/sha1_avx2: Standardize stack alignment prologue
Browse files Browse the repository at this point in the history
Use a more standard prologue for saving the stack pointer before
realigning the stack.

This enables ORC unwinding by allowing objtool to understand the stack
realignment.

Signed-off-by: Josh Poimboeuf <[email protected]>
Tested-by: Ard Biesheuvel <[email protected]>
Acked-by: Ard Biesheuvel <[email protected]>
Tested-by: Sami Tolvanen <[email protected]>
Acked-by: Peter Zijlstra (Intel) <[email protected]>
Acked-by: Herbert Xu <[email protected]>
Link: https://lore.kernel.org/r/fdaaf8670ed1f52f55ba9a6bbac98c1afddc1af6.1614182415.git.jpoimboe@redhat.com
  • Loading branch information
jpoimboe committed Apr 19, 2021
1 parent 35a0067 commit 20114c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arch/x86/crypto/sha1_avx2_x86_64_asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -645,9 +645,9 @@ _loop3:
RESERVE_STACK = (W_SIZE*4 + 8+24)

/* Align stack */
mov %rsp, %rbx
push %rbp
mov %rsp, %rbp
and $~(0x20-1), %rsp
push %rbx
sub $RESERVE_STACK, %rsp

avx2_zeroupper
Expand All @@ -665,8 +665,8 @@ _loop3:

avx2_zeroupper

add $RESERVE_STACK, %rsp
pop %rsp
mov %rbp, %rsp
pop %rbp

pop %r15
pop %r14
Expand Down

0 comments on commit 20114c8

Please sign in to comment.