Re: [PATCH V3 3/7] x86/entry: Switch the stack after error_entry() returns

From: Peter Zijlstra
Date: Fri Mar 18 2022 - 07:12:28 EST


On Thu, Mar 17, 2022 at 12:43:02AM +0800, Lai Jiangshan wrote:
> On Wed, Mar 16, 2022 at 11:05 PM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> >
> > > SYM_CODE_END(error_entry)
> >
> > So the new Changelog doesn't seem to help me much. But looking at both
> > fixup_bad_iret() and sync_regs(), they both have:
> >
> > __this_cpu_read(cpu_tss_rw.x86_tss.sp0) - 1
>

Yes, I can't read :/ Functions don't both use that.

Your patch is correct, not switching the stack in between runs sync_regs
from another stack, but the end result should be the same.