lkml.org 
[lkml]   [2017]   [Nov]   [25]   [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 Sat, 25 Nov 2017, Thomas Gleixner wrote:

> 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.

With this fixed:

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>

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