x86/retpoline: Fill return buffer on interrupt return to kernel
Interrupts can have rather deep call chains on top of the original
call chain. Fill the return buffer on Skylake when returning from
an interrupt/NMI to the kernel, to avoid return buffer underflows
later.
This only needs to be done when returning to the kernel,
so interrupts interrupting user space are not impacted.
The patch also do the same for returns from exceptions
to the kernel. This is useful because get_user page faults
can also have deep call chains. It's all unified in the
same code path.
This patch changes the code for 32 and 64bit.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
2 files changed