lkml.org 
[lkml]   [2018]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86/entry/64: Fix CR3 restore order in paranoid_exit()
From
Date
On 02/13/2018 06:27 PM, Josh Poimboeuf wrote:
> --- a/arch/x86/entry/entry_64.S
> +++ b/arch/x86/entry/entry_64.S
> @@ -1167,10 +1167,10 @@ ENTRY(paranoid_exit)
> UNWIND_HINT_REGS
> DISABLE_INTERRUPTS(CLBR_ANY)
> TRACE_IRQS_OFF_DEBUG
> + RESTORE_CR3 scratch_reg=%r15 save_reg=%r14
> testl %ebx, %ebx /* swapgs needed? */
> jnz .Lparanoid_exit_no_swapgs
> TRACE_IRQS_IRETQ
> - RESTORE_CR3 scratch_reg=%rbx save_reg=%r14
> SWAPGS_UNSAFE_STACK
> jmp .Lparanoid_exit_restore
> .Lparanoid_exit_no_swapgs:

TRACE_IRQS_* call non-entry functions that are not mapped by the user
CR3. How can this possibly work? What am I missing?

\
 
 \ /
  Last update: 2018-02-14 05:20    [W:0.069 / U:1.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site