]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
x86/asm/entry/64: Disentangle error_entry/exit gsbase/ebx/usermode code
authorAndy Lutomirski <luto@kernel.org>
Tue, 9 Jun 2015 19:36:01 +0000 (12:36 -0700)
committerIngo Molnar <mingo@kernel.org>
Wed, 10 Jun 2015 06:47:57 +0000 (08:47 +0200)
commit539f5113650068ba221197f190267ab727296ef5
treeeafc4ade012f4ced276f92e891c9196af70f3f67
parenta92fde25231a89d7d10895482556260c1b63767d
x86/asm/entry/64: Disentangle error_entry/exit gsbase/ebx/usermode code

The error_entry/error_exit code to handle gsbase and whether we
return to user mdoe was a mess:

 - error_sti was misnamed.  In particular, it did not enable interrupts.

 - Error handling for gs_change was hopelessly tangled the normal
   usermode path.  Separate it out.  This saves a branch in normal
   entries from kernel mode.

 - The comments were bad.

Fix it up.  As a nice side effect, there's now a code path that
happens on error entries from user mode.  We'll use it soon.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/f1be898ab93360169fb845ab85185948832209ee.1433878454.git.luto@kernel.org
[ Prettified it, clarified comments some more. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/entry/entry_64.S