• Josh Poimboeuf's avatar
    x86/entry/32: Fix the end of the stack for newly forked tasks · 4d516f41
    Josh Poimboeuf authored
    Thanks to all the recent x86 entry code refactoring, most tasks' kernel
    stacks start at the same offset right below their saved pt_regs,
    regardless of which syscall was used to enter the kernel.  That creates
    a nice convention which makes it straightforward to identify the end of
    the stack, which can be useful for the unwinder to verify the stack is
    sane.
    
    Calling schedule_tail() directly breaks that convention because its an
    asmlinkage function so its argument has to be pushed on the stack.  Add
    a wrapper which creates a proper "end of stack" frame header before the
    call.
    Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
    Cc: Andy Lutomirski <luto@kernel.org>
    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: Nilay Vaish <nilayvaish@gmail.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: http://lkml.kernel.org/r/ecafcd882676bf48ceaf50483782552bb98476e5.1474480779.git.jpoimboe@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    4d516f41
entry_32.S 28.8 KB