• A
    x86/entry/64: Return to userspace from the trampoline stack · 3e3b9293
    Andy Lutomirski 提交于
    By itself, this is useless.  It gives us the ability to run some final code
    before exit that cannnot run on the kernel stack.  This could include a CR3
    switch a la PAGE_TABLE_ISOLATION or some kernel stack erasing, for
    example.  (Or even weird things like *changing* which kernel stack gets
    used as an ASLR-strengthening mechanism.)
    
    The SYSRET32 path is not covered yet.  It could be in the future or
    we could just ignore it and force the slow path if needed.
    Signed-off-by: NAndy Lutomirski <luto@kernel.org>
    Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
    Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
    Reviewed-by: NBorislav Petkov <bp@suse.de>
    Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Borislav Petkov <bpetkov@suse.de>
    Cc: Brian Gerst <brgerst@gmail.com>
    Cc: Dave Hansen <dave.hansen@intel.com>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: David Laight <David.Laight@aculab.com>
    Cc: Denys Vlasenko <dvlasenk@redhat.com>
    Cc: Eduardo Valentin <eduval@amazon.com>
    Cc: Greg KH <gregkh@linuxfoundation.org>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Josh Poimboeuf <jpoimboe@redhat.com>
    Cc: Juergen Gross <jgross@suse.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Rik van Riel <riel@redhat.com>
    Cc: Will Deacon <will.deacon@arm.com>
    Cc: aliguori@amazon.com
    Cc: daniel.gruss@iaik.tugraz.at
    Cc: hughd@google.com
    Cc: keescook@google.com
    Link: https://lkml.kernel.org/r/20171204150606.306546484@linutronix.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
    3e3b9293
entry_64.S 45.8 KB