lkml.org 
[lkml]   [2017]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 22/43] x86/mm/kaiser: Prepare assembly for entry/exit CR3 switching
On Fri, 24 Nov 2017, Ingo Molnar wrote:
> @@ -1288,6 +1308,8 @@ ENTRY(error_entry)
> * from user mode due to an IRET fault.
> */
> SWAPGS
> + /* We have user CR3. Change to kernel CR3. */
> + SWITCH_TO_KERNEL_CR3 scratch_reg=%rax
>
> .Lerror_entry_from_usermode_after_swapgs:
> /* Put us onto the real thread stack. */
> @@ -1333,6 +1355,7 @@ ENTRY(error_entry)
> * gsbase and proceed. We'll fix up the exception and land in
> * .Lgs_change's error handler with kernel gsbase.
> */
> + SWITCH_TO_KERNEL_CR3 scratch_reg=%rax
> SWAPGS

This is wrong. SWAPGS needs to come first.

Thanks,

tglx

\
 
 \ /
  Last update: 2017-11-25 01:02    [W:0.435 / U:5.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site