x86/crypto/aesni-intel_avx: Standardize stack alignment prologue
Use RBP instead of R14 for saving the old stack pointer before realignment. This resembles what compilers normally do. This enables ORC unwinding by allowing objtool to understand the stack realignment. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Tested-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Sami Tolvanen <samitolvanen@google.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Link: https://lore.kernel.org/r/02d00a0903a0959f4787e186e2a07d271e1f63d4.1614182415.git.jpoimboe@redhat.com
This commit is contained in:
parent
ff5796b6db
commit
e163be86ff
@ -251,22 +251,20 @@ VARIABLE_OFFSET = 16*8
|
|||||||
.macro FUNC_SAVE
|
.macro FUNC_SAVE
|
||||||
push %r12
|
push %r12
|
||||||
push %r13
|
push %r13
|
||||||
push %r14
|
|
||||||
push %r15
|
push %r15
|
||||||
|
|
||||||
mov %rsp, %r14
|
push %rbp
|
||||||
|
mov %rsp, %rbp
|
||||||
|
|
||||||
|
|
||||||
sub $VARIABLE_OFFSET, %rsp
|
sub $VARIABLE_OFFSET, %rsp
|
||||||
and $~63, %rsp # align rsp to 64 bytes
|
and $~63, %rsp # align rsp to 64 bytes
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro FUNC_RESTORE
|
.macro FUNC_RESTORE
|
||||||
mov %r14, %rsp
|
mov %rbp, %rsp
|
||||||
|
pop %rbp
|
||||||
|
|
||||||
pop %r15
|
pop %r15
|
||||||
pop %r14
|
|
||||||
pop %r13
|
pop %r13
|
||||||
pop %r12
|
pop %r12
|
||||||
.endm
|
.endm
|
||||||
|
Loading…
Reference in New Issue
Block a user