@@ -66,14 +66,8 @@ END(native_usergs_sysret64)
TRACE_IRQS_FLAGS EFLAGS(%rsp)
.endm
-.macro erase_kstack
-#ifdef CONFIG_GCC_PLUGIN_STACKLEAK
- call erase_kstack
-#endif
-.endm
-
-#ifdef CONFIG_GCC_PLUGIN_STACKLEAK
ENTRY(erase_kstack)
+#ifdef CONFIG_GCC_PLUGIN_STACKLEAK
pushq %rdi
pushq %rcx
pushq %rax
@@ -173,8 +167,8 @@ ENTRY(erase_kstack)
popq %rcx
popq %rdi
ret
-ENDPROC(erase_kstack)
#endif
+ENDPROC(erase_kstack)
/*
* When dynamic function tracer is enabled it will add a breakpoint
@@ -455,7 +449,7 @@ syscall_return_via_sysret:
* We are on the trampoline stack. All regs except RDI are live.
* We can do future final exit work right here.
*/
- erase_kstack
+ call erase_kstack
SWITCH_TO_USER_CR3_STACK scratch_reg=%rdi
@@ -765,7 +759,7 @@ GLOBAL(swapgs_restore_regs_and_return_to_usermode)
* We are on the trampoline stack. All regs except RDI are live.
* We can do future final exit work right here.
*/
- erase_kstack
+ call erase_kstack
SWITCH_TO_USER_CR3_STACK scratch_reg=%rdi